From bf9b6c4252c28749a65263d572614a90ab70d864 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 30 May 2024 00:34:58 -0400 Subject: [PATCH 01/67] Add WIP cardano support Signed-off-by: Simon Gellis --- internal/blockchain/bifactory/factory.go | 2 + internal/blockchain/cardano/cardano.go | 354 +++++++++++++++++++++++ internal/blockchain/cardano/config.go | 36 +++ internal/coremsgs/en_error_messages.go | 2 + internal/networkmap/did.go | 11 + manifest.json | 4 + pkg/core/verifier.go | 2 + 7 files changed, 411 insertions(+) create mode 100644 internal/blockchain/cardano/cardano.go create mode 100644 internal/blockchain/cardano/config.go diff --git a/internal/blockchain/bifactory/factory.go b/internal/blockchain/bifactory/factory.go index 7171210be7..40a835ca5e 100644 --- a/internal/blockchain/bifactory/factory.go +++ b/internal/blockchain/bifactory/factory.go @@ -21,6 +21,7 @@ import ( "github.com/hyperledger/firefly-common/pkg/config" "github.com/hyperledger/firefly-common/pkg/i18n" + "github.com/hyperledger/firefly/internal/blockchain/cardano" "github.com/hyperledger/firefly/internal/blockchain/ethereum" "github.com/hyperledger/firefly/internal/blockchain/fabric" "github.com/hyperledger/firefly/internal/blockchain/tezos" @@ -30,6 +31,7 @@ import ( ) var pluginsByType = map[string]func() blockchain.Plugin{ + (*cardano.Cardano)(nil).Name(): func() blockchain.Plugin { return &cardano.Cardano{} }, (*ethereum.Ethereum)(nil).Name(): func() blockchain.Plugin { return ðereum.Ethereum{} }, (*fabric.Fabric)(nil).Name(): func() blockchain.Plugin { return &fabric.Fabric{} }, (*tezos.Tezos)(nil).Name(): func() blockchain.Plugin { return &tezos.Tezos{} }, diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go new file mode 100644 index 0000000000..c9748d3dbc --- /dev/null +++ b/internal/blockchain/cardano/cardano.go @@ -0,0 +1,354 @@ +// Copyright © 2024 Kaleido, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cardano + +import ( + "context" + "encoding/json" + "errors" + "fmt" + + "github.com/go-resty/resty/v2" + "github.com/hyperledger/firefly-common/pkg/config" + "github.com/hyperledger/firefly-common/pkg/ffresty" + "github.com/hyperledger/firefly-common/pkg/fftypes" + "github.com/hyperledger/firefly-common/pkg/i18n" + "github.com/hyperledger/firefly-common/pkg/log" + "github.com/hyperledger/firefly-common/pkg/wsclient" + "github.com/hyperledger/firefly/internal/blockchain/common" + "github.com/hyperledger/firefly/internal/cache" + "github.com/hyperledger/firefly/internal/coremsgs" + "github.com/hyperledger/firefly/internal/metrics" + "github.com/hyperledger/firefly/pkg/blockchain" + "github.com/hyperledger/firefly/pkg/core" +) + +const ( + cardanoTxStatusPending string = "Pending" +) + +const ( + ReceiptTransactionSuccess string = "TransactionSuccess" + ReceiptTransactionFailed string = "TransactionFailed" +) + +type Cardano struct { + ctx context.Context + cancelCtx context.CancelFunc + pluginTopic string + metrics metrics.Manager + capabilities *blockchain.Capabilities + callbacks common.BlockchainCallbacks + client *resty.Client + wsconn wsclient.WSClient + cardanoconnectConf config.Section + subs common.FireflySubscriptions +} + +type cardanoWSCommandPayload struct { + Type string `json:"type"` + Topic string `json:"topic,omitempty"` +} + +func (c *Cardano) Name() string { + return "cardano" +} + +func (c *Cardano) VerifierType() core.VerifierType { + return core.VerifierTypeCardanoAddress +} + +func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf config.Section, metrics metrics.Manager, cacheManager cache.Manager) (err error) { + c.InitConfig(conf) + cardanoconnectConf := c.cardanoconnectConf + + c.ctx = log.WithLogField(ctx, "proto", "cardano") + c.cancelCtx = cancelCtx + c.metrics = metrics + c.capabilities = &blockchain.Capabilities{} + c.callbacks = common.NewBlockchainCallbacks() + c.subs = common.NewFireflySubscriptions() + + wsConfig, err := wsclient.GenerateConfig(ctx, cardanoconnectConf) + if err == nil { + c.client, err = ffresty.New(c.ctx, cardanoconnectConf) + } + + if err != nil { + return err + } + + c.pluginTopic = cardanoconnectConf.GetString(CardanoconnectConfigTopic) + if c.pluginTopic == "" { + return i18n.NewError(ctx, coremsgs.MsgMissingPluginConfig, "topic", "blockchain.cardano.cardanoconnect") + } + + if wsConfig.WSKeyPath == "" { + wsConfig.WSKeyPath = "/ws" + } + c.wsconn, err = wsclient.New(ctx, wsConfig, nil, c.afterConnect) + if err != nil { + return err + } + + go c.eventLoop() + + return nil +} + +func (c *Cardano) StartNamespace(ctx context.Context, namespace string) (err error) { + // TODO: Implement + return nil +} + +func (c *Cardano) StopNamespace(ctx context.Context, namespace string) (err error) { + // TODO: Implement + return nil +} + +func (c *Cardano) SetHandler(namespace string, handler blockchain.Callbacks) { + c.callbacks.SetHandler(namespace, handler) +} + +func (c *Cardano) SetOperationHandler(namespace string, handler core.OperationCallbacks) { + c.callbacks.SetOperationalHandler(namespace, handler) +} + +func (c *Cardano) Start() (err error) { + return c.wsconn.Connect() +} + +func (c *Cardano) Capabilities() *blockchain.Capabilities { + return c.capabilities +} + +func (c *Cardano) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract) (string, error) { + return "", errors.New("AddFireflySubscription not supported") +} + +func (c *Cardano) RemoveFireflySubscription(ctx context.Context, subID string) { + c.subs.RemoveSubscription(ctx, subID) +} + +func (c *Cardano) ResolveSigningKey(ctx context.Context, key string, intent blockchain.ResolveKeyIntent) (resolved string, err error) { + if key == "" { + return "", i18n.NewError(ctx, coremsgs.MsgNodeMissingBlockchainKey) + } + resolved, err = formatCardanoAddress(ctx, key) + return resolved, err +} + +func (c *Cardano) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error { + return errors.New("SubmitBatchPin not supported") +} + +func (c *Cardano) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error { + return errors.New("SubmitNetworkAction not supported") +} + +func (c *Cardano) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { + return true, errors.New("DeployContract not supported") +} + +func (c *Cardano) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { + return errors.New("ValidateInvokeRequest not supported") +} + +func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { + return true, errors.New("InvokeContract not supported") +} + +func (c *Cardano) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) { + return nil, errors.New("QueryContract not supported") +} + +func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errorz []*fftypes.FFIError) (interface{}, error) { + return nil, errors.New("ParseInterface not supported") +} + +func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { + return nil, errors.New("NormalizeContractLocation not supported") +} + +func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener) (err error) { + return errors.New("AddContractListener not supported") +} + +func (c *Cardano) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error { + return errors.New("DeleteContractListener not supported") +} + +func (c *Cardano) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (found bool, detail interface{}, status core.ContractListenerStatus, err error) { + return false, nil, core.ContractListenerStatusUnknown, errors.New("GetContractListenerStatus not supported") +} + +func (c *Cardano) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error) { + // Cardanoconnect does not require any additional validation beyond "JSON Schema correctness" at this time + return nil, nil +} + +func (c *Cardano) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) string { + return event.Name +} + +func (c *Cardano) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string { + // TODO: impl + return "" +} + +func (c *Cardano) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error) { + return nil, i18n.NewError(ctx, coremsgs.MsgFFIGenerationUnsupported) +} + +func (c *Cardano) GetNetworkVersion(ctx context.Context, location *fftypes.JSONAny) (version int, err error) { + // Part of the FIR-12. https://github.com/hyperledger/firefly-fir/pull/12 + // Cardano doesn't support any of this yet, so just pretend we're on the new hotness + return 2, nil +} + +func (c *Cardano) GetAndConvertDeprecatedContractConfig(ctx context.Context) (location *fftypes.JSONAny, fromBlock string, err error) { + return nil, "", nil +} + +func (c *Cardano) GetTransactionStatus(ctx context.Context, operation *core.Operation) (interface{}, error) { + txnID := (&core.PreparedOperation{ID: operation.ID, Namespace: operation.Namespace}).NamespacedIDString() + + transactionRequestPath := fmt.Sprintf("/transactions/%s", txnID) + client := c.client + var resErr common.BlockchainRESTError + var statusResponse fftypes.JSONObject + res, err := client.R(). + SetContext(ctx). + SetError(&resErr). + SetResult(&statusResponse). + Get(transactionRequestPath) + if err != nil || !res.IsSuccess() { + if res.StatusCode() == 404 { + return nil, nil + } + return nil, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + + receiptInfo := statusResponse.GetObject("receipt") + txStatus := statusResponse.GetString("status") + + if txStatus != "" { + var replyType string + if txStatus == "Succeeded" { + replyType = ReceiptTransactionSuccess + } else { + replyType = ReceiptTransactionFailed + } + // If the status has changed, mock up blockchain receipt as if we'd received it + // as a web socket notification + if (operation.Status == core.OpStatusPending || operation.Status == core.OpStatusInitialized) && txStatus != cardanoTxStatusPending { + receipt := &common.BlockchainReceiptNotification{ + Headers: common.BlockchainReceiptHeaders{ + ReceiptID: statusResponse.GetString("id"), + ReplyType: replyType, + }, + TxHash: statusResponse.GetString("transactionHash"), + Message: statusResponse.GetString("errorMessage"), + ProtocolID: receiptInfo.GetString("protocolId")} + err := common.HandleReceipt(ctx, c, receipt, c.callbacks) + if err != nil { + log.L(ctx).Warnf("Failed to handle receipt") + } + } + } else { + // Don't expect to get here so issue a warning + log.L(ctx).Warnf("Transaction status didn't include txStatus information") + } + + return statusResponse, nil +} + +func (c *Cardano) afterConnect(ctx context.Context, w wsclient.WSClient) error { + // Send a subscribe to our topic after each connect/reconnect + b, _ := json.Marshal(&cardanoWSCommandPayload{ + Type: "listen", + Topic: c.pluginTopic, + }) + err := w.Send(ctx, b) + if err == nil { + b, _ = json.Marshal(&cardanoWSCommandPayload{ + Type: "listenreplies", + }) + err = w.Send(ctx, b) + } + return err +} + +func (c *Cardano) eventLoop() { + defer c.wsconn.Close() + l := log.L(c.ctx).WithField("role", "event-loop") + ctx := log.WithLogger(c.ctx, l) + for { + select { + case <-ctx.Done(): + l.Debugf("Event loop exiting (context cancelled)") + return + case msgBytes, ok := <-c.wsconn.Receive(): + if !ok { + l.Debugf("Event loop exiting (receive channel closed). Terminating server!") + c.cancelCtx() + return + } + + var msgParsed interface{} + err := json.Unmarshal(msgBytes, &msgParsed) + if err != nil { + l.Errorf("Message cannot be parsed as JSON: %s\n%s", err, string(msgBytes)) + continue // Swallow this and move on + } + switch msgTyped := msgParsed.(type) { + case []interface{}: + // TODO: handle this + ack, _ := json.Marshal(&cardanoWSCommandPayload{ + Type: "ack", + Topic: c.pluginTopic, + }) + err = c.wsconn.Send(ctx, ack) + case map[string]interface{}: + var receipt common.BlockchainReceiptNotification + _ = json.Unmarshal(msgBytes, &receipt) + + err := common.HandleReceipt(ctx, c, &receipt, c.callbacks) + if err != nil { + l.Errorf("Failed to process receipt: %+v", msgTyped) + } + default: + l.Errorf("Message unexpected: %+v", msgTyped) + continue + } + + if err != nil { + l.Errorf("Event loop exiting (%s). Terminating server!", err) + c.cancelCtx() + return + } + } + } +} + +func formatCardanoAddress(ctx context.Context, key string) (string, error) { + // TODO: this could be much stricter validation + if key != "" { + return key, nil + } + return "", i18n.NewError(ctx, coremsgs.MsgInvalidCardanoAddress) +} diff --git a/internal/blockchain/cardano/config.go b/internal/blockchain/cardano/config.go new file mode 100644 index 0000000000..bc2a4fbb77 --- /dev/null +++ b/internal/blockchain/cardano/config.go @@ -0,0 +1,36 @@ +// Copyright © 2024 Kaleido, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cardano + +import ( + "github.com/hyperledger/firefly-common/pkg/config" + "github.com/hyperledger/firefly-common/pkg/wsclient" +) + +const ( + // CardanoconnectConfigKey is a sub-key in the config to contain all the cardanoconnect specific config + CardanoconnectConfigKey = "cardanoconnect" + // CardanoconnectConfigTopic is the websocket listen topic that the node should register on, which is important if there are multiple + // nodes using a single cardanoconnect + CardanoconnectConfigTopic = "topic" +) + +func (c *Cardano) InitConfig(config config.Section) { + c.cardanoconnectConf = config.SubSection(CardanoconnectConfigKey) + wsclient.InitConfig(c.cardanoconnectConf) + c.cardanoconnectConf.AddKnownKey(CardanoconnectConfigTopic) +} diff --git a/internal/coremsgs/en_error_messages.go b/internal/coremsgs/en_error_messages.go index 8cccd5c344..0416ca661b 100644 --- a/internal/coremsgs/en_error_messages.go +++ b/internal/coremsgs/en_error_messages.go @@ -59,6 +59,7 @@ var ( MsgSerializationFailed = ffe("FF10137", "Serialization failed") MsgMissingPluginConfig = ffe("FF10138", "Missing configuration '%s' for %s") MsgMissingDataHashIndex = ffe("FF10139", "Missing data hash for index '%d' in message", 400) + MsgInvalidCardanoAddress = ffe("FF10140", "Supplied cardano address is invalid", 400) MsgInvalidEthAddress = ffe("FF10141", "Supplied ethereum address is invalid", 400) MsgInvalidTezosAddress = ffe("FF10142", "Supplied tezos address is invalid", 400) Msg404NoResult = ffe("FF10143", "No result found", 404) @@ -146,6 +147,7 @@ var ( MsgAuthorOrgSigningKeyMismatch = ffe("FF10279", "Author organization '%s' is not associated with signing key '%s'") MsgCannotTransferToSelf = ffe("FF10280", "From and to addresses must be different", 400) MsgLocalOrgNotSet = ffe("FF10281", "Unable to resolve the local root org. Please ensure org.name is configured", 500) + MsgCardanoconnectRESTErr = ffe("FF10282", "Error from cardano connector: %s") MsgTezosconnectRESTErr = ffe("FF10283", "Error from tezos connector: %s") MsgFabconnectRESTErr = ffe("FF10284", "Error from fabconnect: %s") MsgInvalidIdentity = ffe("FF10285", "Supplied Fabric signer identity is invalid", 400) diff --git a/internal/networkmap/did.go b/internal/networkmap/did.go index af1244ccab..544a9aa2f4 100644 --- a/internal/networkmap/did.go +++ b/internal/networkmap/did.go @@ -75,6 +75,8 @@ func (nm *networkMap) generateDIDDocument(ctx context.Context, identity *core.Id func (nm *networkMap) generateDIDAuthentication(ctx context.Context, identity *core.Identity, verifier *core.Verifier) *VerificationMethod { switch verifier.Type { + case core.VerifierTypeCardanoAddress: + return nm.generateCardanoAddressVerifier(identity, verifier) case core.VerifierTypeEthAddress: return nm.generateEthAddressVerifier(identity, verifier) case core.VerifierTypeTezosAddress: @@ -89,6 +91,15 @@ func (nm *networkMap) generateDIDAuthentication(ctx context.Context, identity *c } } +func (nm *networkMap) generateCardanoAddressVerifier(identity *core.Identity, verifier *core.Verifier) *VerificationMethod { + return &VerificationMethod{ + ID: verifier.Hash.String(), + Type: "PaymentVerificationKeyShelley_ed25519", // hope that it's safe to assume we always use Shelley + Controller: identity.DID, + BlockchainAccountID: verifier.Value, + } +} + func (nm *networkMap) generateEthAddressVerifier(identity *core.Identity, verifier *core.Verifier) *VerificationMethod { return &VerificationMethod{ ID: verifier.Hash.String(), diff --git a/manifest.json b/manifest.json index a6285d4da1..8b82e7b7c2 100644 --- a/manifest.json +++ b/manifest.json @@ -1,4 +1,8 @@ { + "cardanoconnect": { + "image": "cardanoconnect", + "local": true + }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", "tag": "v3.3.2", diff --git a/pkg/core/verifier.go b/pkg/core/verifier.go index 0a589474f9..5d2387a82d 100644 --- a/pkg/core/verifier.go +++ b/pkg/core/verifier.go @@ -26,6 +26,8 @@ import ( type VerifierType = fftypes.FFEnum var ( + // VerifierTypeCardanoAddress is a Cardano address string + VerifierTypeCardanoAddress = fftypes.FFEnumValue("verifiertype", "cardano_address") // VerifierTypeEthAddress is an Ethereum (secp256k1) address string VerifierTypeEthAddress = fftypes.FFEnumValue("verifiertype", "ethereum_address") // VerifierTypeTezosAddress is a Tezos (ed25519) address string From 0b474961a2a3f7daf4f3f24667002e4344cf5ec9 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sun, 2 Jun 2024 01:08:29 -0400 Subject: [PATCH 02/67] Fix WS connection to cardano connector Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 20 +++- internal/blockchain/cardano/config.go | 11 ++ internal/blockchain/cardano/eventstream.go | 114 +++++++++++++++++++++ 3 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 internal/blockchain/cardano/eventstream.go diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index c9748d3dbc..04fbebc8c0 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -54,6 +54,7 @@ type Cardano struct { capabilities *blockchain.Capabilities callbacks common.BlockchainCallbacks client *resty.Client + streams *streamManager wsconn wsclient.WSClient cardanoconnectConf config.Section subs common.FireflySubscriptions @@ -83,6 +84,10 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c c.callbacks = common.NewBlockchainCallbacks() c.subs = common.NewFireflySubscriptions() + if cardanoconnectConf.GetString(ffresty.HTTPConfigURL) == "" { + return i18n.NewError(ctx, coremsgs.MsgMissingPluginConfig, "url", cardanoconnectConf) + } + wsConfig, err := wsclient.GenerateConfig(ctx, cardanoconnectConf) if err == nil { c.client, err = ffresty.New(c.ctx, cardanoconnectConf) @@ -105,9 +110,18 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c return err } + c.streams = newStreamManager(c.client, c.cardanoconnectConf.GetUint(CardanoconnectConfigBatchSize), uint(c.cardanoconnectConf.GetDuration(CardanoconnectConfigBatchTimeout).Milliseconds())) + + stream, err := c.streams.ensureEventStream(c.ctx, c.pluginTopic) + if err != nil { + return err + } + + log.L(c.ctx).Infof("Event stream: %s (topic=%s)", stream.ID, c.pluginTopic) + go c.eventLoop() - return nil + return c.wsconn.Connect() } func (c *Cardano) StartNamespace(ctx context.Context, namespace string) (err error) { @@ -128,10 +142,6 @@ func (c *Cardano) SetOperationHandler(namespace string, handler core.OperationCa c.callbacks.SetOperationalHandler(namespace, handler) } -func (c *Cardano) Start() (err error) { - return c.wsconn.Connect() -} - func (c *Cardano) Capabilities() *blockchain.Capabilities { return c.capabilities } diff --git a/internal/blockchain/cardano/config.go b/internal/blockchain/cardano/config.go index bc2a4fbb77..d7e4a1ee95 100644 --- a/internal/blockchain/cardano/config.go +++ b/internal/blockchain/cardano/config.go @@ -21,16 +21,27 @@ import ( "github.com/hyperledger/firefly-common/pkg/wsclient" ) +const ( + defaultBatchSize = 50 + defaultBatchTimeout = 500 +) + const ( // CardanoconnectConfigKey is a sub-key in the config to contain all the cardanoconnect specific config CardanoconnectConfigKey = "cardanoconnect" // CardanoconnectConfigTopic is the websocket listen topic that the node should register on, which is important if there are multiple // nodes using a single cardanoconnect CardanoconnectConfigTopic = "topic" + // CardanoconnectConfigBatchSize is the batch size to configure on event streams, when auto-defining them + CardanoconnectConfigBatchSize = "batchSize" + // CardanoconnectConfigBatchTimeout is the batch timeout to configure on event streams, when auto-defining them + CardanoconnectConfigBatchTimeout = "batchTimeout" ) func (c *Cardano) InitConfig(config config.Section) { c.cardanoconnectConf = config.SubSection(CardanoconnectConfigKey) wsclient.InitConfig(c.cardanoconnectConf) c.cardanoconnectConf.AddKnownKey(CardanoconnectConfigTopic) + c.cardanoconnectConf.AddKnownKey(CardanoconnectConfigBatchSize, defaultBatchSize) + c.cardanoconnectConf.AddKnownKey(CardanoconnectConfigBatchTimeout, defaultBatchTimeout) } diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go new file mode 100644 index 0000000000..5696361648 --- /dev/null +++ b/internal/blockchain/cardano/eventstream.go @@ -0,0 +1,114 @@ +// Copyright © 2024 Kaleido, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cardano + +import ( + "context" + + "github.com/go-resty/resty/v2" + "github.com/hyperledger/firefly-common/pkg/ffresty" + "github.com/hyperledger/firefly/internal/coremsgs" +) + +type streamManager struct { + client *resty.Client + batchSize uint + batchTimeout uint +} + +type eventStream struct { + ID string `json:"id"` + Name string `json:"name"` + ErrorHandling string `json:"errorHandling"` + BatchSize uint `json:"batchSize"` + BatchTimeoutMS uint `json:"batchTimeoutMS"` + Type string `json:"type"` + Timestamps bool `json:"timestamps"` +} + +func newStreamManager(client *resty.Client, batchSize, batchTimeout uint) *streamManager { + return &streamManager{ + client: client, + batchSize: batchSize, + batchTimeout: batchTimeout, + } +} + +func (s *streamManager) getEventStreams(ctx context.Context) (streams []*eventStream, err error) { + res, err := s.client.R(). + SetContext(ctx). + SetResult(&streams). + Get("/eventstreams") + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return streams, nil +} + +func buildEventStream(topic string, batchSize, batchTimeout uint) *eventStream { + return &eventStream{ + Name: topic, + ErrorHandling: "block", + BatchSize: batchSize, + BatchTimeoutMS: batchTimeout, + Type: "websocket", + Timestamps: true, + } +} + +func (s *streamManager) createEventStream(ctx context.Context, topic string) (*eventStream, error) { + stream := buildEventStream(topic, s.batchSize, s.batchTimeout) + res, err := s.client.R(). + SetContext(ctx). + SetBody(stream). + SetResult(stream). + Post("/eventstreams") + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return stream, nil +} + +func (s *streamManager) updateEventStream(ctx context.Context, topic string, batchSize, batchTimeout uint, eventStreamID string) (*eventStream, error) { + stream := buildEventStream(topic, batchSize, batchTimeout) + res, err := s.client.R(). + SetContext(ctx). + SetBody(stream). + SetResult(stream). + Patch("/eventstreams/" + eventStreamID) + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return stream, nil +} + +func (s *streamManager) ensureEventStream(ctx context.Context, topic string) (*eventStream, error) { + existingStreams, err := s.getEventStreams(ctx) + if err != nil { + return nil, err + } + for _, stream := range existingStreams { + if stream.Name == topic { + stream, err = s.updateEventStream(ctx, topic, s.batchSize, s.batchTimeout, stream.ID) + if err != nil { + return nil, err + } + return stream, nil + } + } + return s.createEventStream(ctx, topic) +} From 7b9e934e7dc0b970126b68cf052be4103c1eec4c Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sun, 2 Jun 2024 01:21:34 -0400 Subject: [PATCH 03/67] Pass-through FFI validation Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 04fbebc8c0..2e06bf4861 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -60,6 +60,11 @@ type Cardano struct { subs common.FireflySubscriptions } +type ffiMethodAndErrors struct { + method *fftypes.FFIMethod + errors []*fftypes.FFIError +} + type cardanoWSCommandPayload struct { Type string `json:"type"` Topic string `json:"topic,omitempty"` @@ -175,7 +180,9 @@ func (c *Cardano) DeployContract(ctx context.Context, nsOpID, signingKey string, } func (c *Cardano) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { - return errors.New("ValidateInvokeRequest not supported") + // No additional validation beyond what is enforced by Contract Manager + _, _, err := c.recoverFFI(ctx, parsedMethod) + return err } func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { @@ -186,8 +193,11 @@ func (c *Cardano) QueryContract(ctx context.Context, signingKey string, location return nil, errors.New("QueryContract not supported") } -func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errorz []*fftypes.FFIError) (interface{}, error) { - return nil, errors.New("ParseInterface not supported") +func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error) { + return &ffiMethodAndErrors{ + method: method, + errors: errors, + }, nil } func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { @@ -303,6 +313,14 @@ func (c *Cardano) afterConnect(ctx context.Context, w wsclient.WSClient) error { return err } +func (c *Cardano) recoverFFI(ctx context.Context, parsedMethod interface{}) (*fftypes.FFIMethod, []*fftypes.FFIError, error) { + methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) + if !ok || methodInfo.method == nil { + return nil, nil, i18n.NewError(ctx, coremsgs.MsgUnexpectedInterfaceType, parsedMethod) + } + return methodInfo.method, methodInfo.errors, nil +} + func (c *Cardano) eventLoop() { defer c.wsconn.Close() l := log.L(c.ctx).WithField("role", "event-loop") From fb574c6036657d0baf765691b0928aa16e012827 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 31 Oct 2024 16:05:16 -0400 Subject: [PATCH 04/67] Fix signature of cardano plugin Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 2e06bf4861..da0904f6fe 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -151,7 +151,7 @@ func (c *Cardano) Capabilities() *blockchain.Capabilities { return c.capabilities } -func (c *Cardano) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract) (string, error) { +func (c *Cardano) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract, lastProtocolID string) (string, error) { return "", errors.New("AddFireflySubscription not supported") } @@ -200,11 +200,15 @@ func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, }, nil } +func (c *Cardano) CheckOverlappingLocations(ctx context.Context, left *fftypes.JSONAny, right *fftypes.JSONAny) (bool, error) { + return true, errors.New("CheckOverlappingLocations not supported") +} + func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { return nil, errors.New("NormalizeContractLocation not supported") } -func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener) (err error) { +func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener, lastProtocolID string) (err error) { return errors.New("AddContractListener not supported") } @@ -221,8 +225,12 @@ func (c *Cardano) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamVal return nil, nil } -func (c *Cardano) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) string { - return event.Name +func (c *Cardano) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) (string, error) { + return "", errors.New("GenerateEventSignature not supported") +} + +func (c *Cardano) GenerateEventSignatureWithLocation(ctx context.Context, event *fftypes.FFIEventDefinition, location *fftypes.JSONAny) (string, error) { + return "", errors.New("GenerateEventSignatureWithLocation not supported") } func (c *Cardano) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string { From b9b766ab082eb01bf8f7351c0a037496c2f99bff Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 31 Oct 2024 17:34:25 -0400 Subject: [PATCH 05/67] Update tags for cardano images Signed-off-by: Simon Gellis --- manifest.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 8b82e7b7c2..a62e223368 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,11 @@ { "cardanoconnect": { - "image": "cardanoconnect", - "local": true + "image": "sundaeswap/firefly-cardanoconnect", + "tag": "main" + }, + "cardanosigner": { + "image": "sundaeswap/firefly-cardanosigner", + "tag": "main" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", From 0238a58591c3c88e7d94b85c63cd657a2d68e7b0 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 6 Nov 2024 15:40:58 -0500 Subject: [PATCH 06/67] feat: implement invoking cardano contracts Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 90 ++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 4 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index da0904f6fe..ed6c26f239 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -21,6 +21,7 @@ import ( "encoding/json" "errors" "fmt" + "strings" "github.com/go-resty/resty/v2" "github.com/hyperledger/firefly-common/pkg/config" @@ -70,6 +71,18 @@ type cardanoWSCommandPayload struct { Topic string `json:"topic,omitempty"` } +type Location struct { + Address string `json:"address"` +} + +type cardanoInvokeContractPayload struct { + ID string `json:"id"` + From string `json:"from"` + Address string `json:"address"` + Method *fftypes.FFIMethod `json:"method"` + Params []interface{} `json:"params"` +} + func (c *Cardano) Name() string { return "cardano" } @@ -186,7 +199,41 @@ func (c *Cardano) ValidateInvokeRequest(ctx context.Context, parsedMethod interf } func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { - return true, errors.New("InvokeContract not supported") + cardanoLocation, err := c.parseContractLocation(ctx, location) + if err != nil { + return true, err + } + + methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) + if !ok || methodInfo.method == nil { + return true, i18n.NewError(ctx, coremsgs.MsgUnexpectedInterfaceType, parsedMethod) + } + method := methodInfo.method + params := make([]interface{}, 0) + for _, param := range method.Params { + params = append(params, input[param.Name]) + } + + body := map[string]interface{}{ + "id": nsOpID, + "address": cardanoLocation.Address, + "method": method, + "params": params, + } + if signingKey != "" { + body["from"] = signingKey + } + + var resErr common.BlockchainRESTError + res, err := c.client.R(). + SetContext(ctx). + SetBody(body). + SetError(&resErr). + Post("/contracts/invoke") + if err != nil || !res.IsSuccess() { + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return false, nil } func (c *Cardano) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) { @@ -200,12 +247,47 @@ func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, }, nil } +func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { + return location, nil +} + func (c *Cardano) CheckOverlappingLocations(ctx context.Context, left *fftypes.JSONAny, right *fftypes.JSONAny) (bool, error) { - return true, errors.New("CheckOverlappingLocations not supported") + if left == nil || right == nil { + // No location on either side so overlapping + return true, nil + } + + parsedLeft, err := c.parseContractLocation(ctx, left) + if err != nil { + return false, err + } + + parsedRight, err := c.parseContractLocation(ctx, right) + if err != nil { + return false, err + } + + // For cardano just compare addresses + return strings.EqualFold(parsedLeft.Address, parsedRight.Address), nil } -func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { - return nil, errors.New("NormalizeContractLocation not supported") +func (c *Cardano) parseContractLocation(ctx context.Context, location *fftypes.JSONAny) (*Location, error) { + cardanoLocation := Location{} + if err := json.Unmarshal(location.Bytes(), &cardanoLocation); err != nil { + return nil, i18n.NewError(ctx, coremsgs.MsgContractLocationInvalid, err) + } + if cardanoLocation.Address == "" { + return nil, i18n.NewError(ctx, coremsgs.MsgContractLocationInvalid, "'address' not set") + } + return &cardanoLocation, nil +} + +func (c *Cardano) encodeContractLocation(ctx context.Context, location *Location) (result *fftypes.JSONAny, err error) { + normalized, err := json.Marshal(location) + if err == nil { + result = fftypes.JSONAnyPtrBytes(normalized) + } + return result, err } func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener, lastProtocolID string) (err error) { From 2e9baf21dded53d060709edc039540b67cfd7783 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 6 Dec 2024 10:16:30 -0500 Subject: [PATCH 07/67] feat: support DeployContract Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index ed6c26f239..f3af830fd0 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -189,7 +189,21 @@ func (c *Cardano) SubmitNetworkAction(ctx context.Context, nsOpID string, signin } func (c *Cardano) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { - return true, errors.New("DeployContract not supported") + body := map[string]interface{}{ + "id": nsOpID, + "contract": contract, + "definition": definition, + } + var resErr common.BlockchainRESTError + res, err := c.client.R(). + SetContext(ctx). + SetBody(body). + SetError(&resErr). + Post("/contracts/deploy") + if err != nil || !res.IsSuccess() { + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return false, nil } func (c *Cardano) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { From 67c8b1cf08e58ae4ab16a08f5dbaff42decdbcbc Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 6 Feb 2025 17:22:11 -0500 Subject: [PATCH 08/67] fix: pass namespace to HandleReceipt Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index f3af830fd0..5d9caac9a9 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -388,7 +388,7 @@ func (c *Cardano) GetTransactionStatus(ctx context.Context, operation *core.Oper TxHash: statusResponse.GetString("transactionHash"), Message: statusResponse.GetString("errorMessage"), ProtocolID: receiptInfo.GetString("protocolId")} - err := common.HandleReceipt(ctx, c, receipt, c.callbacks) + err := common.HandleReceipt(ctx, operation.Namespace, c, receipt, c.callbacks) if err != nil { log.L(ctx).Warnf("Failed to handle receipt") } @@ -459,7 +459,7 @@ func (c *Cardano) eventLoop() { var receipt common.BlockchainReceiptNotification _ = json.Unmarshal(msgBytes, &receipt) - err := common.HandleReceipt(ctx, c, &receipt, c.callbacks) + err := common.HandleReceipt(ctx, "", c, &receipt, c.callbacks) if err != nil { l.Errorf("Failed to process receipt: %+v", msgTyped) } From ef68f8ec53a96934c3eb6292f07199df82b6c264 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 7 Feb 2025 18:40:05 -0500 Subject: [PATCH 09/67] feat: support contract listeners Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 186 ++++++++++++++++++--- internal/blockchain/cardano/eventstream.go | 70 ++++++++ 2 files changed, 236 insertions(+), 20 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 5d9caac9a9..ed841826cd 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -56,6 +56,7 @@ type Cardano struct { callbacks common.BlockchainCallbacks client *resty.Client streams *streamManager + streamID string wsconn wsclient.WSClient cardanoconnectConf config.Section subs common.FireflySubscriptions @@ -67,8 +68,10 @@ type ffiMethodAndErrors struct { } type cardanoWSCommandPayload struct { - Type string `json:"type"` - Topic string `json:"topic,omitempty"` + Type string `json:"type"` + Topic string `json:"topic,omitempty"` + BatchNumber int64 `json:"batchNumber,omitempty"` + Message string `json:"message,omitempty"` } type Location struct { @@ -136,6 +139,7 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c } log.L(c.ctx).Infof("Event stream: %s (topic=%s)", stream.ID, c.pluginTopic) + c.streamID = stream.ID go c.eventLoop() @@ -262,7 +266,11 @@ func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, } func (c *Cardano) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error) { - return location, nil + parsed, err := c.parseContractLocation(ctx, location) + if err != nil { + return nil, err + } + return c.encodeContractLocation(ctx, parsed) } func (c *Cardano) CheckOverlappingLocations(ctx context.Context, left *fftypes.JSONAny, right *fftypes.JSONAny) (bool, error) { @@ -297,6 +305,10 @@ func (c *Cardano) parseContractLocation(ctx context.Context, location *fftypes.J } func (c *Cardano) encodeContractLocation(ctx context.Context, location *Location) (result *fftypes.JSONAny, err error) { + location.Address, err = formatCardanoAddress(ctx, location.Address) + if err != nil { + return nil, err + } normalized, err := json.Marshal(location) if err == nil { result = fftypes.JSONAnyPtrBytes(normalized) @@ -305,15 +317,27 @@ func (c *Cardano) encodeContractLocation(ctx context.Context, location *Location } func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener, lastProtocolID string) (err error) { - return errors.New("AddContractListener not supported") + subName := fmt.Sprintf("ff-sub-%s-%s", listener.Namespace, listener.ID) + firstEvent := string(core.SubOptsFirstEventNewest) + if listener.Options != nil { + firstEvent = listener.Options.FirstEvent + } + + result, err := c.streams.createListener(ctx, c.streamID, subName, firstEvent, &listener.Filters) + listener.BackendID = result.ID + return err } func (c *Cardano) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error { - return errors.New("DeleteContractListener not supported") + return c.streams.deleteListener(ctx, c.streamID, subscription.BackendID) } func (c *Cardano) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (found bool, detail interface{}, status core.ContractListenerStatus, err error) { - return false, nil, core.ContractListenerStatusUnknown, errors.New("GetContractListenerStatus not supported") + l, err := c.streams.getListener(ctx, c.streamID, subID) + if err != nil || l == nil { + return false, nil, core.ContractListenerStatusUnknown, err + } + return true, nil, core.ContractListenerStatusUnknown, nil } func (c *Cardano) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error) { @@ -322,11 +346,25 @@ func (c *Cardano) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamVal } func (c *Cardano) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) (string, error) { - return "", errors.New("GenerateEventSignature not supported") + params := []string{} + for _, param := range event.Params { + params = append(params, param.Schema.JSONObject().GetString("type")) + } + return fmt.Sprintf("%s(%s)", event.Name, strings.Join(params, ",")), nil } func (c *Cardano) GenerateEventSignatureWithLocation(ctx context.Context, event *fftypes.FFIEventDefinition, location *fftypes.JSONAny) (string, error) { - return "", errors.New("GenerateEventSignatureWithLocation not supported") + eventSignature, _ := c.GenerateEventSignature(ctx, event) + + if location == nil { + return fmt.Sprintf("*:%s", eventSignature), nil + } + + parsed, err := c.parseContractLocation(ctx, location) + if err != nil { + return "", err + } + return fmt.Sprintf("%s:%s", parsed.Address, eventSignature), nil } func (c *Cardano) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string { @@ -449,19 +487,45 @@ func (c *Cardano) eventLoop() { } switch msgTyped := msgParsed.(type) { case []interface{}: - // TODO: handle this - ack, _ := json.Marshal(&cardanoWSCommandPayload{ - Type: "ack", - Topic: c.pluginTopic, - }) - err = c.wsconn.Send(ctx, ack) + err = c.handleMessageBatch(ctx, 0, msgTyped) + if err == nil { + ack, _ := json.Marshal(&cardanoWSCommandPayload{ + Type: "ack", + Topic: c.pluginTopic, + }) + err = c.wsconn.Send(ctx, ack) + } case map[string]interface{}: - var receipt common.BlockchainReceiptNotification - _ = json.Unmarshal(msgBytes, &receipt) - - err := common.HandleReceipt(ctx, "", c, &receipt, c.callbacks) - if err != nil { - l.Errorf("Failed to process receipt: %+v", msgTyped) + isBatch := false + if batchNumber, ok := msgTyped["batchNumber"].(float64); ok { + if events, ok := msgTyped["events"].([]interface{}); ok { + // FFTM delivery with a batch number to use in the ack + isBatch = true + err = c.handleMessageBatch(ctx, (int64)(batchNumber), events) + // Errors processing messages are converted into nacks + ackOrNack := &cardanoWSCommandPayload{ + Topic: c.pluginTopic, + BatchNumber: int64(batchNumber), + } + if err == nil { + ackOrNack.Type = "ack" + } else { + log.L(ctx).Errorf("Rejecting batch due error: %s", err) + ackOrNack.Type = "error" + ackOrNack.Message = err.Error() + } + b, _ := json.Marshal(&ackOrNack) + err = c.wsconn.Send(ctx, b) + } + } + if !isBatch { + var receipt common.BlockchainReceiptNotification + _ = json.Unmarshal(msgBytes, &receipt) + + err := common.HandleReceipt(ctx, "", c, &receipt, c.callbacks) + if err != nil { + l.Errorf("Failed to process receipt: %+v", msgTyped) + } } default: l.Errorf("Message unexpected: %+v", msgTyped) @@ -477,6 +541,88 @@ func (c *Cardano) eventLoop() { } } +func (c *Cardano) handleMessageBatch(ctx context.Context, batchID int64, messages []interface{}) error { + events := make(common.EventsToDispatch) + count := len(messages) + for i, msgI := range messages { + msgMap, ok := msgI.(map[string]interface{}) + if !ok { + log.L(ctx).Errorf("Message cannot be parsed as JSON: %+v", msgI) + return nil + } + msgJSON := fftypes.JSONObject(msgMap) + + signature := msgJSON.GetString("signature") + + logger := log.L(ctx) + logger.Infof("[Cardano:%d:%d/%d]: '%s'", batchID, i+1, count, signature) + logger.Tracef("Message: %+v", msgJSON) + if err := c.processContractEvent(ctx, events, msgJSON); err != nil { + return err + } + } + + // Dispatch all the events from this patch that were successfully parsed and routed to namespaces + // (could be zero - that's ok) + return c.callbacks.DispatchBlockchainEvents(ctx, events) +} + +func (c *Cardano) processContractEvent(ctx context.Context, events common.EventsToDispatch, msgJSON fftypes.JSONObject) error { + listenerID := msgJSON.GetString("listenerId") + listener, err := c.streams.getListener(ctx, c.streamID, listenerID) + if err != nil { + return err + } + namespace := common.GetNamespaceFromSubName(listener.Name) + event := c.parseBlockchainEvent(ctx, msgJSON) + if event != nil { + c.callbacks.PrepareBlockchainEvent(ctx, events, namespace, &blockchain.EventForListener{ + Event: event, + ListenerID: listenerID, + }) + } + return nil +} + +func (c *Cardano) parseBlockchainEvent(ctx context.Context, msgJSON fftypes.JSONObject) *blockchain.Event { + sBlockNumber := msgJSON.GetString("blockNumber") + sTransactionHash := msgJSON.GetString("transactionHash") + blockNumber := msgJSON.GetInt64("blockNumber") + txIndex := msgJSON.GetInt64("transactionIndex") + logIndex := msgJSON.GetInt64("logIndex") + dataJSON := msgJSON.GetObject("data") + signature := msgJSON.GetString("signature") + name := strings.SplitN(signature, "(", 2)[0] + timestampStr := msgJSON.GetString("timestamp") + timestamp, err := fftypes.ParseTimeString(timestampStr) + if err != nil { + log.L(ctx).Errorf("Blockchain event is not valid - missing timestamp: %+v", msgJSON) + return nil // move on + } + + if sBlockNumber == "" || sTransactionHash == "" { + log.L(ctx).Errorf("Blockchain event is not valid - missing data: %+v", msgJSON) + return nil // move on + } + + delete(msgJSON, "data") + return &blockchain.Event{ + BlockchainTXID: sTransactionHash, + Source: c.Name(), + Name: name, + ProtocolID: fmt.Sprintf("%.12d/%.6d/%.6d", blockNumber, txIndex, logIndex), + Output: dataJSON, + Info: msgJSON, + Timestamp: timestamp, + Location: c.buildEventLocationString(msgJSON), + Signature: signature, + } +} + +func (c *Cardano) buildEventLocationString(msgJSON fftypes.JSONObject) string { + return fmt.Sprintf("address=%s", msgJSON.GetString("address")) +} + func formatCardanoAddress(ctx context.Context, key string) (string, error) { // TODO: this could be much stricter validation if key != "" { diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go index 5696361648..8aace7bead 100644 --- a/internal/blockchain/cardano/eventstream.go +++ b/internal/blockchain/cardano/eventstream.go @@ -18,10 +18,12 @@ package cardano import ( "context" + "fmt" "github.com/go-resty/resty/v2" "github.com/hyperledger/firefly-common/pkg/ffresty" "github.com/hyperledger/firefly/internal/coremsgs" + "github.com/hyperledger/firefly/pkg/core" ) type streamManager struct { @@ -40,6 +42,20 @@ type eventStream struct { Timestamps bool `json:"timestamps"` } +type listener struct { + ID string `json:"id"` + Name string `json:"name,omitempty"` +} + +type filter struct { + Event eventfilter `json:"event"` +} + +type eventfilter struct { + Contract string `json:"contract"` + EventPath string `json:"eventPath"` +} + func newStreamManager(client *resty.Client, batchSize, batchTimeout uint) *streamManager { return &streamManager{ client: client, @@ -112,3 +128,57 @@ func (s *streamManager) ensureEventStream(ctx context.Context, topic string) (*e } return s.createEventStream(ctx, topic) } + +func (s *streamManager) getListener(ctx context.Context, streamID string, listenerID string) (listener *listener, err error) { + res, err := s.client.R(). + SetContext(ctx). + SetResult(&listener). + Get(fmt.Sprintf("/eventstreams/%s/listeners/%s", streamID, listenerID)) + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return listener, nil +} + +func (s *streamManager) createListener(ctx context.Context, streamID, name, lastEvent string, filters *core.ListenerFilters) (listener *listener, err error) { + cardanoFilters := []filter{} + for _, f := range *filters { + address := f.Location.JSONObject().GetString("address") + cardanoFilters = append(cardanoFilters, filter{ + Event: eventfilter{ + Contract: address, + EventPath: f.Event.Name, + }, + }) + } + + body := map[string]interface{}{ + "name": name, + "type": "events", + "fromBlock": lastEvent, + "filters": cardanoFilters, + } + + res, err := s.client.R(). + SetContext(ctx). + SetBody(body). + SetResult(&listener). + Post(fmt.Sprintf("/eventstreams/%s/listeners", streamID)) + + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + + return listener, nil +} + +func (s *streamManager) deleteListener(ctx context.Context, streamID, listenerID string) error { + res, err := s.client.R(). + SetContext(ctx). + Delete(fmt.Sprintf("/eventstreams/%s/listeners/%s", streamID, listenerID)) + + if err != nil || !res.IsSuccess() { + return ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + return nil +} From 89c1a24f3525959ccaa52bcb75449f9ab80ba46f Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 7 Feb 2025 19:04:13 -0500 Subject: [PATCH 10/67] fix: correct linter error Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index ed841826cd..0af5a9b239 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -78,14 +78,6 @@ type Location struct { Address string `json:"address"` } -type cardanoInvokeContractPayload struct { - ID string `json:"id"` - From string `json:"from"` - Address string `json:"address"` - Method *fftypes.FFIMethod `json:"method"` - Params []interface{} `json:"params"` -} - func (c *Cardano) Name() string { return "cardano" } From 1e5f445b19079dbcb099a1f2a5529888d2f19036 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 7 Feb 2025 19:16:06 -0500 Subject: [PATCH 11/67] fix: correct image paths Signed-off-by: Simon Gellis --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a62e223368..4fde46e6ad 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { "cardanoconnect": { - "image": "sundaeswap/firefly-cardanoconnect", + "image": "hyperledger/firefly-cardanoconnect", "tag": "main" }, "cardanosigner": { - "image": "sundaeswap/firefly-cardanosigner", + "image": "hyperledger/firefly-cardanosigner", "tag": "main" }, "ethconnect": { From a95c7aff3ea6369ffec978af8ca83b8d50c08add Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 7 Feb 2025 19:24:11 -0500 Subject: [PATCH 12/67] fix: correct copyright year Signed-off-by: Simon Gellis --- internal/blockchain/bifactory/factory.go | 2 +- internal/blockchain/cardano/cardano.go | 2 +- internal/blockchain/cardano/config.go | 2 +- internal/blockchain/cardano/eventstream.go | 2 +- internal/coremsgs/en_error_messages.go | 2 +- internal/networkmap/did.go | 2 +- pkg/core/verifier.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/blockchain/bifactory/factory.go b/internal/blockchain/bifactory/factory.go index 40a835ca5e..a26cbb1bb4 100644 --- a/internal/blockchain/bifactory/factory.go +++ b/internal/blockchain/bifactory/factory.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 0af5a9b239..69c33f12ca 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/config.go b/internal/blockchain/cardano/config.go index d7e4a1ee95..445a226cd3 100644 --- a/internal/blockchain/cardano/config.go +++ b/internal/blockchain/cardano/config.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go index 8aace7bead..63e081344e 100644 --- a/internal/blockchain/cardano/eventstream.go +++ b/internal/blockchain/cardano/eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/coremsgs/en_error_messages.go b/internal/coremsgs/en_error_messages.go index 0416ca661b..6811a05027 100644 --- a/internal/coremsgs/en_error_messages.go +++ b/internal/coremsgs/en_error_messages.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/networkmap/did.go b/internal/networkmap/did.go index 544a9aa2f4..0b4e829f7e 100644 --- a/internal/networkmap/did.go +++ b/internal/networkmap/did.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/core/verifier.go b/pkg/core/verifier.go index 5d2387a82d..5af0ca010a 100644 --- a/pkg/core/verifier.go +++ b/pkg/core/verifier.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // From 07f4dbde2cde05ff9c15a3526ea0f4924414459d Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 7 Feb 2025 19:36:52 -0500 Subject: [PATCH 13/67] fix: fix documentation Signed-off-by: Simon Gellis --- doc-site/docs/reference/config.md | 76 +++++++++++++++++++++ doc-site/docs/reference/types/verifier.md | 2 +- doc-site/docs/swagger/swagger.yaml | 18 +++++ internal/coremsgs/en_config_descriptions.go | 7 +- 4 files changed, 101 insertions(+), 2 deletions(-) diff --git a/doc-site/docs/reference/config.md b/doc-site/docs/reference/config.md index 89c794f420..6ff2294da0 100644 --- a/doc-site/docs/reference/config.md +++ b/doc-site/docs/reference/config.md @@ -596,6 +596,82 @@ title: Configuration Reference |name|The name of the configured Blockchain plugin|`string`|`` |type|The type of the configured Blockchain Connector plugin|`string`|`` +## plugins.blockchain[].cardano.cardanoconnect + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|batchSize|The number of events Cardanoconnect should batch together for delivery to FireFly core. Only applies when automatically creating a new event stream|`int`|`50` +|batchTimeout|How long Cardanoconnect should wait for new events to arrive and fill a batch, before sending the batch to FireFly core. Only applies when automatically creating a new event stream|[`time.Duration`](https://pkg.go.dev/time#Duration)|`500` +|connectionTimeout|The maximum amount of time that a connection is allowed to remain with no data transmitted|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` +|expectContinueTimeout|See [ExpectContinueTimeout in the Go docs](https://pkg.go.dev/net/http#Transport)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`1s` +|headers|Adds custom headers to HTTP requests|`map[string]string`|`` +|idleTimeout|The max duration to hold a HTTP keepalive connection between calls|[`time.Duration`](https://pkg.go.dev/time#Duration)|`475ms` +|maxConnsPerHost|The max number of connections, per unique hostname. Zero means no limit|`int`|`0` +|maxIdleConns|The max number of idle connections to hold pooled|`int`|`100` +|maxIdleConnsPerHost|The max number of idle connections, per unique hostname. Zero means net/http uses the default of only 2.|`int`|`100` +|passthroughHeadersEnabled|Enable passing through the set of allowed HTTP request headers|`boolean`|`false` +|requestTimeout|The maximum amount of time that a request is allowed to remain open|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` +|tlsHandshakeTimeout|The maximum amount of time to wait for a successful TLS handshake|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s` +|topic|The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single cardanoconnect|`string`|`` +|url|The URL of the Cardanoconnect instance|URL `string`|`` + +## plugins.blockchain[].cardano.cardanoconnect.auth + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|password|Password|`string`|`` +|username|Username|`string`|`` + +## plugins.blockchain[].cardano.cardanoconnect.proxy + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|url|Optional HTTP proxy server to connect through|`string`|`` + +## plugins.blockchain[].cardano.cardanoconnect.retry + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|count|The maximum number of times to retry|`int`|`5` +|enabled|Enables retries|`boolean`|`false` +|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` +|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` + +## plugins.blockchain[].cardano.cardanoconnect.throttle + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|burst|The maximum number of requests that can be made in a short period of time before the throttling kicks in.|`int`|`` +|requestsPerSecond|The average rate at which requests are allowed to pass through over time.|`int`|`` + +## plugins.blockchain[].cardano.cardanoconnect.tls + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|ca|The TLS certificate authority in PEM format (this option is ignored if caFile is also set)|`string`|`` +|caFile|The path to the CA file for TLS on this API|`string`|`` +|cert|The TLS certificate in PEM format (this option is ignored if certFile is also set)|`string`|`` +|certFile|The path to the certificate file for TLS on this API|`string`|`` +|clientAuth|Enables or disables client auth for TLS on this API|`string`|`` +|enabled|Enables or disables TLS on this API|`boolean`|`false` +|insecureSkipHostVerify|When to true in unit test development environments to disable TLS verification. Use with extreme caution|`boolean`|`` +|key|The TLS certificate key in PEM format (this option is ignored if keyFile is also set)|`string`|`` +|keyFile|The path to the private key file for TLS on this API|`string`|`` +|requiredDNAttributes|A set of required subject DN attributes. Each entry is a regular expression, and the subject certificate must have a matching attribute of the specified type (CN, C, O, OU, ST, L, STREET, POSTALCODE, SERIALNUMBER are valid attributes)|`map[string]string`|`` + +## plugins.blockchain[].cardano.cardanoconnect.ws + +|Key|Description|Type|Default Value| +|---|-----------|----|-------------| +|connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` +|heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` +|initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` +|path|The WebSocket sever URL to which FireFly should connect|WebSocket URL `string`|`` +|readBufferSize|The size in bytes of the read buffer for the WebSocket connection|[`BytesSize`](https://pkg.go.dev/github.com/docker/go-units#BytesSize)|`16Kb` +|url|URL to use for WebSocket - overrides url one level up (in the HTTP config)|`string`|`` +|writeBufferSize|The size in bytes of the write buffer for the WebSocket connection|[`BytesSize`](https://pkg.go.dev/github.com/docker/go-units#BytesSize)|`16Kb` + ## plugins.blockchain[].ethereum.addressResolver |Key|Description|Type|Default Value| diff --git a/doc-site/docs/reference/types/verifier.md b/doc-site/docs/reference/types/verifier.md index 09e7975b83..6c901f3063 100644 --- a/doc-site/docs/reference/types/verifier.md +++ b/doc-site/docs/reference/types/verifier.md @@ -22,7 +22,7 @@ title: Verifier | `hash` | Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network | `Bytes32` | | `identity` | The UUID of the parent identity that has claimed this verifier | [`UUID`](simpletypes.md#uuid) | | `namespace` | The namespace of the verifier | `string` | -| `type` | The type of the verifier | `FFEnum`:
`"ethereum_address"`
`"tezos_address"`
`"fabric_msp_id"`
`"dx_peer_id"` | +| `type` | The type of the verifier | `FFEnum`:
`"cardano_address"`
`"ethereum_address"`
`"tezos_address"`
`"fabric_msp_id"`
`"dx_peer_id"` | | `value` | The verifier string, such as an Ethereum address, or Fabric MSP identifier | `string` | | `created` | The time this verifier was created on this node | [`FFTime`](simpletypes.md#fftime) | diff --git a/doc-site/docs/swagger/swagger.yaml b/doc-site/docs/swagger/swagger.yaml index 60a2e7b24d..d209ff6e33 100644 --- a/doc-site/docs/swagger/swagger.yaml +++ b/doc-site/docs/swagger/swagger.yaml @@ -9396,6 +9396,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -10098,6 +10099,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -22859,6 +22861,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -23596,6 +23599,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -26379,6 +26383,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -26514,6 +26519,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -28617,6 +28623,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35331,6 +35338,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35400,6 +35408,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35442,6 +35451,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35461,6 +35471,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35792,6 +35803,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -35920,6 +35932,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -37925,6 +37938,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -44421,6 +44435,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -44483,6 +44498,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -44518,6 +44534,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id @@ -44537,6 +44554,7 @@ paths: type: description: The type of the verifier enum: + - cardano_address - ethereum_address - tezos_address - fabric_msp_id diff --git a/internal/coremsgs/en_config_descriptions.go b/internal/coremsgs/en_config_descriptions.go index 1015b75710..72f538f099 100644 --- a/internal/coremsgs/en_config_descriptions.go +++ b/internal/coremsgs/en_config_descriptions.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -195,6 +195,11 @@ var ( ConfigPluginBlockchainTezosAddressResolverURL = ffc("config.plugins.blockchain[].tezos.addressResolver.url", "The URL of the Address Resolver", i18n.StringType) ConfigPluginBlockchainTezosAddressResolverURLTemplate = ffc("config.plugins.blockchain[].tezos.addressResolver.urlTemplate", "The URL Go template string to use when calling the Address Resolver. The template input contains '.Key' and '.Intent' string variables.", i18n.GoTemplateType) + ConfigPluginBlockchainCardanoCardanoconnectBatchSize = ffc("config.plugins.blockchain[].cardano.cardanoconnect.batchSize", "The number of events Cardanoconnect should batch together for delivery to FireFly core. Only applies when automatically creating a new event stream", i18n.IntType) + ConfigPluginBlockchainCardanoCardanoconnectBatchTimeout = ffc("config.plugins.blockchain[].cardano.cardanoconnect.batchTimeout", "How long Cardanoconnect should wait for new events to arrive and fill a batch, before sending the batch to FireFly core. Only applies when automatically creating a new event stream", i18n.TimeDurationType) + ConfigPluginBlockchainCardanoCardanoconnectTopic = ffc("config.plugins.blockchain[].cardano.cardanoconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single cardanoconnect", i18n.StringType) + ConfigPluginBlockchainCardanoCardanoconnectURL = ffc("config.plugins.blockchain[].cardano.cardanoconnect.url", "The URL of the Cardanoconnect instance", urlStringType) + ConfigPluginBlockchainTezosTezosconnectBackgroundStart = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.enabled", "Start the Tezosconnect plugin in the background and enter retry loop if failed to start", i18n.BooleanType) ConfigPluginBlockchainTezosTezosconnectBackgroundStartInitialDelay = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the tezos plugin", i18n.TimeDurationType) ConfigPluginBlockchainTezosTezosconnectBackgroundStartMaxDelay = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.maxDelay", "Max delay between restarts in the case where we retry to restart the tezos plugin", i18n.TimeDurationType) From dba31c7c0a9e118ef07a1bbb7dc19d4e4d3dde82 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 10 Feb 2025 17:07:10 -0500 Subject: [PATCH 14/67] test: add coverage Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 55 +- internal/blockchain/cardano/cardano_test.go | 1504 +++++++++++++++++++ internal/blockchain/cardano/eventstream.go | 55 +- internal/networkmap/did_test.go | 17 + 4 files changed, 1605 insertions(+), 26 deletions(-) create mode 100644 internal/blockchain/cardano/cardano_test.go diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 69c33f12ca..f9fa9d8927 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -21,6 +21,7 @@ import ( "encoding/json" "errors" "fmt" + "regexp" "strings" "github.com/go-resty/resty/v2" @@ -57,6 +58,7 @@ type Cardano struct { client *resty.Client streams *streamManager streamID string + closed chan struct{} wsconn wsclient.WSClient cardanoconnectConf config.Section subs common.FireflySubscriptions @@ -78,6 +80,8 @@ type Location struct { Address string `json:"address"` } +var addressVerify = regexp.MustCompile("^addr1|^addr_test1|^stake1|^stake_test1") + func (c *Cardano) Name() string { return "cardano" } @@ -133,6 +137,7 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c log.L(c.ctx).Infof("Event stream: %s (topic=%s)", stream.ID, c.pluginTopic) c.streamID = stream.ID + c.closed = make(chan struct{}) go c.eventLoop() return c.wsconn.Connect() @@ -161,7 +166,20 @@ func (c *Cardano) Capabilities() *blockchain.Capabilities { } func (c *Cardano) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract, lastProtocolID string) (string, error) { - return "", errors.New("AddFireflySubscription not supported") + location, err := c.parseContractLocation(ctx, contract.Location) + if err != nil { + return "", err + } + + version, _ := c.GetNetworkVersion(ctx, contract.Location) + + l, err := c.streams.ensureFireFlyListener(ctx, namespace.Name, version, location.Address, contract.FirstEvent, c.streamID) + if err != nil { + return "", err + } + + c.subs.AddSubscription(ctx, namespace, version, l.ID, nil) + return l.ID, nil } func (c *Cardano) RemoveFireflySubscription(ctx context.Context, subID string) { @@ -215,7 +233,7 @@ func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey } methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) - if !ok || methodInfo.method == nil { + if !ok || methodInfo.method == nil || methodInfo.method.Name == "" { return true, i18n.NewError(ctx, coremsgs.MsgUnexpectedInterfaceType, parsedMethod) } method := methodInfo.method @@ -296,11 +314,7 @@ func (c *Cardano) parseContractLocation(ctx context.Context, location *fftypes.J return &cardanoLocation, nil } -func (c *Cardano) encodeContractLocation(ctx context.Context, location *Location) (result *fftypes.JSONAny, err error) { - location.Address, err = formatCardanoAddress(ctx, location.Address) - if err != nil { - return nil, err - } +func (c *Cardano) encodeContractLocation(_ context.Context, location *Location) (result *fftypes.JSONAny, err error) { normalized, err := json.Marshal(location) if err == nil { result = fftypes.JSONAnyPtrBytes(normalized) @@ -315,7 +329,21 @@ func (c *Cardano) AddContractListener(ctx context.Context, listener *core.Contra firstEvent = listener.Options.FirstEvent } - result, err := c.streams.createListener(ctx, c.streamID, subName, firstEvent, &listener.Filters) + filters := make([]filter, len(listener.Filters)) + for _, f := range listener.Filters { + location, err := c.parseContractLocation(ctx, f.Location) + if err != nil { + return err + } + filters = append(filters, filter{ + eventfilter{ + Contract: location.Address, + EventPath: f.Event.Name, + }, + }) + } + + result, err := c.streams.createListener(ctx, c.streamID, subName, firstEvent, filters) listener.BackendID = result.ID return err } @@ -325,7 +353,7 @@ func (c *Cardano) DeleteContractListener(ctx context.Context, subscription *core } func (c *Cardano) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (found bool, detail interface{}, status core.ContractListenerStatus, err error) { - l, err := c.streams.getListener(ctx, c.streamID, subID) + l, err := c.streams.getListener(ctx, c.streamID, subID, okNotFound) if err != nil || l == nil { return false, nil, core.ContractListenerStatusUnknown, err } @@ -449,7 +477,7 @@ func (c *Cardano) afterConnect(ctx context.Context, w wsclient.WSClient) error { func (c *Cardano) recoverFFI(ctx context.Context, parsedMethod interface{}) (*fftypes.FFIMethod, []*fftypes.FFIError, error) { methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) - if !ok || methodInfo.method == nil { + if !ok || methodInfo.method == nil || methodInfo.method.Name == "" { return nil, nil, i18n.NewError(ctx, coremsgs.MsgUnexpectedInterfaceType, parsedMethod) } return methodInfo.method, methodInfo.errors, nil @@ -457,6 +485,7 @@ func (c *Cardano) recoverFFI(ctx context.Context, parsedMethod interface{}) (*ff func (c *Cardano) eventLoop() { defer c.wsconn.Close() + defer close(c.closed) l := log.L(c.ctx).WithField("role", "event-loop") ctx := log.WithLogger(c.ctx, l) for { @@ -561,7 +590,7 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, batchID int64, message func (c *Cardano) processContractEvent(ctx context.Context, events common.EventsToDispatch, msgJSON fftypes.JSONObject) error { listenerID := msgJSON.GetString("listenerId") - listener, err := c.streams.getListener(ctx, c.streamID, listenerID) + listener, err := c.streams.getListener(ctx, c.streamID, listenerID, false) if err != nil { return err } @@ -616,8 +645,8 @@ func (c *Cardano) buildEventLocationString(msgJSON fftypes.JSONObject) string { } func formatCardanoAddress(ctx context.Context, key string) (string, error) { - // TODO: this could be much stricter validation - if key != "" { + // TODO: could check for valid bech32, instead of just a conventional HRP + if addressVerify.MatchString(key) { return key, nil } return "", i18n.NewError(ctx, coremsgs.MsgInvalidCardanoAddress) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go new file mode 100644 index 0000000000..9599a6137b --- /dev/null +++ b/internal/blockchain/cardano/cardano_test.go @@ -0,0 +1,1504 @@ +// Copyright © 2024 Kaleido, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cardano + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "testing" + + "github.com/go-resty/resty/v2" + "github.com/hyperledger/firefly-common/pkg/config" + "github.com/hyperledger/firefly-common/pkg/ffresty" + "github.com/hyperledger/firefly-common/pkg/fftls" + "github.com/hyperledger/firefly-common/pkg/fftypes" + "github.com/hyperledger/firefly-common/pkg/wsclient" + "github.com/hyperledger/firefly/internal/blockchain/common" + "github.com/hyperledger/firefly/internal/coreconfig" + "github.com/hyperledger/firefly/mocks/blockchainmocks" + "github.com/hyperledger/firefly/mocks/cachemocks" + "github.com/hyperledger/firefly/mocks/coremocks" + "github.com/hyperledger/firefly/mocks/wsmocks" + "github.com/hyperledger/firefly/pkg/blockchain" + "github.com/hyperledger/firefly/pkg/core" + "github.com/jarcoal/httpmock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var utConfig = config.RootSection("cardano_unit_tests") +var utCardanoconnectConf = utConfig.SubSection(CardanoconnectConfigKey) + +func testFFIMethod() *fftypes.FFIMethod { + return &fftypes.FFIMethod{ + Name: "testFunc", + Params: []*fftypes.FFIParam{ + { + Name: "varString", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } +} + +func resetConf(c *Cardano) { + coreconfig.Reset() + c.InitConfig(utConfig) +} + +func newTestCardano() (*Cardano, func()) { + ctx, cancel := context.WithCancel(context.Background()) + c := &Cardano{ + ctx: ctx, + cancelCtx: cancel, + callbacks: common.NewBlockchainCallbacks(), + client: resty.New().SetBaseURL("http://localhost:12345"), + pluginTopic: "topic1", + wsconn: &wsmocks.WSClient{}, + } + return c, func() { + cancel() + if c.closed != nil { + // We've init'd, wait to close + <-c.closed + } + } +} + +func TestInitMissingURL(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + cmi := &cachemocks.Manager{} + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, cmi) + assert.Regexp(t, "FF10138.*url", err) +} + +func TestBadTLSConfig(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "http://localhost:12345") + + tlsConf := utCardanoconnectConf.SubSection("tls") + tlsConf.Set(fftls.HTTPConfTLSEnabled, true) + tlsConf.Set(fftls.HTTPConfTLSCAFile, "!!!!!badness") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF00153", err) +} + +func TestInitMissingTopic(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "http://localhost:12345") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF10138.*topic", err) +} + +func TestInitWithCardanoConnect(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, fromServer, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{})) + httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345"})) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + assert.Equal(t, "cardano", c.Name()) + assert.Equal(t, core.VerifierTypeCardanoAddress, c.VerifierType()) + + assert.Equal(t, 2, httpmock.GetTotalCallCount()) + assert.Equal(t, "es12345", c.streamID) + assert.NotNil(t, c.Capabilities()) + + startupMessage := <-toServer + assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + startupMessage = <-toServer + assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) + fromServer <- `{"bad":"receipt"}` // will be ignored - no ack + fromServer <- `[]` // empty batch, will be ignored, but acked + reply := <-toServer + assert.Equal(t, `{"type":"ack","topic":"topic1"}`, reply) + fromServer <- `["different kind of bad batch"]` + fromServer <- `[{}]` // bad batch + + // Bad data will be ignored + fromServer <- `!json` + fromServer <- `{"not": "a reply"}` + fromServer <- `42` +} + +func TestInitWSFail(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "!!!://") + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF00149", err) +} + +func TestStreamQueryError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams", + httpmock.NewStringResponder(500, `pop`)) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "http://localhost:12345") + utCardanoconnectConf.Set(ffresty.HTTPConfigRetryEnabled, false) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF10282.*pop", err) +} + +func TestStreamCreateError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams", + httpmock.NewJsonResponderOrPanic(200, []eventStream{})) + httpmock.RegisterResponder("POST", "http://localhost:12345/eventstreams", + httpmock.NewStringResponder(500, "pop")) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "http://localhost:12345") + utCardanoconnectConf.Set(ffresty.HTTPConfigRetryEnabled, false) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF10282.*pop", err) +} + +func TestStreamUpdateError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams", + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1"}})) + httpmock.RegisterResponder("PATCH", "http://localhost:12345/eventstreams/es12345", + httpmock.NewStringResponder(500, "pop")) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, "http://localhost:12345") + utCardanoconnectConf.Set(ffresty.HTTPConfigRetryEnabled, false) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.Regexp(t, "FF10282.*pop", err) +} + +func TestStartNamespace(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + err := c.StartNamespace(context.Background(), "ns1") + assert.NoError(t, err) +} + +func TestStopNamespace(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + err := c.StopNamespace(context.Background(), "ns1") + assert.NoError(t, err) +} + +func TestVerifyCardanoAddress(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + _, err := c.ResolveSigningKey(context.Background(), "", blockchain.ResolveKeyIntentSign) + assert.Regexp(t, "FF10354", err) + + _, err = c.ResolveSigningKey(context.Background(), "baddr1cafed00d", blockchain.ResolveKeyIntentSign) + assert.Regexp(t, "FF10140", err) + + key, err := c.ResolveSigningKey(context.Background(), "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x", blockchain.ResolveKeyIntentSign) + assert.NoError(t, err) + assert.Equal(t, "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x", key) + + key, err = c.ResolveSigningKey(context.Background(), "addr_test1vqeux7xwusdju9dvsj8h7mca9aup2k439kfmwy773xxc2hcu7zy99", blockchain.ResolveKeyIntentSign) + assert.NoError(t, err) + assert.Equal(t, "addr_test1vqeux7xwusdju9dvsj8h7mca9aup2k439kfmwy773xxc2hcu7zy99", key) +} + +func TestEventLoopContextCancelled(t *testing.T) { + c, cancel := newTestCardano() + cancel() + r := make(<-chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return(r) + wsm.On("Close").Return() + c.closed = make(chan struct{}) + c.eventLoop() + wsm.AssertExpectations(t) +} + +func TestEventLoopReceiveClosed(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + r := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + close(r) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Close").Return() + c.closed = make(chan struct{}) + c.eventLoop() + wsm.AssertExpectations(t) +} + +func TestEventLoopSendFailed(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + r := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Close").Return() + wsm.On("Send", mock.Anything, mock.Anything).Return(errors.New("Send error")) + c.closed = make(chan struct{}) + + go c.eventLoop() + r <- []byte(`{"batchNumber":9001,"events":["none"]}`) + <-c.closed +} + +func TestEventLoopBadMessage(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + r := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Close").Return() + c.closed = make(chan struct{}) + + go c.eventLoop() + r <- []byte(`!badjson`) // ignored bad json + r <- []byte(`"not an object"`) // ignored wrong type +} + +func TestEventLoopReceiveBatch(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/lst12345", + httpmock.NewJsonResponderOrPanic(200, listener{ID: "lst12345", Name: "ff-sub-default-12345"})) + + r := make(chan []byte) + s := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + bytes, _ := args.Get(1).([]byte) + s <- bytes + }).Return(nil) + wsm.On("Close").Return() + c.streamID = "es12345" + c.closed = make(chan struct{}) + + client := resty.NewWithClient(mockedClient) + client.SetBaseURL("http://localhost:12345") + c.streams = &streamManager{ + client: client, + batchSize: 500, + batchTimeout: 10000, + } + + data := []byte(`{ + "batchNumber": 1337, + "events": [ + { + "listenerId": "lst12345", + "blockHash": "fcb0504f47abf2cc52cd6d509036d512fd6cbec19d0e1bbaaf21f0699882de7b", + "blockNumber": 11466734, + "signature": "TransactionFinalized(string)", + "timestamp": "2025-02-10T12:00:00.000000000+00:00", + "transactionIndex": 0, + "transactionHash": "cc76904959438e05aaa83078bbdc81af5685a8e28ea4fcfcfd741df7df1e596d", + "logIndex": 0, + "data": { + "transactionId": "bdae5f48cd7eec76938f62c648a1972907e24b4abb374b64609710792959e4fa" + } + } + ] + }`) + + em := &blockchainmocks.Callbacks{} + c.SetHandler("default", em) + em.On("BlockchainEventBatch", mock.MatchedBy(func(events []*blockchain.EventToDispatch) bool { + return len(events) == 1 && + events[0].Type == blockchain.EventTypeForListener && + events[0].ForListener.ListenerID == "lst12345" + })).Return(nil) + + go c.eventLoop() + + r <- data + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, int64(1337), parsed.BatchNumber) + assert.Equal(t, "ack", parsed.Type) +} + +func TestEventLoopReceiveBadBatch(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/lst12345", + httpmock.NewJsonResponderOrPanic(200, listener{ID: "lst12345", Name: "ff-sub-default-12345"})) + client := resty.NewWithClient(mockedClient) + client.SetBaseURL("http://localhost:12345") + c.streams = &streamManager{ + client: client, + batchSize: 500, + batchTimeout: 10000, + } + + r := make(chan []byte) + s := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + bytes, _ := args.Get(1).([]byte) + s <- bytes + }).Return(nil) + wsm.On("Close").Return() + c.streamID = "es12345" + c.closed = make(chan struct{}) + + data := []byte(`{ + "batchNumber": 1337, + "events": [ + { + "listenerId": "lst12345", + "blockHash": "fcb0504f47abf2cc52cd6d509036d512fd6cbec19d0e1bbaaf21f0699882de7b", + "blockNumber": 11466734, + "signature": "TransactionFinalized(string)", + "timestamp": "2025-02-10T12:00:00.000000000+00:00", + "transactionIndex": 0, + "transactionHash": "cc76904959438e05aaa83078bbdc81af5685a8e28ea4fcfcfd741df7df1e596d", + "logIndex": 0, + "data": { + "transactionId": "bdae5f48cd7eec76938f62c648a1972907e24b4abb374b64609710792959e4fa" + } + } + ] + }`) + + em := &blockchainmocks.Callbacks{} + c.SetHandler("default", em) + em.On("BlockchainEventBatch", mock.MatchedBy(func(events []*blockchain.EventToDispatch) bool { + return len(events) == 1 && + events[0].Type == blockchain.EventTypeForListener && + events[0].ForListener.ListenerID == "lst12345" + })).Return(errors.New("My Error Message")) + + go c.eventLoop() + + r <- data + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, int64(1337), parsed.BatchNumber) + assert.Equal(t, "error", parsed.Type) + assert.Equal(t, "My Error Message", parsed.Message) +} + +func TestEventLoopReceiveMalformedBatch(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/lst12345", + httpmock.NewJsonResponderOrPanic(200, listener{ID: "lst12345", Name: "ff-sub-default-12345"})) + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/", + httpmock.NewStringResponder(404, "Not Found")) + client := resty.NewWithClient(mockedClient) + client.SetBaseURL("http://localhost:12345") + c.streams = &streamManager{ + client: client, + batchSize: 500, + batchTimeout: 10000, + } + + r := make(chan []byte) + s := make(chan []byte) + wsm := c.wsconn.(*wsmocks.WSClient) + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + bytes, _ := args.Get(1).([]byte) + s <- bytes + }).Return(nil) + wsm.On("Close").Return() + c.streamID = "es12345" + c.closed = make(chan struct{}) + + go c.eventLoop() + + r <- []byte(`{ + "batchNumber": 1337, + "events": [{}] + }`) + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, int64(1337), parsed.BatchNumber) + assert.Equal(t, "error", parsed.Type) + assert.Regexp(t, "FF10282.*Not Found", parsed.Message) + + r <- []byte(`{ + "batchNumber": 1338, + "events": [ + { + "listenerId": "lst12345", + "blockNumber": 1337, + "transactionHash": "cafed00d" + }, + { + "listenerId": "lst12345", + "blockNumber": 1337, + "timestamp": "2025-02-10T12:00:00.000000000+00:00" + }, + { + "listenerId": "lst12345", + "timestamp": "2025-02-10T12:00:00.000000000+00:00", + "transactionHash": "cafed00d" + } + ] + }`) + response = <-s + err = json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, int64(1338), parsed.BatchNumber) + assert.Equal(t, "ack", parsed.Type) +} +func TestSubmitBatchPinNotSupported(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + err := c.SubmitBatchPin(c.ctx, "", "", "", nil, nil) + assert.Regexp(t, "SubmitBatchPin not supported", err) +} + +func TestAddContractListener(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + sub := &core.ContractListener{ + Filters: []*core.ListenerFilter{ + { + Event: &core.FFISerializedEvent{ + FFIEventDefinition: fftypes.FFIEventDefinition{ + Name: "Changed", + }, + }, + Location: fftypes.JSONAnyPtr(fftypes.JSONObject{ + "address": "submit-tx", + }.String()), + }, + }, + Options: &core.ContractListenerOptions{ + FirstEvent: string(core.SubOptsFirstEventOldest), + }, + } + + httpmock.RegisterResponder("POST", "http://localhost:12345/eventstreams/es-1/listeners", + httpmock.NewJsonResponderOrPanic(200, &listener{ID: "new-id"})) + + err := c.AddContractListener(context.Background(), sub, "") + assert.NoError(t, err) + assert.Equal(t, "new-id", sub.BackendID) +} + +func TestAddContractListenerBadLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + sub := &core.ContractListener{ + Filters: []*core.ListenerFilter{ + { + Event: &core.FFISerializedEvent{ + FFIEventDefinition: fftypes.FFIEventDefinition{ + Name: "Changed", + }, + }, + Location: fftypes.JSONAnyPtr("42"), + }, + }, + Options: &core.ContractListenerOptions{ + FirstEvent: string(core.SubOptsFirstEventOldest), + }, + } + + httpmock.RegisterResponder("POST", "http://localhost:12345/eventstreams/es-1/listeners", + httpmock.NewJsonResponderOrPanic(200, &listener{ID: "new-id"})) + + err := c.AddContractListener(context.Background(), sub, "") + assert.Regexp(t, "10310", err) +} + +func TestDeleteContractListener(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + sub := &core.ContractListener{ + BackendID: "sb-1", + } + + httpmock.RegisterResponder("DELETE", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, + httpmock.NewStringResponder(204, "")) + + err := c.DeleteContractListener(context.Background(), sub, true) + assert.NoError(t, err) +} + +func TestDeleteContractListenerFail(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + sub := &core.ContractListener{ + BackendID: "sb-1", + } + + httpmock.RegisterResponder("DELETE", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, + httpmock.NewStringResponder(500, "oops")) + + err := c.DeleteContractListener(context.Background(), sub, true) + assert.Regexp(t, "FF10282", err) +} + +func TestGetContractListenerStatus(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, + httpmock.NewJsonResponderOrPanic(200, &listener{ID: "sb-1", Name: "something"})) + + found, _, status, err := c.GetContractListenerStatus(context.Background(), "ns1", "sb-1", true) + assert.NoError(t, err) + assert.Equal(t, core.ContractListenerStatusUnknown, status) + assert.True(t, found) +} + +func TestGetContractListenerStatusNotFound(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, + httpmock.NewStringResponder(404, "no")) + + found, _, status, err := c.GetContractListenerStatus(context.Background(), "ns1", "sb-1", true) + assert.NoError(t, err) + assert.Equal(t, core.ContractListenerStatusUnknown, status) + assert.False(t, found) +} + +func TestGetContractListenerErrorNotFound(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + c.streamID = "es-1" + c.streams = &streamManager{ + client: c.client, + } + + httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, + httpmock.NewStringResponder(404, "no")) + + _, _, _, err := c.GetContractListenerStatus(context.Background(), "ns1", "sb-1", false) + assert.Regexp(t, "FF10282", err) +} + +func TestGetTransactionStatusSuccess(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + func(req *http.Request) (*http.Response, error) { + transactionStatus := make(map[string]interface{}) + transactionStatus["id"] = "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" + transactionStatus["status"] = "Succeeded" + transactionStatus["transactionHash"] = "txHash" + return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) + }) + + tm := &coremocks.OperationCallbacks{} + c.SetOperationHandler("ns1", tm) + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && + update.Status == core.OpStatusSucceeded && + update.BlockchainTXID == "txHash" && + update.Plugin == "cardano" + })).Return(errors.New("won't stop processing")) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.NotNil(t, status) + tm.AssertExpectations(t) +} + +func TestGetTransactionStatusFailure(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + func(req *http.Request) (*http.Response, error) { + transactionStatus := make(map[string]interface{}) + transactionStatus["id"] = "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" + transactionStatus["status"] = "Failed" + transactionStatus["errorMessage"] = "Something went wrong" + return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) + }) + + tm := &coremocks.OperationCallbacks{} + c.SetOperationHandler("ns1", tm) + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && + update.Status == core.OpStatusFailed && + update.ErrorMessage == "Something went wrong" && + update.Plugin == "cardano" + })).Return(errors.New("won't stop processing")) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.NotNil(t, status) + tm.AssertExpectations(t) +} + +func TestGetTransactionStatusEmptyObject(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + func(req *http.Request) (*http.Response, error) { + transactionStatus := make(map[string]interface{}) + return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) + }) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.NotNil(t, status) +} + +func TestGetTransactionStatusNotFound(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + httpmock.NewStringResponder(404, "nah")) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.Nil(t, status) +} + +func TestGetTransactionStatusError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + httpmock.NewStringResponder(500, "uh oh")) + + _, err := c.GetTransactionStatus(context.Background(), op) + assert.Regexp(t, "FF10282", err) +} + +func TestGetTransactionStatusHandleReceipt(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "ns1", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + func(req *http.Request) (*http.Response, error) { + transactionStatus := make(map[string]interface{}) + transactionStatus["status"] = "Succeeded" + return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) + }) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.NotNil(t, status) +} + +func TestSubmitNetworkActionNotSupported(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + err := c.SubmitNetworkAction(c.ctx, "", "", core.NetworkActionTerminate, nil) + assert.Regexp(t, "SubmitNetworkAction not supported", err) +} + +func TestAddFireflySubscriptionBadLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners", + httpmock.NewJsonResponderOrPanic(200, &[]listener{})) + client := resty.NewWithClient(mockedClient) + client.SetBaseURL("http://localhost:12345") + c.streamID = "es12345" + c.streams = &streamManager{ + client: client, + batchSize: 500, + batchTimeout: 10000, + } + + location := fftypes.JSONAnyPtr(fftypes.JSONObject{ + "bad": "bad", + }.String()) + contract := &blockchain.MultipartyContract{ + Location: location, + FirstEvent: "oldest", + } + + ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} + _, err := c.AddFireflySubscription(c.ctx, ns, contract, "") + assert.Regexp(t, "FF10310", err) +} + +func TestAddAndRemoveFireflySubscription(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, _, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewJsonResponderOrPanic(200, []listener{})) + httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewJsonResponderOrPanic(200, listener{ID: "lst12345", Name: "ns1_2_BatchPin"})) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + startupMessage := <-toServer + assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + startupMessage = <-toServer + assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) + + location := fftypes.JSONAnyPtr(fftypes.JSONObject{ + "address": "submit-tx", + }.String()) + contract := &blockchain.MultipartyContract{ + Location: location, + FirstEvent: "oldest", + } + + ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} + subID, err := c.AddFireflySubscription(c.ctx, ns, contract, "") + assert.NoError(t, err) + assert.NotNil(t, c.subs.GetSubscription(subID)) + + c.RemoveFireflySubscription(c.ctx, subID) + assert.Nil(t, c.subs.GetSubscription(subID)) +} + +func TestAddFireflySubscriptionListError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, _, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewStringResponder(500, "whoopsies")) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + startupMessage := <-toServer + assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + startupMessage = <-toServer + assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) + + location := fftypes.JSONAnyPtr(fftypes.JSONObject{ + "address": "submit-tx", + }.String()) + contract := &blockchain.MultipartyContract{ + Location: location, + FirstEvent: "oldest", + } + + ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} + _, err = c.AddFireflySubscription(c.ctx, ns, contract, "") + assert.Regexp(t, "FF10282", err) +} + +func TestAddFireflySubscriptionAlreadyExists(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, _, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewJsonResponderOrPanic(200, []listener{{ID: "lst12345", Name: "ns1_2_BatchPin"}})) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + startupMessage := <-toServer + assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + startupMessage = <-toServer + assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) + + location := fftypes.JSONAnyPtr(fftypes.JSONObject{ + "address": "submit-tx", + }.String()) + contract := &blockchain.MultipartyContract{ + Location: location, + FirstEvent: "oldest", + } + + ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} + subID, err := c.AddFireflySubscription(c.ctx, ns, contract, "") + assert.NoError(t, err) + assert.Equal(t, "lst12345", subID) +} + +func TestAddFireflySubscriptionCreateError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, _, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewJsonResponderOrPanic(200, []listener{})) + httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), + httpmock.NewStringResponder(500, "whoopsies")) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + startupMessage := <-toServer + assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + startupMessage = <-toServer + assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) + + location := fftypes.JSONAnyPtr(fftypes.JSONObject{ + "address": "submit-tx", + }.String()) + contract := &blockchain.MultipartyContract{ + Location: location, + FirstEvent: "oldest", + } + + ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} + _, err = c.AddFireflySubscription(c.ctx, ns, contract, "") + assert.Regexp(t, "FF10282", err) +} + +func TestInvokeContractOK(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/invoke", func(req *http.Request) (*http.Response, error) { + var body map[string]interface{} + json.NewDecoder(req.Body).Decode(&body) + params := body["params"].([]interface{}) + assert.Equal(t, "opId", body["id"]) + assert.Equal(t, "simple-tx", body["address"]) + assert.Equal(t, "testFunc", body["method"].(map[string]interface{})["name"]) + assert.Equal(t, 1, len(params)) + assert.Equal(t, signingKey, body["from"]) + return httpmock.NewJsonResponderOrPanic(200, "")(req) + }) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.InvokeContract(context.Background(), "opId", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + assert.NoError(t, err) +} + +func TestInvokeContractAddressNotSet(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{} + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + assert.Regexp(t, "FF10310", err) +} + +func TestInvokeContractBadMethod(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := &fftypes.FFIMethod{} + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + assert.Regexp(t, "FF10457", err) +} + +func TestInvokeContractConnectorError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/invoke", func(req *http.Request) (*http.Response, error) { + var body map[string]interface{} + json.NewDecoder(req.Body).Decode(&body) + params := body["params"].([]interface{}) + assert.Equal(t, "opId", body["id"]) + assert.Equal(t, "simple-tx", body["address"]) + assert.Equal(t, "testFunc", body["method"].(map[string]interface{})["name"]) + assert.Equal(t, 1, len(params)) + assert.Equal(t, signingKey, body["from"]) + return httpmock.NewJsonResponderOrPanic(500, &common.BlockchainRESTError{ + Error: "something went wrong", + SubmissionRejected: true, + })(req) + }) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + rejected, err := c.InvokeContract(context.Background(), "opId", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + assert.True(t, rejected) + assert.Regexp(t, "FF10282", err) +} + +func TestQueryContractNotSupported(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + _, err := c.QueryContract(context.Background(), "", nil, nil, nil, nil) + assert.Regexp(t, "QueryContract not supported", err) +} + +func TestDeployContractOK(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + nsOpId := "ns1:opId" + signingKey := "signingKey" + definition := fftypes.JSONAnyPtr("{}") + contract := fftypes.JSONAnyPtr("\"cafed00d\"") + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/deploy", + httpmock.NewStringResponder(202, "")) + + _, err := c.DeployContract(context.Background(), nsOpId, signingKey, definition, contract, nil, nil) + assert.NoError(t, err) +} + +func TestDeployContractConnectorError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + nsOpId := "ns1:opId" + signingKey := "signingKey" + definition := fftypes.JSONAnyPtr("{}") + contract := fftypes.JSONAnyPtr("\"cafed00d\"") + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/deploy", + httpmock.NewJsonResponderOrPanic(500, &common.BlockchainRESTError{ + Error: "oh no", + SubmissionRejected: true, + })) + + rejected, err := c.DeployContract(context.Background(), nsOpId, signingKey, definition, contract, nil, nil) + assert.True(t, rejected) + assert.Regexp(t, "FF10282", err) +} + +func TestGetFFIParamValidator(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + _, err := c.GetFFIParamValidator(context.Background()) + assert.NoError(t, err) +} + +func TestValidateInvokeRequest(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + err := c.ValidateInvokeRequest(context.Background(), &ffiMethodAndErrors{ + method: testFFIMethod(), + }, nil, false) + assert.NoError(t, err) +} + +func TestValidateInvokeRequestInvalidMethod(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + err := c.ValidateInvokeRequest(context.Background(), &ffiMethodAndErrors{ + method: &fftypes.FFIMethod{}, + }, nil, false) + assert.Regexp(t, "FF10457", err) +} + +func TestGenerateFFINotSupported(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + _, err := c.GenerateFFI(context.Background(), nil) + assert.Regexp(t, "FF10347", err) +} + +func TestConvertDeprecatedContractConfig(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + _, _, err := c.GetAndConvertDeprecatedContractConfig(c.ctx) + assert.NoError(t, err) +} + +func TestNormalizeContractLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := &Location{ + Address: "submit-tx", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + _, err = c.NormalizeContractLocation(context.Background(), blockchain.NormalizeCall, fftypes.JSONAnyPtrBytes(locationBytes)) + assert.NoError(t, err) +} + +func TestNormalizeInvalidContractLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := fftypes.JSONAnyPtr("not valid") + _, err := c.NormalizeContractLocation(context.Background(), blockchain.NormalizeCall, location) + assert.Regexp(t, "10310", err) +} + +func TestGenerateEventSignature(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + event := &fftypes.FFIEventDefinition{ + Name: "TransactionFinalized", + Params: fftypes.FFIParams{ + &fftypes.FFIParam{ + Name: "transactionId", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } + signature, err := c.GenerateEventSignature(context.Background(), event) + assert.NoError(t, err) + assert.Equal(t, "TransactionFinalized(string)", signature) +} + +func TestGenerateEventSignatureWithLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + event := &fftypes.FFIEventDefinition{ + Name: "TransactionFinalized", + Params: fftypes.FFIParams{ + &fftypes.FFIParam{ + Name: "transactionId", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } + location := fftypes.JSONAnyPtr(`{"address":"submit-tx"}`) + signature, err := c.GenerateEventSignatureWithLocation(context.Background(), event, location) + assert.NoError(t, err) + assert.Equal(t, "submit-tx:TransactionFinalized(string)", signature) +} + +func TestGenerateEventSignatureWithNilLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + event := &fftypes.FFIEventDefinition{ + Name: "TransactionFinalized", + Params: fftypes.FFIParams{ + &fftypes.FFIParam{ + Name: "transactionId", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } + signature, err := c.GenerateEventSignatureWithLocation(context.Background(), event, nil) + assert.NoError(t, err) + assert.Equal(t, "*:TransactionFinalized(string)", signature) +} + +func TestGenerateEventSignatureWithInvalidLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + event := &fftypes.FFIEventDefinition{ + Name: "TransactionFinalized", + Params: fftypes.FFIParams{ + &fftypes.FFIParam{ + Name: "transactionId", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } + location := fftypes.JSONAnyPtr(`{"address":""}`) + _, err := c.GenerateEventSignatureWithLocation(context.Background(), event, location) + assert.Regexp(t, "FF10310", err) +} + +func TestGenerateErrorSignature(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + signature := c.GenerateErrorSignature(context.Background(), nil) + assert.Equal(t, "", signature) +} + +func TestCheckOverlappingLocationsEmpty(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := &Location{} + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + overlapping, err := c.CheckOverlappingLocations(context.Background(), nil, fftypes.JSONAnyPtrBytes(locationBytes)) + assert.NoError(t, err) + assert.True(t, overlapping) +} + +func TestCheckOverlappingLocationsBadLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := &Location{} + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + _, err = c.CheckOverlappingLocations(context.Background(), fftypes.JSONAnyPtrBytes(locationBytes), fftypes.JSONAnyPtrBytes(locationBytes)) + assert.Error(t, err) + assert.Regexp(t, "FF10310", err.Error()) +} + +func TestCheckOverlappingLocationsOneLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := &Location{ + Address: "3081D84FD367044F4ED453F2024709242470388C", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + location2 := &Location{} + location2Bytes, err := json.Marshal(location2) + assert.NoError(t, err) + _, err = c.CheckOverlappingLocations(context.Background(), fftypes.JSONAnyPtrBytes(locationBytes), fftypes.JSONAnyPtrBytes(location2Bytes)) + assert.Error(t, err) + assert.Regexp(t, "FF10310", err.Error()) +} + +func TestCheckOverlappingLocationsSameLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + location := &Location{ + Address: "3081D84FD367044F4ED453F2024709242470388C", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + result, err := c.CheckOverlappingLocations(context.Background(), fftypes.JSONAnyPtrBytes(locationBytes), fftypes.JSONAnyPtrBytes(locationBytes)) + assert.NoError(t, err) + assert.True(t, result) +} diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go index 63e081344e..b768fa2df0 100644 --- a/internal/blockchain/cardano/eventstream.go +++ b/internal/blockchain/cardano/eventstream.go @@ -22,8 +22,8 @@ import ( "github.com/go-resty/resty/v2" "github.com/hyperledger/firefly-common/pkg/ffresty" + "github.com/hyperledger/firefly-common/pkg/log" "github.com/hyperledger/firefly/internal/coremsgs" - "github.com/hyperledger/firefly/pkg/core" ) type streamManager struct { @@ -129,34 +129,37 @@ func (s *streamManager) ensureEventStream(ctx context.Context, topic string) (*e return s.createEventStream(ctx, topic) } -func (s *streamManager) getListener(ctx context.Context, streamID string, listenerID string) (listener *listener, err error) { +func (s *streamManager) getListener(ctx context.Context, streamID string, listenerID string, okNotFound bool) (listener *listener, err error) { res, err := s.client.R(). SetContext(ctx). SetResult(&listener). Get(fmt.Sprintf("/eventstreams/%s/listeners/%s", streamID, listenerID)) if err != nil || !res.IsSuccess() { + if okNotFound && res.StatusCode() == 404 { + return nil, nil + } return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) } return listener, nil } -func (s *streamManager) createListener(ctx context.Context, streamID, name, lastEvent string, filters *core.ListenerFilters) (listener *listener, err error) { - cardanoFilters := []filter{} - for _, f := range *filters { - address := f.Location.JSONObject().GetString("address") - cardanoFilters = append(cardanoFilters, filter{ - Event: eventfilter{ - Contract: address, - EventPath: f.Event.Name, - }, - }) +func (s *streamManager) getListeners(ctx context.Context, streamID string) (listeners *[]listener, err error) { + res, err := s.client.R(). + SetContext(ctx). + SetResult(&listeners). + Get(fmt.Sprintf("/eventstreams/%s/listeners", streamID)) + if err != nil || !res.IsSuccess() { + return nil, ffresty.WrapRestErr(ctx, res, err, coremsgs.MsgCardanoconnectRESTErr) } + return listeners, nil +} +func (s *streamManager) createListener(ctx context.Context, streamID, name, lastEvent string, filters []filter) (listener *listener, err error) { body := map[string]interface{}{ "name": name, "type": "events", "fromBlock": lastEvent, - "filters": cardanoFilters, + "filters": filters, } res, err := s.client.R(). @@ -182,3 +185,29 @@ func (s *streamManager) deleteListener(ctx context.Context, streamID, listenerID } return nil } + +func (s *streamManager) ensureFireFlyListener(ctx context.Context, namespace string, version int, address, firstEvent, streamID string) (l *listener, err error) { + existingListeners, err := s.getListeners(ctx, streamID) + if err != nil { + return nil, err + } + + name := fmt.Sprintf("%s_%d_BatchPin", namespace, version) + for _, l := range *existingListeners { + if l.Name == name { + return &l, nil + } + } + + filters := []filter{{ + eventfilter{ + Contract: address, + EventPath: "BatchPin", + }, + }} + if l, err = s.createListener(ctx, streamID, name, firstEvent, filters); err != nil { + return nil, err + } + log.L(ctx).Infof("BatchPin subscription: %s", l.ID) + return l, nil +} diff --git a/internal/networkmap/did_test.go b/internal/networkmap/did_test.go index 2040861eaf..8ac97b2cce 100644 --- a/internal/networkmap/did_test.go +++ b/internal/networkmap/did_test.go @@ -34,6 +34,15 @@ func TestDIDGenerationOK(t *testing.T) { org1 := testOrg("org1") + verifierCardano := (&core.Verifier{ + Identity: org1.ID, + Namespace: org1.Namespace, + VerifierRef: core.VerifierRef{ + Type: core.VerifierTypeCardanoAddress, + Value: "addr_test1vqhkukz0285zvk0xrwk9jlq0075tx6furuzcjvzpnhtgelsuhhqc4", + }, + Created: fftypes.Now(), + }) verifierEth := (&core.Verifier{ Identity: org1.ID, Namespace: org1.Namespace, @@ -83,6 +92,7 @@ func TestDIDGenerationOK(t *testing.T) { mdi := nm.database.(*databasemocks.Plugin) mdi.On("GetIdentityByID", nm.ctx, "ns1", mock.Anything).Return(org1, nil) mdi.On("GetVerifiers", nm.ctx, "ns1", mock.Anything).Return([]*core.Verifier{ + verifierCardano, verifierEth, verifierTezos, verifierMSP, @@ -99,6 +109,12 @@ func TestDIDGenerationOK(t *testing.T) { }, ID: org1.DID, VerificationMethods: []*VerificationMethod{ + { + ID: verifierCardano.Hash.String(), + Type: "PaymentVerificationKeyShelley_ed25519", + Controller: org1.DID, + BlockchainAccountID: verifierCardano.Value, + }, { ID: verifierEth.Hash.String(), Type: "EcdsaSecp256k1VerificationKey2019", @@ -125,6 +141,7 @@ func TestDIDGenerationOK(t *testing.T) { }, }, Authentication: []string{ + fmt.Sprintf("#%s", verifierCardano.Hash.String()), fmt.Sprintf("#%s", verifierEth.Hash.String()), fmt.Sprintf("#%s", verifierTezos.Hash.String()), fmt.Sprintf("#%s", verifierMSP.Hash.String()), From 89dd513c58f31d424f2116f10842fa1d9053a305 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 10 Feb 2025 17:08:06 -0500 Subject: [PATCH 15/67] fix: use newer curl version Signed-off-by: Simon Gellis --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c857ea475..7904ce56ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG GIT_REF RUN apk add make=4.4.1-r2 \ gcc=13.2.1_git20231014-r0 \ build-base=0.5-r3 \ - curl=8.11.1-r0 \ + curl=8.12.0-r0 \ git=2.43.6-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ @@ -76,7 +76,7 @@ ARG UI_RELEASE RUN apk add --update --no-cache \ sqlite=3.44.2-r0 \ postgresql16-client=16.6-r0 \ - curl=8.11.1-r0 \ + curl=8.12.0-r0 \ jq=1.7.1-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ From 8a1372f073577a2e24ac87c7651a802552a722fd Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 10 Feb 2025 17:11:59 -0500 Subject: [PATCH 16/67] fix: use same curl version everywhere Signed-off-by: Simon Gellis --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7904ce56ee..6dedddb81c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,7 @@ RUN mkdir -p build/contracts \ FROM alpine:3.19 AS sbom WORKDIR / ADD . /SBOM -RUN apk add --no-cache curl +RUN apk add --no-cache curl=8.12.0-r0 RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.48.3 RUN trivy fs --format spdx-json --output /sbom.spdx.json /SBOM RUN trivy sbom /sbom.spdx.json --severity UNKNOWN,HIGH,CRITICAL --db-repository public.ecr.aws/aquasecurity/trivy-db --exit-code 1 From e992174378371b3686666c39fca1347bce9cd33b Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 10 Feb 2025 17:17:32 -0500 Subject: [PATCH 17/67] fix: downgrade to older curl version everywhere Signed-off-by: Simon Gellis --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6dedddb81c..6f8e7d60b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG GIT_REF RUN apk add make=4.4.1-r2 \ gcc=13.2.1_git20231014-r0 \ build-base=0.5-r3 \ - curl=8.12.0-r0 \ + curl=8.11.1-r1 \ git=2.43.6-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ @@ -64,7 +64,7 @@ RUN mkdir -p build/contracts \ FROM alpine:3.19 AS sbom WORKDIR / ADD . /SBOM -RUN apk add --no-cache curl=8.12.0-r0 +RUN apk add --no-cache curl=8.11.1-r1 RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.48.3 RUN trivy fs --format spdx-json --output /sbom.spdx.json /SBOM RUN trivy sbom /sbom.spdx.json --severity UNKNOWN,HIGH,CRITICAL --db-repository public.ecr.aws/aquasecurity/trivy-db --exit-code 1 @@ -76,7 +76,7 @@ ARG UI_RELEASE RUN apk add --update --no-cache \ sqlite=3.44.2-r0 \ postgresql16-client=16.6-r0 \ - curl=8.12.0-r0 \ + curl=8.11.1-r1 \ jq=1.7.1-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ From b4e295fdb4b1dc47ce5b46c80c03b6c6505ccd96 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 10 Feb 2025 17:28:49 -0500 Subject: [PATCH 18/67] test: add test on invalid input to reach 100% coverage Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano_test.go | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 9599a6137b..0c25165cc3 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -831,6 +831,32 @@ func TestGetTransactionStatusEmptyObject(t *testing.T) { assert.NotNil(t, status) } +func TestGetTransactionStatusInvalidTx(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + + op := &core.Operation{ + Namespace: "", + ID: fftypes.MustParseUUID("9ffc50ff-6bfe-4502-adc7-93aea54cc059"), + Status: "Pending", + } + + httpmock.RegisterResponder("GET", "http://localhost:12345/transactions/:9ffc50ff-6bfe-4502-adc7-93aea54cc059", + func(req *http.Request) (*http.Response, error) { + transactionStatus := make(map[string]interface{}) + transactionStatus["status"] = "Failed" + transactionStatus["errorMessage"] = "Something went wrong" + return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) + }) + + status, err := c.GetTransactionStatus(context.Background(), op) + assert.NoError(t, err) + assert.NotNil(t, status) +} + func TestGetTransactionStatusNotFound(t *testing.T) { c, cancel := newTestCardano() defer cancel() From 1f4d2f9fe6fc2b12f437a16a372fce112ecd52a5 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Feb 2025 17:54:33 -0500 Subject: [PATCH 19/67] feat: use different websockets for different namespaces Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 148 ++++---- internal/blockchain/cardano/cardano_test.go | 358 +++++++++++++------- 2 files changed, 322 insertions(+), 184 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index f9fa9d8927..cd79a2f76f 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -57,9 +57,10 @@ type Cardano struct { callbacks common.BlockchainCallbacks client *resty.Client streams *streamManager - streamID string - closed chan struct{} - wsconn wsclient.WSClient + streamIDs map[string]string + closed map[string]chan struct{} + wsconns map[string]wsclient.WSClient + wsConfig *wsclient.WSConfig cardanoconnectConf config.Section subs common.FireflySubscriptions } @@ -105,7 +106,7 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c return i18n.NewError(ctx, coremsgs.MsgMissingPluginConfig, "url", cardanoconnectConf) } - wsConfig, err := wsclient.GenerateConfig(ctx, cardanoconnectConf) + c.wsConfig, err = wsclient.GenerateConfig(ctx, cardanoconnectConf) if err == nil { c.client, err = ffresty.New(c.ctx, cardanoconnectConf) } @@ -119,37 +120,74 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c return i18n.NewError(ctx, coremsgs.MsgMissingPluginConfig, "topic", "blockchain.cardano.cardanoconnect") } - if wsConfig.WSKeyPath == "" { - wsConfig.WSKeyPath = "/ws" + if c.wsConfig.WSKeyPath == "" { + c.wsConfig.WSKeyPath = "/ws" } - c.wsconn, err = wsclient.New(ctx, wsConfig, nil, c.afterConnect) + + c.streamIDs = make(map[string]string) + c.closed = make(map[string]chan struct{}) + c.wsconns = make(map[string]wsclient.WSClient) + c.streams = newStreamManager(c.client, c.cardanoconnectConf.GetUint(CardanoconnectConfigBatchSize), uint(c.cardanoconnectConf.GetDuration(CardanoconnectConfigBatchTimeout).Milliseconds())) + + return nil +} + +func (c *Cardano) getTopic(namespace string) string { + return fmt.Sprintf("%s/%s", c.pluginTopic, namespace) +} + +func (c *Cardano) StartNamespace(ctx context.Context, namespace string) (err error) { + logger := log.L(c.ctx) + logger.Debugf("Starting namespace: %s", namespace) + topic := c.getTopic(namespace) + + c.wsconns[namespace], err = wsclient.New(ctx, c.wsConfig, nil, func(ctx context.Context, w wsclient.WSClient) error { + b, _ := json.Marshal(&cardanoWSCommandPayload{ + Type: "listen", + Topic: topic, + }) + err := w.Send(ctx, b) + if err == nil { + b, _ = json.Marshal(&cardanoWSCommandPayload{ + Type: "listenreplies", + }) + err = w.Send(ctx, b) + } + return err + }) if err != nil { return err } - c.streams = newStreamManager(c.client, c.cardanoconnectConf.GetUint(CardanoconnectConfigBatchSize), uint(c.cardanoconnectConf.GetDuration(CardanoconnectConfigBatchTimeout).Milliseconds())) - - stream, err := c.streams.ensureEventStream(c.ctx, c.pluginTopic) + // Ensure that our event stream is in place + stream, err := c.streams.ensureEventStream(ctx, topic) if err != nil { return err } + logger.Infof("Event stream: %s (topic=%s)", stream.ID, topic) + c.streamIDs[namespace] = stream.ID - log.L(c.ctx).Infof("Event stream: %s (topic=%s)", stream.ID, c.pluginTopic) - c.streamID = stream.ID + err = c.wsconns[namespace].Connect() + if err != nil { + return err + } - c.closed = make(chan struct{}) - go c.eventLoop() + c.closed[namespace] = make(chan struct{}) - return c.wsconn.Connect() -} + go c.eventLoop(namespace) -func (c *Cardano) StartNamespace(ctx context.Context, namespace string) (err error) { - // TODO: Implement return nil } func (c *Cardano) StopNamespace(ctx context.Context, namespace string) (err error) { - // TODO: Implement + wsconn, ok := c.wsconns[namespace] + if ok { + wsconn.Close() + } + delete(c.wsconns, namespace) + delete(c.streamIDs, namespace) + delete(c.closed, namespace) + return nil } @@ -173,7 +211,7 @@ func (c *Cardano) AddFireflySubscription(ctx context.Context, namespace *core.Na version, _ := c.GetNetworkVersion(ctx, contract.Location) - l, err := c.streams.ensureFireFlyListener(ctx, namespace.Name, version, location.Address, contract.FirstEvent, c.streamID) + l, err := c.streams.ensureFireFlyListener(ctx, namespace.Name, version, location.Address, contract.FirstEvent, c.streamIDs[namespace.Name]) if err != nil { return "", err } @@ -323,7 +361,13 @@ func (c *Cardano) encodeContractLocation(_ context.Context, location *Location) } func (c *Cardano) AddContractListener(ctx context.Context, listener *core.ContractListener, lastProtocolID string) (err error) { - subName := fmt.Sprintf("ff-sub-%s-%s", listener.Namespace, listener.ID) + namespace := listener.Namespace + + if len(listener.Filters) == 0 { + return i18n.NewError(ctx, coremsgs.MsgFiltersEmpty, listener.Name) + } + + subName := fmt.Sprintf("ff-sub-%s-%s", namespace, listener.ID) firstEvent := string(core.SubOptsFirstEventNewest) if listener.Options != nil { firstEvent = listener.Options.FirstEvent @@ -343,17 +387,17 @@ func (c *Cardano) AddContractListener(ctx context.Context, listener *core.Contra }) } - result, err := c.streams.createListener(ctx, c.streamID, subName, firstEvent, filters) + result, err := c.streams.createListener(ctx, c.streamIDs[namespace], subName, firstEvent, filters) listener.BackendID = result.ID return err } func (c *Cardano) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error { - return c.streams.deleteListener(ctx, c.streamID, subscription.BackendID) + return c.streams.deleteListener(ctx, c.streamIDs[subscription.Namespace], subscription.BackendID) } func (c *Cardano) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (found bool, detail interface{}, status core.ContractListenerStatus, err error) { - l, err := c.streams.getListener(ctx, c.streamID, subID, okNotFound) + l, err := c.streams.getListener(ctx, c.streamIDs[namespace], subID, okNotFound) if err != nil || l == nil { return false, nil, core.ContractListenerStatusUnknown, err } @@ -459,22 +503,6 @@ func (c *Cardano) GetTransactionStatus(ctx context.Context, operation *core.Oper return statusResponse, nil } -func (c *Cardano) afterConnect(ctx context.Context, w wsclient.WSClient) error { - // Send a subscribe to our topic after each connect/reconnect - b, _ := json.Marshal(&cardanoWSCommandPayload{ - Type: "listen", - Topic: c.pluginTopic, - }) - err := w.Send(ctx, b) - if err == nil { - b, _ = json.Marshal(&cardanoWSCommandPayload{ - Type: "listenreplies", - }) - err = w.Send(ctx, b) - } - return err -} - func (c *Cardano) recoverFFI(ctx context.Context, parsedMethod interface{}) (*fftypes.FFIMethod, []*fftypes.FFIError, error) { methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) if !ok || methodInfo.method == nil || methodInfo.method.Name == "" { @@ -483,9 +511,13 @@ func (c *Cardano) recoverFFI(ctx context.Context, parsedMethod interface{}) (*ff return methodInfo.method, methodInfo.errors, nil } -func (c *Cardano) eventLoop() { - defer c.wsconn.Close() - defer close(c.closed) +func (c *Cardano) eventLoop(namespace string) { + topic := c.getTopic(namespace) + wsconn := c.wsconns[namespace] + closed := c.closed[namespace] + + defer wsconn.Close() + defer close(closed) l := log.L(c.ctx).WithField("role", "event-loop") ctx := log.WithLogger(c.ctx, l) for { @@ -493,7 +525,7 @@ func (c *Cardano) eventLoop() { case <-ctx.Done(): l.Debugf("Event loop exiting (context cancelled)") return - case msgBytes, ok := <-c.wsconn.Receive(): + case msgBytes, ok := <-wsconn.Receive(): if !ok { l.Debugf("Event loop exiting (receive channel closed). Terminating server!") c.cancelCtx() @@ -508,13 +540,13 @@ func (c *Cardano) eventLoop() { } switch msgTyped := msgParsed.(type) { case []interface{}: - err = c.handleMessageBatch(ctx, 0, msgTyped) + err = c.handleMessageBatch(ctx, namespace, 0, msgTyped) if err == nil { ack, _ := json.Marshal(&cardanoWSCommandPayload{ Type: "ack", - Topic: c.pluginTopic, + Topic: topic, }) - err = c.wsconn.Send(ctx, ack) + err = wsconn.Send(ctx, ack) } case map[string]interface{}: isBatch := false @@ -522,10 +554,10 @@ func (c *Cardano) eventLoop() { if events, ok := msgTyped["events"].([]interface{}); ok { // FFTM delivery with a batch number to use in the ack isBatch = true - err = c.handleMessageBatch(ctx, (int64)(batchNumber), events) + err = c.handleMessageBatch(ctx, namespace, (int64)(batchNumber), events) // Errors processing messages are converted into nacks ackOrNack := &cardanoWSCommandPayload{ - Topic: c.pluginTopic, + Topic: topic, BatchNumber: int64(batchNumber), } if err == nil { @@ -536,14 +568,14 @@ func (c *Cardano) eventLoop() { ackOrNack.Message = err.Error() } b, _ := json.Marshal(&ackOrNack) - err = c.wsconn.Send(ctx, b) + err = wsconn.Send(ctx, b) } } if !isBatch { var receipt common.BlockchainReceiptNotification _ = json.Unmarshal(msgBytes, &receipt) - err := common.HandleReceipt(ctx, "", c, &receipt, c.callbacks) + err := common.HandleReceipt(ctx, namespace, c, &receipt, c.callbacks) if err != nil { l.Errorf("Failed to process receipt: %+v", msgTyped) } @@ -562,7 +594,7 @@ func (c *Cardano) eventLoop() { } } -func (c *Cardano) handleMessageBatch(ctx context.Context, batchID int64, messages []interface{}) error { +func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batchID int64, messages []interface{}) error { events := make(common.EventsToDispatch) count := len(messages) for i, msgI := range messages { @@ -578,9 +610,7 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, batchID int64, message logger := log.L(ctx) logger.Infof("[Cardano:%d:%d/%d]: '%s'", batchID, i+1, count, signature) logger.Tracef("Message: %+v", msgJSON) - if err := c.processContractEvent(ctx, events, msgJSON); err != nil { - return err - } + c.processContractEvent(ctx, namespace, events, msgJSON) } // Dispatch all the events from this patch that were successfully parsed and routed to namespaces @@ -588,13 +618,8 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, batchID int64, message return c.callbacks.DispatchBlockchainEvents(ctx, events) } -func (c *Cardano) processContractEvent(ctx context.Context, events common.EventsToDispatch, msgJSON fftypes.JSONObject) error { +func (c *Cardano) processContractEvent(ctx context.Context, namespace string, events common.EventsToDispatch, msgJSON fftypes.JSONObject) { listenerID := msgJSON.GetString("listenerId") - listener, err := c.streams.getListener(ctx, c.streamID, listenerID, false) - if err != nil { - return err - } - namespace := common.GetNamespaceFromSubName(listener.Name) event := c.parseBlockchainEvent(ctx, msgJSON) if event != nil { c.callbacks.PrepareBlockchainEvent(ctx, events, namespace, &blockchain.EventForListener{ @@ -602,7 +627,6 @@ func (c *Cardano) processContractEvent(ctx context.Context, events common.Events ListenerID: listenerID, }) } - return nil } func (c *Cardano) parseBlockchainEvent(ctx context.Context, msgJSON fftypes.JSONObject) *blockchain.Event { diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 0c25165cc3..9f76d901c3 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -66,19 +66,27 @@ func resetConf(c *Cardano) { func newTestCardano() (*Cardano, func()) { ctx, cancel := context.WithCancel(context.Background()) + r := resty.New().SetBaseURL("http://localhost:12345") c := &Cardano{ ctx: ctx, cancelCtx: cancel, callbacks: common.NewBlockchainCallbacks(), - client: resty.New().SetBaseURL("http://localhost:12345"), + client: r, pluginTopic: "topic1", - wsconn: &wsmocks.WSClient{}, + streamIDs: make(map[string]string), + closed: make(map[string]chan struct{}), + wsconns: make(map[string]wsclient.WSClient), + streams: &streamManager{ + client: r, + }, } return c, func() { cancel() if c.closed != nil { // We've init'd, wait to close - <-c.closed + for _, cls := range c.closed { + <-cls + } } } } @@ -119,7 +127,7 @@ func TestInitMissingTopic(t *testing.T) { assert.Regexp(t, "FF10138.*topic", err) } -func TestInitWithCardanoConnect(t *testing.T) { +func TestInitAndStartWithCardanoConnect(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -150,18 +158,21 @@ func TestInitWithCardanoConnect(t *testing.T) { assert.Equal(t, "cardano", c.Name()) assert.Equal(t, core.VerifierTypeCardanoAddress, c.VerifierType()) + err = c.StartNamespace(c.ctx, "ns1") + assert.NoError(t, err) + assert.Equal(t, 2, httpmock.GetTotalCallCount()) - assert.Equal(t, "es12345", c.streamID) + assert.Equal(t, "es12345", c.streamIDs["ns1"]) assert.NotNil(t, c.Capabilities()) startupMessage := <-toServer - assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + assert.Equal(t, `{"type":"listen","topic":"topic1/ns1"}`, startupMessage) startupMessage = <-toServer assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) fromServer <- `{"bad":"receipt"}` // will be ignored - no ack fromServer <- `[]` // empty batch, will be ignored, but acked reply := <-toServer - assert.Equal(t, `{"type":"ack","topic":"topic1"}`, reply) + assert.Equal(t, `{"type":"ack","topic":"topic1/ns1"}`, reply) fromServer <- `["different kind of bad batch"]` fromServer <- `[{}]` // bad batch @@ -171,7 +182,7 @@ func TestInitWithCardanoConnect(t *testing.T) { fromServer <- `42` } -func TestInitWSFail(t *testing.T) { +func TestStartNamespaceWSFail(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -180,10 +191,13 @@ func TestInitWSFail(t *testing.T) { utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") assert.Regexp(t, "FF00149", err) } -func TestStreamQueryError(t *testing.T) { +func TestStartNamespaceStreamQueryError(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -201,10 +215,13 @@ func TestStreamQueryError(t *testing.T) { utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") assert.Regexp(t, "FF10282.*pop", err) } -func TestStreamCreateError(t *testing.T) { +func TestStartNamespaceStreamCreateError(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -224,10 +241,13 @@ func TestStreamCreateError(t *testing.T) { utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") assert.Regexp(t, "FF10282.*pop", err) } -func TestStreamUpdateError(t *testing.T) { +func TestStartNamespaceStreamUpdateError(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -236,7 +256,7 @@ func TestStreamUpdateError(t *testing.T) { defer httpmock.DeactivateAndReset() httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams", - httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1"}})) + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1/ns1"}})) httpmock.RegisterResponder("PATCH", "http://localhost:12345/eventstreams/es12345", httpmock.NewStringResponder(500, "pop")) @@ -247,13 +267,76 @@ func TestStreamUpdateError(t *testing.T) { utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") assert.Regexp(t, "FF10282.*pop", err) } -func TestStartNamespace(t *testing.T) { +func TestStartNamespaceWSConnectFail(t *testing.T) { c, cancel := newTestCardano() defer cancel() - err := c.StartNamespace(context.Background(), "ns1") + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + httpURL := "http://localhost:12345" + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{})) + httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345"})) + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/ws", httpURL), + httpmock.NewJsonResponderOrPanic(500, "{}")) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + utCardanoconnectConf.Set(wsclient.WSConfigKeyInitialConnectAttempts, 1) + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") + assert.Regexp(t, "FF00148", err) +} + +func TestStartStopNamespace(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + toServer, _, wsURL, done := wsclient.NewTestWSServer(nil) + defer done() + + mockedClient := &http.Client{} + httpmock.ActivateNonDefault(mockedClient) + defer httpmock.DeactivateAndReset() + + u, _ := url.Parse(wsURL) + u.Scheme = "http" + httpURL := u.String() + + httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, []eventStream{})) + httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams", httpURL), + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345"})) + + resetConf(c) + utCardanoconnectConf.Set(ffresty.HTTPConfigURL, httpURL) + utCardanoconnectConf.Set(ffresty.HTTPCustomClient, mockedClient) + utCardanoconnectConf.Set(CardanoconnectConfigTopic, "topic1") + + err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) + assert.NoError(t, err) + + err = c.StartNamespace(c.ctx, "ns1") + assert.NoError(t, err) + + <-toServer + + err = c.StopNamespace(c.ctx, "ns1") assert.NoError(t, err) } @@ -287,11 +370,12 @@ func TestEventLoopContextCancelled(t *testing.T) { c, cancel := newTestCardano() cancel() r := make(<-chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return(r) wsm.On("Close").Return() - c.closed = make(chan struct{}) - c.eventLoop() + c.closed["ns1"] = make(chan struct{}) + c.eventLoop("ns1") wsm.AssertExpectations(t) } @@ -300,12 +384,13 @@ func TestEventLoopReceiveClosed(t *testing.T) { defer cancel() r := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm close(r) wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Close").Return() - c.closed = make(chan struct{}) - c.eventLoop() + c.closed["ns1"] = make(chan struct{}) + c.eventLoop("ns1") wsm.AssertExpectations(t) } @@ -314,15 +399,16 @@ func TestEventLoopSendFailed(t *testing.T) { defer cancel() r := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Close").Return() wsm.On("Send", mock.Anything, mock.Anything).Return(errors.New("Send error")) - c.closed = make(chan struct{}) + c.closed["ns1"] = make(chan struct{}) - go c.eventLoop() + go c.eventLoop("ns1") r <- []byte(`{"batchNumber":9001,"events":["none"]}`) - <-c.closed + <-c.closed["ns1"] } func TestEventLoopBadMessage(t *testing.T) { @@ -330,12 +416,13 @@ func TestEventLoopBadMessage(t *testing.T) { defer cancel() r := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Close").Return() - c.closed = make(chan struct{}) + c.closed["ns1"] = make(chan struct{}) - go c.eventLoop() + go c.eventLoop("ns1") r <- []byte(`!badjson`) // ignored bad json r <- []byte(`"not an object"`) // ignored wrong type } @@ -353,15 +440,16 @@ func TestEventLoopReceiveBatch(t *testing.T) { r := make(chan []byte) s := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { bytes, _ := args.Get(1).([]byte) s <- bytes }).Return(nil) wsm.On("Close").Return() - c.streamID = "es12345" - c.closed = make(chan struct{}) + c.streamIDs["ns1"] = "es12345" + c.closed["ns1"] = make(chan struct{}) client := resty.NewWithClient(mockedClient) client.SetBaseURL("http://localhost:12345") @@ -391,21 +479,21 @@ func TestEventLoopReceiveBatch(t *testing.T) { }`) em := &blockchainmocks.Callbacks{} - c.SetHandler("default", em) + c.SetHandler("ns1", em) em.On("BlockchainEventBatch", mock.MatchedBy(func(events []*blockchain.EventToDispatch) bool { return len(events) == 1 && events[0].Type == blockchain.EventTypeForListener && events[0].ForListener.ListenerID == "lst12345" })).Return(nil) - go c.eventLoop() + go c.eventLoop("ns1") r <- data response := <-s var parsed cardanoWSCommandPayload err := json.Unmarshal(response, &parsed) assert.NoError(t, err) - assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, "topic1/ns1", parsed.Topic) assert.Equal(t, int64(1337), parsed.BatchNumber) assert.Equal(t, "ack", parsed.Type) } @@ -430,15 +518,16 @@ func TestEventLoopReceiveBadBatch(t *testing.T) { r := make(chan []byte) s := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { bytes, _ := args.Get(1).([]byte) s <- bytes }).Return(nil) wsm.On("Close").Return() - c.streamID = "es12345" - c.closed = make(chan struct{}) + c.streamIDs["ns1"] = "es12345" + c.closed["ns1"] = make(chan struct{}) data := []byte(`{ "batchNumber": 1337, @@ -460,21 +549,21 @@ func TestEventLoopReceiveBadBatch(t *testing.T) { }`) em := &blockchainmocks.Callbacks{} - c.SetHandler("default", em) + c.SetHandler("ns1", em) em.On("BlockchainEventBatch", mock.MatchedBy(func(events []*blockchain.EventToDispatch) bool { return len(events) == 1 && events[0].Type == blockchain.EventTypeForListener && events[0].ForListener.ListenerID == "lst12345" })).Return(errors.New("My Error Message")) - go c.eventLoop() + go c.eventLoop("ns1") r <- data response := <-s var parsed cardanoWSCommandPayload err := json.Unmarshal(response, &parsed) assert.NoError(t, err) - assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, "topic1/ns1", parsed.Topic) assert.Equal(t, int64(1337), parsed.BatchNumber) assert.Equal(t, "error", parsed.Type) assert.Equal(t, "My Error Message", parsed.Message) @@ -484,48 +573,20 @@ func TestEventLoopReceiveMalformedBatch(t *testing.T) { c, cancel := newTestCardano() defer cancel() - mockedClient := &http.Client{} - httpmock.ActivateNonDefault(mockedClient) - defer httpmock.DeactivateAndReset() - - httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/lst12345", - httpmock.NewJsonResponderOrPanic(200, listener{ID: "lst12345", Name: "ff-sub-default-12345"})) - httpmock.RegisterResponder("GET", "http://localhost:12345/eventstreams/es12345/listeners/", - httpmock.NewStringResponder(404, "Not Found")) - client := resty.NewWithClient(mockedClient) - client.SetBaseURL("http://localhost:12345") - c.streams = &streamManager{ - client: client, - batchSize: 500, - batchTimeout: 10000, - } - r := make(chan []byte) s := make(chan []byte) - wsm := c.wsconn.(*wsmocks.WSClient) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm wsm.On("Receive").Return((<-chan []byte)(r)) wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { bytes, _ := args.Get(1).([]byte) s <- bytes }).Return(nil) wsm.On("Close").Return() - c.streamID = "es12345" - c.closed = make(chan struct{}) + c.streamIDs["ns1"] = "es12345" + c.closed["ns1"] = make(chan struct{}) - go c.eventLoop() - - r <- []byte(`{ - "batchNumber": 1337, - "events": [{}] - }`) - response := <-s - var parsed cardanoWSCommandPayload - err := json.Unmarshal(response, &parsed) - assert.NoError(t, err) - assert.Equal(t, c.pluginTopic, parsed.Topic) - assert.Equal(t, int64(1337), parsed.BatchNumber) - assert.Equal(t, "error", parsed.Type) - assert.Regexp(t, "FF10282.*Not Found", parsed.Message) + go c.eventLoop("ns1") r <- []byte(`{ "batchNumber": 1338, @@ -547,13 +608,59 @@ func TestEventLoopReceiveMalformedBatch(t *testing.T) { } ] }`) - response = <-s - err = json.Unmarshal(response, &parsed) + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) assert.NoError(t, err) - assert.Equal(t, c.pluginTopic, parsed.Topic) + assert.Equal(t, "topic1/ns1", parsed.Topic) assert.Equal(t, int64(1338), parsed.BatchNumber) assert.Equal(t, "ack", parsed.Type) } + +func TestEventLoopReceiveReceipt(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + r := make(chan []byte) + s := make(chan []byte) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + bytes, _ := args.Get(1).([]byte) + s <- bytes + }).Return(nil) + wsm.On("Close").Return() + c.streamIDs["ns1"] = "es12345" + c.closed["ns1"] = make(chan struct{}) + + tm := &coremocks.OperationCallbacks{} + c.SetOperationHandler("ns1", tm) + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + return update.NamespacedOpID == "ns1:5678" && + update.Status == core.OpStatusSucceeded && + update.BlockchainTXID == "txHash" && + update.Plugin == "cardano" + })).Return(nil) + + go c.eventLoop("ns1") + + // start by sending an invalid receipt, which it should ignore + r <- []byte(`{ + "headers": { + "requestId": "ns1:1234" + } + }`) + // then sand a valid receipt, which it should acknowledge + r <- []byte(`{ + "headers": { + "requestId": "ns1:5678", + "replyType": "TransactionSuccess" + }, + "transactionHash": "txHash" + }`) +} + func TestSubmitBatchPinNotSupported(t *testing.T) { c, cancel := newTestCardano() defer cancel() @@ -567,12 +674,11 @@ func TestAddContractListener(t *testing.T) { defer cancel() httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" sub := &core.ContractListener{ + Name: "sample", + Namespace: "ns1", Filters: []*core.ListenerFilter{ { Event: &core.FFISerializedEvent{ @@ -598,17 +704,36 @@ func TestAddContractListener(t *testing.T) { assert.Equal(t, "new-id", sub.BackendID) } -func TestAddContractListenerBadLocation(t *testing.T) { +func TestAddContractListenerNoFilter(t *testing.T) { c, cancel := newTestCardano() defer cancel() httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, + c.streamIDs["ns1"] = "es-1" + + sub := &core.ContractListener{ + Name: "sample", + Namespace: "ns1", + Filters: []*core.ListenerFilter{}, + Options: &core.ContractListenerOptions{ + FirstEvent: string(core.SubOptsFirstEventOldest), + }, } + err := c.AddContractListener(context.Background(), sub, "") + assert.Regexp(t, "FF10475", err) +} + +func TestAddContractListenerBadLocation(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + c.streamIDs["ns1"] = "es-1" + sub := &core.ContractListener{ + Name: "Sample", + Namespace: "ns1", Filters: []*core.ListenerFilter{ { Event: &core.FFISerializedEvent{ @@ -637,12 +762,10 @@ func TestDeleteContractListener(t *testing.T) { httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" sub := &core.ContractListener{ + Namespace: "ns1", BackendID: "sb-1", } @@ -659,12 +782,10 @@ func TestDeleteContractListenerFail(t *testing.T) { httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" sub := &core.ContractListener{ + Namespace: "ns1", BackendID: "sb-1", } @@ -681,10 +802,7 @@ func TestGetContractListenerStatus(t *testing.T) { httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, httpmock.NewJsonResponderOrPanic(200, &listener{ID: "sb-1", Name: "something"})) @@ -701,10 +819,7 @@ func TestGetContractListenerStatusNotFound(t *testing.T) { httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, httpmock.NewStringResponder(404, "no")) @@ -721,10 +836,7 @@ func TestGetContractListenerErrorNotFound(t *testing.T) { httpmock.ActivateNonDefault(c.client.GetClient()) defer httpmock.DeactivateAndReset() - c.streamID = "es-1" - c.streams = &streamManager{ - client: c.client, - } + c.streamIDs["ns1"] = "es-1" httpmock.RegisterResponder("GET", `http://localhost:12345/eventstreams/es-1/listeners/sb-1`, httpmock.NewStringResponder(404, "no")) @@ -943,12 +1055,7 @@ func TestAddFireflySubscriptionBadLocation(t *testing.T) { httpmock.NewJsonResponderOrPanic(200, &[]listener{})) client := resty.NewWithClient(mockedClient) client.SetBaseURL("http://localhost:12345") - c.streamID = "es12345" - c.streams = &streamManager{ - client: client, - batchSize: 500, - batchTimeout: 10000, - } + c.streamIDs["ns1"] = "es12345" location := fftypes.JSONAnyPtr(fftypes.JSONObject{ "bad": "bad", @@ -979,9 +1086,9 @@ func TestAddAndRemoveFireflySubscription(t *testing.T) { httpURL := u.String() httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), - httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1/ns1"}})) httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), - httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: "topic1/ns1"})) httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), httpmock.NewJsonResponderOrPanic(200, []listener{})) httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), @@ -994,8 +1101,10 @@ func TestAddAndRemoveFireflySubscription(t *testing.T) { err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) assert.NoError(t, err) + err = c.StartNamespace(c.ctx, "ns1") + assert.NoError(t, err) startupMessage := <-toServer - assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + assert.Equal(t, `{"type":"listen","topic":"topic1/ns1"}`, startupMessage) startupMessage = <-toServer assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) @@ -1032,9 +1141,9 @@ func TestAddFireflySubscriptionListError(t *testing.T) { httpURL := u.String() httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), - httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1/ns1"}})) httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), - httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: "topic1/ns1"})) httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), httpmock.NewStringResponder(500, "whoopsies")) @@ -1045,8 +1154,10 @@ func TestAddFireflySubscriptionListError(t *testing.T) { err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) assert.NoError(t, err) + err = c.StartNamespace(c.ctx, "ns1") + assert.NoError(t, err) startupMessage := <-toServer - assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + assert.Equal(t, `{"type":"listen","topic":"topic1/ns1"}`, startupMessage) startupMessage = <-toServer assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) @@ -1079,9 +1190,9 @@ func TestAddFireflySubscriptionAlreadyExists(t *testing.T) { httpURL := u.String() httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), - httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1/ns1"}})) httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), - httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: "topic1/ns1"})) httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), httpmock.NewJsonResponderOrPanic(200, []listener{{ID: "lst12345", Name: "ns1_2_BatchPin"}})) @@ -1092,8 +1203,9 @@ func TestAddFireflySubscriptionAlreadyExists(t *testing.T) { err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) assert.NoError(t, err) + err = c.StartNamespace(c.ctx, "ns1") startupMessage := <-toServer - assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + assert.Equal(t, `{"type":"listen","topic":"topic1/ns1"}`, startupMessage) startupMessage = <-toServer assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) @@ -1127,9 +1239,9 @@ func TestAddFireflySubscriptionCreateError(t *testing.T) { httpURL := u.String() httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams", httpURL), - httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: c.pluginTopic}})) + httpmock.NewJsonResponderOrPanic(200, []eventStream{{ID: "es12345", Name: "topic1/ns1"}})) httpmock.RegisterResponder("PATCH", fmt.Sprintf("%s/eventstreams/es12345", httpURL), - httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: c.pluginTopic})) + httpmock.NewJsonResponderOrPanic(200, eventStream{ID: "es12345", Name: "topic1/ns1"})) httpmock.RegisterResponder("GET", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), httpmock.NewJsonResponderOrPanic(200, []listener{})) httpmock.RegisterResponder("POST", fmt.Sprintf("%s/eventstreams/es12345/listeners", httpURL), @@ -1142,8 +1254,10 @@ func TestAddFireflySubscriptionCreateError(t *testing.T) { err := c.Init(c.ctx, c.cancelCtx, utConfig, c.metrics, &cachemocks.Manager{}) assert.NoError(t, err) + err = c.StartNamespace(c.ctx, "ns1") + assert.NoError(t, err) startupMessage := <-toServer - assert.Equal(t, `{"type":"listen","topic":"topic1"}`, startupMessage) + assert.Equal(t, `{"type":"listen","topic":"topic1/ns1"}`, startupMessage) startupMessage = <-toServer assert.Equal(t, `{"type":"listenreplies"}`, startupMessage) From 4efbdd8deb725857a181139fb083d357e0ade952 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Feb 2025 17:57:10 -0500 Subject: [PATCH 20/67] feat: copy event signature logic to error signatures Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 7 +++++-- internal/blockchain/cardano/cardano_test.go | 14 +++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index cd79a2f76f..a80acd42cc 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -432,8 +432,11 @@ func (c *Cardano) GenerateEventSignatureWithLocation(ctx context.Context, event } func (c *Cardano) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string { - // TODO: impl - return "" + params := []string{} + for _, param := range event.Params { + params = append(params, param.Schema.JSONObject().GetString("type")) + } + return fmt.Sprintf("%s(%s)", event.Name, strings.Join(params, ",")) } func (c *Cardano) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error) { diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 9f76d901c3..16d61036c6 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -1586,9 +1586,17 @@ func TestGenerateEventSignatureWithInvalidLocation(t *testing.T) { func TestGenerateErrorSignature(t *testing.T) { c, cancel := newTestCardano() defer cancel() - - signature := c.GenerateErrorSignature(context.Background(), nil) - assert.Equal(t, "", signature) + event := &fftypes.FFIErrorDefinition{ + Name: "TransactionFailed", + Params: fftypes.FFIParams{ + &fftypes.FFIParam{ + Name: "transactionId", + Schema: fftypes.JSONAnyPtr(`{"type": "string"}`), + }, + }, + } + signature := c.GenerateErrorSignature(context.Background(), event) + assert.Equal(t, "TransactionFailed(string)", signature) } func TestCheckOverlappingLocationsEmpty(t *testing.T) { From 581623f5090fbe1f6a3ff4ca6dca89a02f1a7acd Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Feb 2025 18:05:16 -0500 Subject: [PATCH 21/67] fix: use proper i18n errors Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 10 ++++++---- internal/blockchain/cardano/cardano_test.go | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index a80acd42cc..f740f90817 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -19,7 +19,6 @@ package cardano import ( "context" "encoding/json" - "errors" "fmt" "regexp" "strings" @@ -233,11 +232,13 @@ func (c *Cardano) ResolveSigningKey(ctx context.Context, key string, intent bloc } func (c *Cardano) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error { - return errors.New("SubmitBatchPin not supported") + log.L(ctx).Warn("SubmitBatchPin is not supported") + return i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } func (c *Cardano) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error { - return errors.New("SubmitNetworkAction not supported") + log.L(ctx).Warn("SubmitNetworkAction is not supported") + return i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } func (c *Cardano) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { @@ -303,7 +304,8 @@ func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey } func (c *Cardano) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) { - return nil, errors.New("QueryContract not supported") + log.L(ctx).Warn("QueryContract is not supported") + return nil, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error) { diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 16d61036c6..dfb9ab4a65 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -666,7 +666,7 @@ func TestSubmitBatchPinNotSupported(t *testing.T) { defer cancel() err := c.SubmitBatchPin(c.ctx, "", "", "", nil, nil) - assert.Regexp(t, "SubmitBatchPin not supported", err) + assert.Regexp(t, "FF10429", err) } func TestAddContractListener(t *testing.T) { @@ -1040,7 +1040,7 @@ func TestSubmitNetworkActionNotSupported(t *testing.T) { defer cancel() err := c.SubmitNetworkAction(c.ctx, "", "", core.NetworkActionTerminate, nil) - assert.Regexp(t, "SubmitNetworkAction not supported", err) + assert.Regexp(t, "FF10429", err) } func TestAddFireflySubscriptionBadLocation(t *testing.T) { @@ -1409,7 +1409,7 @@ func TestQueryContractNotSupported(t *testing.T) { defer cancel() _, err := c.QueryContract(context.Background(), "", nil, nil, nil, nil) - assert.Regexp(t, "QueryContract not supported", err) + assert.Regexp(t, "FF10429", err) } func TestDeployContractOK(t *testing.T) { From d219791d9773f3b9fcfe982e4980151e6ef872e3 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 20 Feb 2025 12:18:04 -0500 Subject: [PATCH 22/67] fix: remove unneeded dockerfile change Signed-off-by: Simon Gellis --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e567cf79dc..53ab003210 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,7 @@ RUN mkdir -p build/contracts \ FROM alpine:3.19 AS sbom WORKDIR / ADD . /SBOM -RUN apk add --no-cache curl=8.11.1-r1 +RUN apk add --no-cache curl RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.48.3 RUN trivy fs --format spdx-json --output /sbom.spdx.json /SBOM RUN trivy sbom /sbom.spdx.json --severity UNKNOWN,HIGH,CRITICAL --db-repository public.ecr.aws/aquasecurity/trivy-db --exit-code 1 From 5bf71938a4d1c7f5c37f9c0224eb5c085af691ae Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 25 Feb 2025 20:18:35 -0500 Subject: [PATCH 23/67] fix: correct OperationUpdate mock Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index dfb9ab4a65..4c3cdd9987 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -636,7 +636,7 @@ func TestEventLoopReceiveReceipt(t *testing.T) { tm := &coremocks.OperationCallbacks{} c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { return update.NamespacedOpID == "ns1:5678" && update.Status == core.OpStatusSucceeded && update.BlockchainTXID == "txHash" && @@ -869,7 +869,7 @@ func TestGetTransactionStatusSuccess(t *testing.T) { tm := &coremocks.OperationCallbacks{} c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && update.Status == core.OpStatusSucceeded && update.BlockchainTXID == "txHash" && @@ -906,7 +906,7 @@ func TestGetTransactionStatusFailure(t *testing.T) { tm := &coremocks.OperationCallbacks{} c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdate) bool { + tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && update.Status == core.OpStatusFailed && update.ErrorMessage == "Something went wrong" && From 96531e3800201f7ce89fbeef749ff580e8182fa8 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Mar 2025 10:34:11 -0400 Subject: [PATCH 24/67] feat: remove fake websocket code from GetTransactionStatus Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 40 --------------------- internal/blockchain/cardano/cardano_test.go | 20 ----------- internal/blockchain/common/common.go | 6 ++++ internal/blockchain/ethereum/ethereum.go | 11 ++---- internal/blockchain/tezos/tezos.go | 11 ++---- 5 files changed, 12 insertions(+), 76 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index f740f90817..4773ed03b9 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -38,15 +38,6 @@ import ( "github.com/hyperledger/firefly/pkg/core" ) -const ( - cardanoTxStatusPending string = "Pending" -) - -const ( - ReceiptTransactionSuccess string = "TransactionSuccess" - ReceiptTransactionFailed string = "TransactionFailed" -) - type Cardano struct { ctx context.Context cancelCtx context.CancelFunc @@ -474,37 +465,6 @@ func (c *Cardano) GetTransactionStatus(ctx context.Context, operation *core.Oper return nil, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgCardanoconnectRESTErr) } - receiptInfo := statusResponse.GetObject("receipt") - txStatus := statusResponse.GetString("status") - - if txStatus != "" { - var replyType string - if txStatus == "Succeeded" { - replyType = ReceiptTransactionSuccess - } else { - replyType = ReceiptTransactionFailed - } - // If the status has changed, mock up blockchain receipt as if we'd received it - // as a web socket notification - if (operation.Status == core.OpStatusPending || operation.Status == core.OpStatusInitialized) && txStatus != cardanoTxStatusPending { - receipt := &common.BlockchainReceiptNotification{ - Headers: common.BlockchainReceiptHeaders{ - ReceiptID: statusResponse.GetString("id"), - ReplyType: replyType, - }, - TxHash: statusResponse.GetString("transactionHash"), - Message: statusResponse.GetString("errorMessage"), - ProtocolID: receiptInfo.GetString("protocolId")} - err := common.HandleReceipt(ctx, operation.Namespace, c, receipt, c.callbacks) - if err != nil { - log.L(ctx).Warnf("Failed to handle receipt") - } - } - } else { - // Don't expect to get here so issue a warning - log.L(ctx).Warnf("Transaction status didn't include txStatus information") - } - return statusResponse, nil } diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 4c3cdd9987..2b6142d028 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -867,19 +867,9 @@ func TestGetTransactionStatusSuccess(t *testing.T) { return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) }) - tm := &coremocks.OperationCallbacks{} - c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { - return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && - update.Status == core.OpStatusSucceeded && - update.BlockchainTXID == "txHash" && - update.Plugin == "cardano" - })).Return(errors.New("won't stop processing")) - status, err := c.GetTransactionStatus(context.Background(), op) assert.NoError(t, err) assert.NotNil(t, status) - tm.AssertExpectations(t) } func TestGetTransactionStatusFailure(t *testing.T) { @@ -904,19 +894,9 @@ func TestGetTransactionStatusFailure(t *testing.T) { return httpmock.NewJsonResponderOrPanic(200, transactionStatus)(req) }) - tm := &coremocks.OperationCallbacks{} - c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { - return update.NamespacedOpID == "ns1:9ffc50ff-6bfe-4502-adc7-93aea54cc059" && - update.Status == core.OpStatusFailed && - update.ErrorMessage == "Something went wrong" && - update.Plugin == "cardano" - })).Return(errors.New("won't stop processing")) - status, err := c.GetTransactionStatus(context.Background(), op) assert.NoError(t, err) assert.NotNil(t, status) - tm.AssertExpectations(t) } func TestGetTransactionStatusEmptyObject(t *testing.T) { diff --git a/internal/blockchain/common/common.go b/internal/blockchain/common/common.go index 0393b45b74..0eef61c5e2 100644 --- a/internal/blockchain/common/common.go +++ b/internal/blockchain/common/common.go @@ -116,6 +116,12 @@ type BlockchainReceiptNotification struct { ContractLocation *fftypes.JSONAny `json:"contractLocation,omitempty"` } +// possible values of BlockchainReceiptHeaders.ReplyType +const ( + ReceiptTransactionSuccess string = "TransactionSuccess" + ReceiptTransactionFailed string = "TransactionFailed" +) + type BlockchainRESTError struct { Error string `json:"error,omitempty"` // See https://github.com/hyperledger/firefly-transaction-manager/blob/main/pkg/ffcapi/submission_error.go diff --git a/internal/blockchain/ethereum/ethereum.go b/internal/blockchain/ethereum/ethereum.go index 60207fd60e..14262179ce 100644 --- a/internal/blockchain/ethereum/ethereum.go +++ b/internal/blockchain/ethereum/ethereum.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -52,11 +52,6 @@ const ( ethTxStatusPending string = "Pending" ) -const ( - ReceiptTransactionSuccess string = "TransactionSuccess" - ReceiptTransactionFailed string = "TransactionFailed" -) - type Ethereum struct { ctx context.Context cancelCtx context.CancelFunc @@ -1209,9 +1204,9 @@ func (e *Ethereum) GetTransactionStatus(ctx context.Context, operation *core.Ope if txStatus != "" { var replyType string if txStatus == "Succeeded" { - replyType = ReceiptTransactionSuccess + replyType = common.ReceiptTransactionSuccess } else { - replyType = ReceiptTransactionFailed + replyType = common.ReceiptTransactionFailed } // If the status has changed, mock up blockchain receipt as if we'd received it // as a web socket notification diff --git a/internal/blockchain/tezos/tezos.go b/internal/blockchain/tezos/tezos.go index d37eb0fe40..c56e6df9a4 100644 --- a/internal/blockchain/tezos/tezos.go +++ b/internal/blockchain/tezos/tezos.go @@ -1,4 +1,4 @@ -// Copyright © 2024 Kaleido, Inc. +// Copyright © 2025 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -44,11 +44,6 @@ const ( tezosTxStatusPending string = "Pending" ) -const ( - ReceiptTransactionSuccess string = "TransactionSuccess" - ReceiptTransactionFailed string = "TransactionFailed" -) - type Tezos struct { ctx context.Context cancelCtx context.CancelFunc @@ -576,9 +571,9 @@ func (t *Tezos) GetTransactionStatus(ctx context.Context, operation *core.Operat if txStatus != "" { var replyType string if txStatus == "Succeeded" { - replyType = ReceiptTransactionSuccess + replyType = common.ReceiptTransactionSuccess } else { - replyType = ReceiptTransactionFailed + replyType = common.ReceiptTransactionFailed } // If the status has changed, mock up blockchain receipt as if we'd received it // as a web socket notification From 710b94e9df49f8158ebea4b1c7eea5b0c9521143 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Mar 2025 17:51:51 -0400 Subject: [PATCH 25/67] feat: expect receipts to arrive in batches Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 38 +++++++++++-------- internal/blockchain/cardano/cardano_test.go | 41 +++++++++++++++------ 2 files changed, 51 insertions(+), 28 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 4773ed03b9..10b5ac9e91 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -514,11 +514,9 @@ func (c *Cardano) eventLoop(namespace string) { err = wsconn.Send(ctx, ack) } case map[string]interface{}: - isBatch := false if batchNumber, ok := msgTyped["batchNumber"].(float64); ok { if events, ok := msgTyped["events"].([]interface{}); ok { // FFTM delivery with a batch number to use in the ack - isBatch = true err = c.handleMessageBatch(ctx, namespace, (int64)(batchNumber), events) // Errors processing messages are converted into nacks ackOrNack := &cardanoWSCommandPayload{ @@ -535,15 +533,8 @@ func (c *Cardano) eventLoop(namespace string) { b, _ := json.Marshal(&ackOrNack) err = wsconn.Send(ctx, b) } - } - if !isBatch { - var receipt common.BlockchainReceiptNotification - _ = json.Unmarshal(msgBytes, &receipt) - - err := common.HandleReceipt(ctx, namespace, c, &receipt, c.callbacks) - if err != nil { - l.Errorf("Failed to process receipt: %+v", msgTyped) - } + } else { + l.Errorf("Message unexpected: %+v", msgTyped) } default: l.Errorf("Message unexpected: %+v", msgTyped) @@ -570,12 +561,27 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batc } msgJSON := fftypes.JSONObject(msgMap) - signature := msgJSON.GetString("signature") + switch msgJSON.GetString("type") { + case "ContractEvent": + signature := msgJSON.GetString("signature") + + logger := log.L(ctx) + logger.Infof("[Cardano:%d:%d/%d]: '%s'", batchID, i+1, count, signature) + logger.Tracef("Message: %+v", msgJSON) + c.processContractEvent(ctx, namespace, events, msgJSON) + case "Receipt": + var receipt common.BlockchainReceiptNotification + msgBytes, _ := json.Marshal(msgMap) + _ = json.Unmarshal(msgBytes, &receipt) + + err := common.HandleReceipt(ctx, namespace, c, &receipt, c.callbacks) + if err != nil { + log.L(ctx).Errorf("Failed to process receipt: %+v", msgMap) + } + default: + log.L(ctx).Errorf("Unexpected message in batch: %+v", msgMap) + } - logger := log.L(ctx) - logger.Infof("[Cardano:%d:%d/%d]: '%s'", batchID, i+1, count, signature) - logger.Tracef("Message: %+v", msgJSON) - c.processContractEvent(ctx, namespace, events, msgJSON) } // Dispatch all the events from this patch that were successfully parsed and routed to namespaces diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 2b6142d028..25c8779512 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -463,6 +463,7 @@ func TestEventLoopReceiveBatch(t *testing.T) { "batchNumber": 1337, "events": [ { + "type": "ContractEvent", "listenerId": "lst12345", "blockHash": "fcb0504f47abf2cc52cd6d509036d512fd6cbec19d0e1bbaaf21f0699882de7b", "blockNumber": 11466734, @@ -533,6 +534,7 @@ func TestEventLoopReceiveBadBatch(t *testing.T) { "batchNumber": 1337, "events": [ { + "type": "ContractEvent", "listenerId": "lst12345", "blockHash": "fcb0504f47abf2cc52cd6d509036d512fd6cbec19d0e1bbaaf21f0699882de7b", "blockNumber": 11466734, @@ -592,16 +594,19 @@ func TestEventLoopReceiveMalformedBatch(t *testing.T) { "batchNumber": 1338, "events": [ { + "type": "ContractEvent", "listenerId": "lst12345", "blockNumber": 1337, "transactionHash": "cafed00d" }, { + "type": "ContractEvent", "listenerId": "lst12345", "blockNumber": 1337, "timestamp": "2025-02-10T12:00:00.000000000+00:00" }, { + "type": "ContractEvent", "listenerId": "lst12345", "timestamp": "2025-02-10T12:00:00.000000000+00:00", "transactionHash": "cafed00d" @@ -645,20 +650,32 @@ func TestEventLoopReceiveReceipt(t *testing.T) { go c.eventLoop("ns1") - // start by sending an invalid receipt, which it should ignore r <- []byte(`{ - "headers": { - "requestId": "ns1:1234" - } - }`) - // then sand a valid receipt, which it should acknowledge - r <- []byte(`{ - "headers": { - "requestId": "ns1:5678", - "replyType": "TransactionSuccess" - }, - "transactionHash": "txHash" + "batchNumber": 1339, + "events": [ + { + "type": "Receipt", + "headers": { + "requestId": "ns1:1234" + } + }, + { + "type": "Receipt", + "headers": { + "requestId": "ns1:5678", + "replyType": "TransactionSuccess" + }, + "transactionHash": "txHash" + } + ] }`) + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, "topic1/ns1", parsed.Topic) + assert.Equal(t, int64(1339), parsed.BatchNumber) + assert.Equal(t, "ack", parsed.Type) } func TestSubmitBatchPinNotSupported(t *testing.T) { From 1649d7c24619e959ca62fcd619c1fc63b0366331 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Mar 2025 17:57:32 -0400 Subject: [PATCH 26/67] fix: remove redundant Cardano in logs Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 10b5ac9e91..6d637583c5 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -566,7 +566,7 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batc signature := msgJSON.GetString("signature") logger := log.L(ctx) - logger.Infof("[Cardano:%d:%d/%d]: '%s'", batchID, i+1, count, signature) + logger.Infof("[%d:%d/%d]: '%s'", batchID, i+1, count, signature) logger.Tracef("Message: %+v", msgJSON) c.processContractEvent(ctx, namespace, events, msgJSON) case "Receipt": From 3b39818f601ebab0f9a892a8fc99ba0976ad51fc Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 11 Mar 2025 17:58:56 -0400 Subject: [PATCH 27/67] fix: correct copyright on new files Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 2 +- internal/blockchain/cardano/cardano_test.go | 2 +- internal/blockchain/cardano/config.go | 2 +- internal/blockchain/cardano/eventstream.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 6d637583c5..c0ee72b0c2 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -1,4 +1,4 @@ -// Copyright © 2025 Kaleido, Inc. +// Copyright © 2025 IOG Singapore and SundaeSwap, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 25c8779512..b54d0e9203 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -1,4 +1,4 @@ -// Copyright © 2025 Kaleido, Inc. +// Copyright © 2025 IOG Singapore and SundaeSwap, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/config.go b/internal/blockchain/cardano/config.go index 445a226cd3..797efc20ec 100644 --- a/internal/blockchain/cardano/config.go +++ b/internal/blockchain/cardano/config.go @@ -1,4 +1,4 @@ -// Copyright © 2025 Kaleido, Inc. +// Copyright © 2025 IOG Singapore and SundaeSwap, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go index b768fa2df0..0f9d950570 100644 --- a/internal/blockchain/cardano/eventstream.go +++ b/internal/blockchain/cardano/eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2025 Kaleido, Inc. +// Copyright © 2025 IOG Singapore and SundaeSwap, Inc. // // SPDX-License-Identifier: Apache-2.0 // From 976a0b1f1183bdd83cef0b418aa7a490f5baa44f Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 12 Mar 2025 16:55:30 -0400 Subject: [PATCH 28/67] fix: fix overflow warning Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 2 +- internal/blockchain/cardano/eventstream.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index c0ee72b0c2..a31433bf5d 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -117,7 +117,7 @@ func (c *Cardano) Init(ctx context.Context, cancelCtx context.CancelFunc, conf c c.streamIDs = make(map[string]string) c.closed = make(map[string]chan struct{}) c.wsconns = make(map[string]wsclient.WSClient) - c.streams = newStreamManager(c.client, c.cardanoconnectConf.GetUint(CardanoconnectConfigBatchSize), uint(c.cardanoconnectConf.GetDuration(CardanoconnectConfigBatchTimeout).Milliseconds())) + c.streams = newStreamManager(c.client, c.cardanoconnectConf.GetUint(CardanoconnectConfigBatchSize), c.cardanoconnectConf.GetDuration(CardanoconnectConfigBatchTimeout).Milliseconds()) return nil } diff --git a/internal/blockchain/cardano/eventstream.go b/internal/blockchain/cardano/eventstream.go index 0f9d950570..5a27011eb0 100644 --- a/internal/blockchain/cardano/eventstream.go +++ b/internal/blockchain/cardano/eventstream.go @@ -29,7 +29,7 @@ import ( type streamManager struct { client *resty.Client batchSize uint - batchTimeout uint + batchTimeout int64 } type eventStream struct { @@ -37,7 +37,7 @@ type eventStream struct { Name string `json:"name"` ErrorHandling string `json:"errorHandling"` BatchSize uint `json:"batchSize"` - BatchTimeoutMS uint `json:"batchTimeoutMS"` + BatchTimeoutMS int64 `json:"batchTimeoutMS"` Type string `json:"type"` Timestamps bool `json:"timestamps"` } @@ -56,7 +56,7 @@ type eventfilter struct { EventPath string `json:"eventPath"` } -func newStreamManager(client *resty.Client, batchSize, batchTimeout uint) *streamManager { +func newStreamManager(client *resty.Client, batchSize uint, batchTimeout int64) *streamManager { return &streamManager{ client: client, batchSize: batchSize, @@ -75,7 +75,7 @@ func (s *streamManager) getEventStreams(ctx context.Context) (streams []*eventSt return streams, nil } -func buildEventStream(topic string, batchSize, batchTimeout uint) *eventStream { +func buildEventStream(topic string, batchSize uint, batchTimeout int64) *eventStream { return &eventStream{ Name: topic, ErrorHandling: "block", @@ -99,7 +99,7 @@ func (s *streamManager) createEventStream(ctx context.Context, topic string) (*e return stream, nil } -func (s *streamManager) updateEventStream(ctx context.Context, topic string, batchSize, batchTimeout uint, eventStreamID string) (*eventStream, error) { +func (s *streamManager) updateEventStream(ctx context.Context, topic string, batchSize uint, batchTimeout int64, eventStreamID string) (*eventStream, error) { stream := buildEventStream(topic, batchSize, batchTimeout) res, err := s.client.R(). SetContext(ctx). From 995e2bfb821a09f7a1dc0f14862b1304d80a25a1 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 12 Mar 2025 23:05:40 -0400 Subject: [PATCH 29/67] feat: update manifest images Signed-off-by: Simon Gellis --- manifest.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 0103a34ef2..7b1897a9e5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,13 @@ { "cardanoconnect": { - "image": "hyperledger/firefly-cardanoconnect", - "tag": "main" + "image": "ghcr.io/hyperledger/firefly-cardanoconnect", + "tag": "v0.2.1", + "sha": "de880330e10faee733a30306add75139ccdf248329724f0b1292cf62eb65619f" }, "cardanosigner": { - "image": "hyperledger/firefly-cardanosigner", - "tag": "main" + "image": "ghcr.io/hyperledger/firefly-cardanosigner", + "tag": "v0.2.1", + "sha": "d277bb99de78ed0fafd8b6a83f78a70efaa493a2b2c8259a4c46508f6987b0d5" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", From 0d3cc672059dcceeb694e83976730a526a2ce13b Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 12 Mar 2025 23:05:46 -0400 Subject: [PATCH 30/67] docs: add docs Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/chains/cardano.md | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 doc-site/docs/tutorials/chains/cardano.md diff --git a/doc-site/docs/tutorials/chains/cardano.md b/doc-site/docs/tutorials/chains/cardano.md new file mode 100644 index 0000000000..fe15d50f32 --- /dev/null +++ b/doc-site/docs/tutorials/chains/cardano.md @@ -0,0 +1,90 @@ +--- +title: Cardano +--- + +This guide will walk you through the steps to create a local FireFly development environment running against the preview node. + +## Previous steps: Install the FireFly CLI + +If you haven't set up the FireFly CLI already, please go back to the Getting Started guide and read the section on how to [Install the FireFly CLI](../../gettingstarted/firefly_cli.md). + +[← ① Install the FireFly CLI](../../gettingstarted/firefly_cli.md){: .md-button .md-button--primary} + +## Create the stack + +A Cardano stack can be run in two different ways; with a firefly + +### Option 1: Use a local Cardano node + +> **NOTE**: The cardano-node communicates over a Unix socket, so this will not work on Windows. + +Start a local cardano node. The fastest way to do this is to [use mithril](https://mithril.network/doc/manual/getting-started/bootstrap-cardano-node/) to bootstrap the node. + +For an example of how to bootstrap and run the cardano node in docker, see [the firefly-cardano repo](https://github.com/hyperledger/firefly-cardano/blob/1be3b08d301d6d6eeb5b79e40cf3dbf66181c3de/infra/docker-compose.node.yaml#L4). + +The cardano-node exposes a Unix socket named `node.socket`. Pass that to firefly-cli. The example below uses `firefly-cli` to + - Create a new Cardano-based stack named `dev` with 1 member. + - Disable `multiparty` mode. + - Connect to the local Cardano node, which is running in the [preview network](https://preview.cexplorer.io/). + +```sh +ff init cardano dev 1 \ + --multiparty false \ + --network preview \ + --socket /path/to/ipc/node.socket +``` + +### Option 2: Use Blockfrost + +The Cardano connector can also use the [paid Blockfrost API](https://blockfrost.io/) in place of a local Cardano node. + +The example below uses firefly-cli to + - Create a new Cardano-based stack named `dev` with 1 member. + - Disable `multiparty` mode. + - Use the given block + +```sh +ff init cardano dev 1 \ + --multiparty false \ + --network preview \ + --blockfrost-key previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + +## Start the stack + +Now you should be able to start your stack by running: + +```sh +ff start dev +``` + +After some time it should print out the following: + +``` +Web UI for member '0': http://127.0.0.1:5000/ui +Sandbox UI for member '0': http://127.0.0.1:5109 + + +To see logs for your stack run: + +ff logs dev +``` + +## Get some ADA + +Now that you have a stack, you need some seed funds to get started. Your stack was created with a wallet already (these are free to create in Cardano). To get the address, you can run +```sh +ff accounts list dev +``` + +The response will look like +```json +[ + { + "address": "addr_test1...", + "privateKey": "..." + } +] +``` + +If you're developing against a testnet such as preview, you can receive funds from the [testnet faucet](https://docs.cardano.org/cardano-testnets/tools/faucet). Pass the `address` from that response to the faucet. From a6d26e7bc2888bb59baf8540279fda61e3bcd468 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 13 Mar 2025 16:36:27 -0400 Subject: [PATCH 31/67] feat: support QueryContract Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 40 ++++- internal/blockchain/cardano/cardano_test.go | 157 +++++++++++++++++++- manifest.json | 8 +- manifestgen.sh | 16 +- 4 files changed, 211 insertions(+), 10 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index a31433bf5d..77ed894abb 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -295,8 +295,44 @@ func (c *Cardano) InvokeContract(ctx context.Context, nsOpID string, signingKey } func (c *Cardano) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) { - log.L(ctx).Warn("QueryContract is not supported") - return nil, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) + cardanoLocation, err := c.parseContractLocation(ctx, location) + if err != nil { + return nil, err + } + + methodInfo, ok := parsedMethod.(*ffiMethodAndErrors) + if !ok || methodInfo.method == nil || methodInfo.method.Name == "" { + return nil, i18n.NewError(ctx, coremsgs.MsgUnexpectedInterfaceType, parsedMethod) + } + method := methodInfo.method + params := make([]interface{}, 0) + for _, param := range method.Params { + params = append(params, input[param.Name]) + } + + body := map[string]interface{}{ + "address": cardanoLocation.Address, + "method": method, + "params": params, + } + if signingKey != "" { + body["from"] = signingKey + } + + var resErr common.BlockchainRESTError + res, err := c.client.R(). + SetContext(ctx). + SetBody(body). + SetError(&resErr). + Post("/contracts/query") + if err != nil || !res.IsSuccess() { + return nil, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgCardanoconnectRESTErr) + } + var output interface{} + if err = json.Unmarshal(res.Body(), &output); err != nil { + return nil, err + } + return output, nil } func (c *Cardano) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error) { diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index b54d0e9203..5b35cbc75e 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -1401,12 +1401,163 @@ func TestInvokeContractConnectorError(t *testing.T) { assert.Regexp(t, "FF10282", err) } -func TestQueryContractNotSupported(t *testing.T) { +func TestQueryContractOK(t *testing.T) { c, cancel := newTestCardano() defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) - _, err := c.QueryContract(context.Background(), "", nil, nil, nil, nil) - assert.Regexp(t, "FF10429", err) + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/query", func(req *http.Request) (*http.Response, error) { + var body map[string]interface{} + json.NewDecoder(req.Body).Decode(&body) + params := body["params"].([]interface{}) + assert.Equal(t, "simple-tx", body["address"]) + assert.Equal(t, "testFunc", body["method"].(map[string]interface{})["name"]) + assert.Equal(t, 1, len(params)) + assert.Equal(t, signingKey, body["from"]) + res := map[string]interface{}{ + "foo": "bar", + } + return httpmock.NewJsonResponderOrPanic(200, res)(req) + }) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + res, err := c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) + assert.NoError(t, err) + assert.Equal(t, map[string]interface{}{"foo": "bar"}, res) +} + +func TestQueryContractAddressNotSet(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{} + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) + assert.Regexp(t, "FF10310", err) +} + +func TestQueryContractBadMethod(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := &fftypes.FFIMethod{} + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) + assert.Regexp(t, "FF10457", err) +} + +func TestQueryContractConnectorError(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/invoke", func(req *http.Request) (*http.Response, error) { + var body map[string]interface{} + json.NewDecoder(req.Body).Decode(&body) + params := body["params"].([]interface{}) + assert.Equal(t, "opId", body["id"]) + assert.Equal(t, "simple-tx", body["address"]) + assert.Equal(t, "testFunc", body["method"].(map[string]interface{})["name"]) + assert.Equal(t, 1, len(params)) + assert.Equal(t, signingKey, body["from"]) + return httpmock.NewJsonResponderOrPanic(500, &common.BlockchainRESTError{ + Error: "something went wrong", + })(req) + }) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) + assert.Regexp(t, "FF10282", err) +} + +func TestQueryContractInvalidJson(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + httpmock.ActivateNonDefault(c.client.GetClient()) + defer httpmock.DeactivateAndReset() + location := &Location{ + Address: "simple-tx", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + signingKey := "signingKey" + method := testFFIMethod() + params := map[string]interface{}{ + "varString": "str", + } + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + + httpmock.RegisterResponder("POST", "http://localhost:12345/contracts/query", httpmock.NewStringResponder(200, "\"whoops forgot a quote")) + + parsedMethod, err := c.ParseInterface(context.Background(), method, nil) + assert.NoError(t, err) + + _, err = c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) + assert.Error(t, err) } func TestDeployContractOK(t *testing.T) { diff --git a/manifest.json b/manifest.json index 7b1897a9e5..7ef36ddc33 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { "cardanoconnect": { "image": "ghcr.io/hyperledger/firefly-cardanoconnect", - "tag": "v0.2.1", - "sha": "de880330e10faee733a30306add75139ccdf248329724f0b1292cf62eb65619f" + "tag": "v0.3.0", + "sha": "3980f1d549a6cb1f397f8e66f6ed5bdd29a91580c68fd413ace8cc011dab9178" }, "cardanosigner": { "image": "ghcr.io/hyperledger/firefly-cardanosigner", - "tag": "v0.2.1", - "sha": "d277bb99de78ed0fafd8b6a83f78a70efaa493a2b2c8259a4c46508f6987b0d5" + "tag": "v0.3.0", + "sha": "ac5ee089513f734c0673f3faa136ac04b5918f3a27a5bd57b840e63a74984e32" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", diff --git a/manifestgen.sh b/manifestgen.sh index 7533c6f415..319efed5fa 100755 --- a/manifestgen.sh +++ b/manifestgen.sh @@ -41,7 +41,21 @@ CLI_SECTION=$(cat manifest.json | jq .cli) rm -f manifest.json +function repository_url() { + service=$1 + case $service in + cardano*) + echo "https://api.github.com/repos/hyperledger/firefly-cardano" + ;; + *) + echo "https://api.github.com/repos/hyperledger/firefly-$service" + ;; + esac +} + SERVICES=( + "cardanoconnect" + "cardanosigner" "ethconnect" "evmconnect" "fabconnect" @@ -62,7 +76,7 @@ do if [ $USE_HEAD = false ] ; then # Query GitHub API the latest release version - TAG=$(curl https://api.github.com/repos/hyperledger/firefly-${SERVICES[$i]}/releases/latest -s | jq .tag_name -r) + TAG=$(curl "$(repository_url "${SERVICES[$i]}")/releases/latest" -s | jq .tag_name -r) else # Otherwise, pull the newest built image straight off the main branch TAG="head" From 17bab491a541cbcd43adf4e60c152ea97789d529 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 14 Mar 2025 17:49:11 -0400 Subject: [PATCH 32/67] fix: handle unchecked error Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 77ed894abb..8969d06c55 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -417,7 +417,9 @@ func (c *Cardano) AddContractListener(ctx context.Context, listener *core.Contra } result, err := c.streams.createListener(ctx, c.streamIDs[namespace], subName, firstEvent, filters) - listener.BackendID = result.ID + if result != nil { + listener.BackendID = result.ID + } return err } From c177dcb3d5ffa8686e5fe5079ef128e0fa69d70c Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 14 Mar 2025 18:26:45 -0400 Subject: [PATCH 33/67] fix: pass full signature in listener Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 8969d06c55..19472ba8d4 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -408,10 +408,14 @@ func (c *Cardano) AddContractListener(ctx context.Context, listener *core.Contra if err != nil { return err } + signature, err := c.GenerateEventSignature(ctx, &f.Event.FFIEventDefinition) + if err != nil { + return err + } filters = append(filters, filter{ eventfilter{ Contract: location.Address, - EventPath: f.Event.Name, + EventPath: signature, }, }) } From f424f721f9a4d2263d74a3d0d53850f59f728ff2 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 14 Mar 2025 22:27:47 -0400 Subject: [PATCH 34/67] feat: use synchronous bulk operation updates for receipt handling Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano.go | 14 ++-- internal/blockchain/cardano/cardano_test.go | 66 +++++++++++++++++-- internal/blockchain/common/common.go | 49 ++++++++++++++ internal/blockchain/common/common_test.go | 72 +++++++++++++++++++++ 4 files changed, 190 insertions(+), 11 deletions(-) diff --git a/internal/blockchain/cardano/cardano.go b/internal/blockchain/cardano/cardano.go index 19472ba8d4..14d8e46d21 100644 --- a/internal/blockchain/cardano/cardano.go +++ b/internal/blockchain/cardano/cardano.go @@ -408,10 +408,7 @@ func (c *Cardano) AddContractListener(ctx context.Context, listener *core.Contra if err != nil { return err } - signature, err := c.GenerateEventSignature(ctx, &f.Event.FFIEventDefinition) - if err != nil { - return err - } + signature, _ := c.GenerateEventSignature(ctx, &f.Event.FFIEventDefinition) filters = append(filters, filter{ eventfilter{ Contract: location.Address, @@ -594,6 +591,7 @@ func (c *Cardano) eventLoop(namespace string) { func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batchID int64, messages []interface{}) error { events := make(common.EventsToDispatch) + updates := make([]*core.OperationUpdate, 0) count := len(messages) for i, msgI := range messages { msgMap, ok := msgI.(map[string]interface{}) @@ -616,7 +614,7 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batc msgBytes, _ := json.Marshal(msgMap) _ = json.Unmarshal(msgBytes, &receipt) - err := common.HandleReceipt(ctx, namespace, c, &receipt, c.callbacks) + err := common.AddReceiptToBatch(ctx, namespace, c, &receipt, &updates) if err != nil { log.L(ctx).Errorf("Failed to process receipt: %+v", msgMap) } @@ -626,6 +624,12 @@ func (c *Cardano) handleMessageBatch(ctx context.Context, namespace string, batc } + if len(updates) > 0 { + err := c.callbacks.BulkOperationUpdates(ctx, namespace, updates) + if err != nil { + return err + } + } // Dispatch all the events from this patch that were successfully parsed and routed to namespaces // (could be zero - that's ok) return c.callbacks.DispatchBlockchainEvents(ctx, events) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index 5b35cbc75e..f9d7a2ced2 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -641,11 +641,11 @@ func TestEventLoopReceiveReceipt(t *testing.T) { tm := &coremocks.OperationCallbacks{} c.SetOperationHandler("ns1", tm) - tm.On("OperationUpdate", mock.MatchedBy(func(update *core.OperationUpdateAsync) bool { - return update.NamespacedOpID == "ns1:5678" && - update.Status == core.OpStatusSucceeded && - update.BlockchainTXID == "txHash" && - update.Plugin == "cardano" + tm.On("BulkOperationUpdates", mock.Anything, mock.MatchedBy(func(updates []*core.OperationUpdate) bool { + return updates[0].NamespacedOpID == "ns1:5678" && + updates[0].Status == core.OpStatusSucceeded && + updates[0].BlockchainTXID == "txHash" && + updates[0].Plugin == "cardano" })).Return(nil) go c.eventLoop("ns1") @@ -653,6 +653,9 @@ func TestEventLoopReceiveReceipt(t *testing.T) { r <- []byte(`{ "batchNumber": 1339, "events": [ + { + "type": "Nonsense" + }, { "type": "Receipt", "headers": { @@ -663,7 +666,7 @@ func TestEventLoopReceiveReceipt(t *testing.T) { "type": "Receipt", "headers": { "requestId": "ns1:5678", - "replyType": "TransactionSuccess" + "type": "TransactionSuccess" }, "transactionHash": "txHash" } @@ -678,6 +681,57 @@ func TestEventLoopReceiveReceipt(t *testing.T) { assert.Equal(t, "ack", parsed.Type) } +func TestEventLoopReceiveReceiptBulkOperationUpdateFail(t *testing.T) { + c, cancel := newTestCardano() + defer cancel() + + r := make(chan []byte) + s := make(chan []byte) + wsm := &wsmocks.WSClient{} + c.wsconns["ns1"] = wsm + wsm.On("Receive").Return((<-chan []byte)(r)) + wsm.On("Send", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + bytes, _ := args.Get(1).([]byte) + s <- bytes + }).Return(nil) + wsm.On("Close").Return() + c.streamIDs["ns1"] = "es12345" + c.closed["ns1"] = make(chan struct{}) + + tm := &coremocks.OperationCallbacks{} + c.SetOperationHandler("ns1", tm) + tm.On("BulkOperationUpdates", mock.Anything, mock.MatchedBy(func(updates []*core.OperationUpdate) bool { + return updates[0].NamespacedOpID == "ns1:5678" && + updates[0].Status == core.OpStatusSucceeded && + updates[0].BlockchainTXID == "txHash" && + updates[0].Plugin == "cardano" + })).Return(errors.New("whoops")) + + go c.eventLoop("ns1") + + r <- []byte(`{ + "batchNumber": 1339, + "events": [ + { + "type": "Receipt", + "headers": { + "requestId": "ns1:5678", + "type": "TransactionSuccess" + }, + "transactionHash": "txHash" + } + ] + }`) + response := <-s + var parsed cardanoWSCommandPayload + err := json.Unmarshal(response, &parsed) + assert.NoError(t, err) + assert.Equal(t, "topic1/ns1", parsed.Topic) + assert.Equal(t, int64(1339), parsed.BatchNumber) + assert.Equal(t, "error", parsed.Type) + assert.Equal(t, "whoops", parsed.Message) +} + func TestSubmitBatchPinNotSupported(t *testing.T) { c, cancel := newTestCardano() defer cancel() diff --git a/internal/blockchain/common/common.go b/internal/blockchain/common/common.go index 0eef61c5e2..b465da9758 100644 --- a/internal/blockchain/common/common.go +++ b/internal/blockchain/common/common.go @@ -456,6 +456,55 @@ func HandleReceipt(ctx context.Context, namespace string, plugin core.Named, rep return nil } +// Common function for synchronously handling receipts from blockchain connectors. +// This won't actually handle the receipt, but will rather collect it into updates. +// The caller will call BulkOperationUpdates with the batch later. +func AddReceiptToBatch(ctx context.Context, namespace string, plugin core.Named, reply *BlockchainReceiptNotification, updates *[]*core.OperationUpdate) error { + l := log.L(ctx) + + if namespace != "" { + opNamespace, _, _ := core.ParseNamespacedOpID(ctx, reply.Headers.ReceiptID) + if opNamespace != namespace { + l.Debugf("Ignoring operation update from other namespace: request=%s tx=%s message=%s", reply.Headers.ReceiptID, reply.TxHash, reply.Message) + return nil + } + } + + if reply.Headers.ReceiptID == "" || reply.Headers.ReplyType == "" { + return fmt.Errorf("reply cannot be processed - missing fields: %+v", reply) + } + + var updateType core.OpStatus + switch reply.Headers.ReplyType { + case "TransactionSuccess": + updateType = core.OpStatusSucceeded + case "TransactionUpdate": + updateType = core.OpStatusPending + default: + updateType = core.OpStatusFailed + } + + // Slightly ugly conversion from ReceiptFromBlockchain -> JSONObject which the generic OperationUpdate() function requires + var output fftypes.JSONObject + obj, err := json.Marshal(reply) + if err != nil { + return fmt.Errorf("reply cannot be processed - marshalling error: %+v", reply) + } + _ = json.Unmarshal(obj, &output) + + l.Infof("Received operation update: status=%s request=%s tx=%s message=%s", updateType, reply.Headers.ReceiptID, reply.TxHash, reply.Message) + *updates = append(*updates, &core.OperationUpdate{ + Plugin: plugin.Name(), + NamespacedOpID: reply.Headers.ReceiptID, + Status: updateType, + BlockchainTXID: reply.TxHash, + ErrorMessage: reply.Message, + Output: output, + }) + + return nil +} + func WrapRESTError(ctx context.Context, errRes *BlockchainRESTError, res *resty.Response, err error, defMsgKey i18n.ErrorMessageKey) error { if errRes != nil && errRes.Error != "" { if res != nil && res.StatusCode() == http.StatusConflict { diff --git a/internal/blockchain/common/common_test.go b/internal/blockchain/common/common_test.go index b59b27a4c4..d56d69d435 100644 --- a/internal/blockchain/common/common_test.go +++ b/internal/blockchain/common/common_test.go @@ -397,6 +397,78 @@ func TestWrongNamespaceReceipt(t *testing.T) { assert.NoError(t, err) } +type MockPlugin struct{} + +func (m *MockPlugin) Name() string { + return "Mock" +} + +func TestGoodSuccessReceiptBatch(t *testing.T) { + var plugin MockPlugin + var reply BlockchainReceiptNotification + reply.Headers.ReceiptID = "ID" + reply.Headers.ReplyType = "TransactionSuccess" + reply.ProtocolID = "123456/098765453" + + updates := []*core.OperationUpdate{} + + err := AddReceiptToBatch(context.Background(), "", &plugin, &reply, &updates) + assert.NoError(t, err) + assert.Equal(t, 1, len(updates)) + + reply.Headers.ReplyType = "TransactionUpdate" + err = AddReceiptToBatch(context.Background(), "", &plugin, &reply, &updates) + assert.NoError(t, err) + assert.Equal(t, 2, len(updates)) + + reply.Headers.ReplyType = "TransactionFailed" + err = AddReceiptToBatch(context.Background(), "", &plugin, &reply, &updates) + assert.NoError(t, err) + assert.Equal(t, 3, len(updates)) +} + +func TestReceiptMarshallingErrorBatch(t *testing.T) { + var plugin MockPlugin + var reply BlockchainReceiptNotification + reply.Headers.ReceiptID = "ID" + reply.Headers.ReplyType = "force-marshall-error" + reply.ProtocolID = "123456/098765453" + + updates := []*core.OperationUpdate{} + + err := AddReceiptToBatch(context.Background(), "", &plugin, &reply, &updates) + assert.Error(t, err) + assert.Regexp(t, ".*[^n]marshalling error.*", err) + assert.Equal(t, 0, len(updates)) +} + +func TestBadReceiptBatch(t *testing.T) { + var plugin MockPlugin + var reply BlockchainReceiptNotification + data := fftypes.JSONAnyPtr(`{}`) + err := json.Unmarshal(data.Bytes(), &reply) + assert.NoError(t, err) + + updates := []*core.OperationUpdate{} + + err = AddReceiptToBatch(context.Background(), "", &plugin, &reply, &updates) + assert.Error(t, err) + assert.Equal(t, 0, len(updates)) +} + +func TestWrongNamespaceReceiptBatch(t *testing.T) { + var plugin MockPlugin + var reply BlockchainReceiptNotification + data := fftypes.JSONAnyPtr(`{}`) + err := json.Unmarshal(data.Bytes(), &reply) + assert.NoError(t, err) + updates := []*core.OperationUpdate{} + + err = AddReceiptToBatch(context.Background(), "wrong", &plugin, &reply, &updates) + assert.NoError(t, err) + assert.Equal(t, 0, len(updates)) +} + func TestErrorWrappingConflict(t *testing.T) { ctx := context.Background() res := &resty.Response{ From 34390c65f620e6e80a4552525ac50ff4d6b5d05e Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 14 Mar 2025 22:28:09 -0400 Subject: [PATCH 35/67] docs: document contract creation Signed-off-by: Simon Gellis --- .../tutorials/custom_contracts/cardano.md | 540 ++++++++++++++++++ 1 file changed, 540 insertions(+) create mode 100644 doc-site/docs/tutorials/custom_contracts/cardano.md diff --git a/doc-site/docs/tutorials/custom_contracts/cardano.md b/doc-site/docs/tutorials/custom_contracts/cardano.md new file mode 100644 index 0000000000..5a3cf2d483 --- /dev/null +++ b/doc-site/docs/tutorials/custom_contracts/cardano.md @@ -0,0 +1,540 @@ +--- +title: Cardano +--- + +# Work with Cardano dApps + +This guide describes the steps to author and deploy a Cardano dApp through FireFly. + +## What is a Cardano dApp? + +Cardano dApps typically have two components: off-chain and on-chain. + + - The off-chain component is written in an ordinary programming language using a Cardano-specific library. It builds transactions, signs them with a private key, and submits them to be published to the chain. The FireFly Cardano connector uses a framework called [Balius](https://github.com/txpipe/balius) for off-chain code. This lets you write transaction-building logic in Rust, which is compiled to WebAssembly and run in response to HTTP requests or new blocks reaching the chain. + + - The on-chain component is a "validator script". Validator scripts are written in domain-specific languages such as [Aiken](https://aiken-lang.org/), and compiled to a bytecode called [UPLC](https://aiken-lang.org/uplc). They take a transaction as input, and return true or false to indicate whether that transaction is valid. ADA and native takens can be locked at the address of one of these scripts; if they are, then they can only be spent by transactions which the script considers valid. + +## Writing a dApp + +First, decide on the contract which your dApp will satisfy. FireFly uses [JSON schema](https://json-schema.org/) to describe its contracts. Create a file named `contract.json`. An example is below: + +### Contract + +```json +{ + "name": "sample-contract", + "description": "Simple TX submission contract", + "networkName": "sample-contract", + "version": "0.1.0", + "errors": [], + "methods": [ + { + "description": "Sends ADA to a wallet", + "details": {}, + "name": "send_ada", + "params": [ + { + "name": "fromAddress", + "schema": { + "type": "string" + } + }, + { + "name": "toAddress", + "schema": { + "type": "string" + } + }, + { + "name": "amount", + "schema": { + "type": "integer" + } + } + ], + "returns": [] + } + ], + "events": [ + { + "name": "TransactionAccepted", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + { + "name": "TransactionRolledBack", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + { + "name": "TransactionFinalized", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + } + ] +} +``` + +This is describing a contract with a single method, named `send_ada`. This method takes three parameters: a `fromAddress`, a `toAddress`, and an `amount`. + +It also emits three events: + - `TransactionAccepted(string)` is emitted when the transaction is included in a block. + - `TransactionRolledBack(string)` is emitted if the transaction was included in a block, and that block got rolled back. This happens maybe once or twice a day on the Cardano network, so it is unlikely that you will ever see it in practice (but more likely than some other chains). + - `TransactionFinalized(string)` is emitted when the transaction has been on the chain for "long enough" that it is effectively immutable. It is up to your tolerance risk. + +These three events are all automatically handled by the connector. + +### The dApp itself + +The Balius framework requires you to write your dApp in Rust, and compile it to WebAssembly. +Set up a new Rust project with the contents below: + +`cargo.toml`: +```toml +[package] +name = "sample-contract" +version = "0.1.0" +edition = "2021" + +[dependencies] +# The version of firefly-balius should match the version of firefly-cardano which you are using. +firefly-balius = { git = "https://github.com/hyperledger/firefly-cardano", rev = "0.3.1" } +pallas-addresses = "0.32" +serde = { version = "1", features = ["derive"] } + +[lib] +crate-type = ["cdylib"] +``` + +Code for a sample contract is below: + +`src/lib.rs`: +```rust +use std::collections::HashSet; + +use balius_sdk::{ + txbuilder::{ + AddressPattern, BuildError, FeeChangeReturn, OutputBuilder, TxBuilder, UtxoPattern, + UtxoSource, + }, + Ack, Config, FnHandler, NewTx, Params, Worker, WorkerResult, +}; +use firefly_balius::{ + balius_sdk::{self, Json}, kv, CoinSelectionInput, FinalityMonitor, FinalizationCondition, SubmittedTx, WorkerExt as _ +}; +use pallas_addresses::Address; +use serde::{Deserialize, Serialize}; + +// For each method, define a struct with all its parameters. +// Don't forget the "rename_all = camelCase" annotation. +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct SendAdaRequest { + pub from_address: String, + pub to_address: String, + pub amount: u64, +} + +#[derive(Serialize, Deserialize, Default)] +#[serde(rename_all = "camelCase")] +struct CurrentState { + submitted_txs: HashSet, +} + +/// This function builds a transaction to send ADA from one address to another. +fn send_ada(_: Config<()>, req: Params) -> WorkerResult { + let from_address = + Address::from_bech32(&req.from_address).map_err(|_| BuildError::MalformedAddress)?; + + // Build an "address source" describing where the funds to transfer are coming from. + let address_source = UtxoSource::Search(UtxoPattern { + address: Some(AddressPattern { + exact_address: from_address.to_vec(), + }), + ..UtxoPattern::default() + }); + + // In Cardano, addresses don't hold ADA or native tokens directly. + // Instead, they control uTXOS (unspent transaction outputs), + // and those uTXOs contain some amount of ADA and native tokens. + // You can't spent part of a uTXO in a transaction; instead, transactions + // include inputs with more funds than they need, and a "change" output + // to give any excess funds back to the original sender. + + // Build a transaction with + // - One or more inputs containing at least `amount` ADA at the address `from_address` + // - One output containing exactly `amount` ADA at the address `to_address` + // - One output containing any change at the address `from_address` + let tx = TxBuilder::new() + .with_input(CoinSelectionInput(address_source.clone(), req.amount)) + .with_output( + OutputBuilder::new() + .address(req.to_address.clone()) + .with_value(req.amount), + ) + .with_output(FeeChangeReturn(address_source)); + + // Return that TX. The framework will sign and submit it. + Ok(NewTx(Box::new(tx))) +} + +/// This function is called when a TX produced by this contract is submitted to the blockchain, but before it has reached a block. +fn handle_submit(_: Config<()>, tx: SubmittedTx) -> WorkerResult { + // Tell the framework that we want it to monitor this transaction. + // This enables the TransactionApproved, TransactionRolledBack, and TransactionFinalized events from before. + // Note that we decide the transaction has been finalized after 4 blocks have reached the chain. + FinalityMonitor.monitor_tx(&tx.hash, FinalizationCondition::AfterBlocks(4))?; + + // Keep track of which TXs have been submitted. + let mut state: CurrentState = kv::get("current_state")?.unwrap_or_default(); + state.submitted_txs.insert(tx.hash); + kv::set("current_state", &state)?; + + Ok(Ack) +} + +fn query_current_state(_: Config<()>, _: Params<()>) -> WorkerResult> { + Ok(Json(kv::get("current_state")?.unwrap_or_default())) +} + +#[balius_sdk::main] +fn main() -> Worker { + Worker::new() + .with_request_handler("send_ada", FnHandler::from(send_ada)) + .with_request_handler("current_state", FnHandler::from(query_current_state)) + .with_tx_submitted_handler(handle_submit) +} + +``` + +## Deploying the dApp + +You can use the `firefly-cardano-deploy` tool to deploy this dApp to your running FireFly instance. +This tool will + - Compile your dApp to WebAssembly + - Deploy that WebAssembly to a running FireFly node + - Deploy your interface to that FireFly node + - Create an API for that interface + +```sh +# The version here should match the version of firefly-cardano which you are using. +cargo install --git https://github.com/hyperledger/firefly-cardano --version 0.3.1 firefly-cardano-deploy + +CONTRACT_PATH="/path/to/your/dapp" +FIREFLY_URL="http://localhost:5000" +firefly-cardano-deploy --contract-path "$CONTRACT_PATH" --firefly-url "$FIREFLY_URL" +``` + +After this runs, you should see output like the following: +``` +Contract location: {"address":"sample-contract@0.1.0"} +Interface: {"id":"120d061e-bcda-4c2f-a296-018d7cd62a04"} +API available at http://127.0.0.1:5000/api/v1/namespaces/default/apis/sample-contract-0.1.0 +Swagger UI at http://127.0.0.1:5000/api/v1/namespaces/default/apis/sample-contract-0.1.0/api +``` + +## Invoking the dApp + +Now that we've set everything up, let's prove it works by sending 1 ADA back to the faucet. + +### Request + +`POST` `http://localhost:5000/api/v1/namespaces/default/apis/simple-storage-0.1.0/invoke/send_ada` + +```json +{ + "input": { + "fromAddress": "", + "toAddress": "addr_test1vqeux7xwusdju9dvsj8h7mca9aup2k439kfmwy773xxc2hcu7zy99", + "amount": 1000000 + } +} +``` + +### Response +```json +{ + "id": "d191e6ab-3e9c-4a67-99df-8b96b7026e89" +} +``` + +## Create a blockchain event listener + +Now that we've seen how to submit transactions, let's look at how to receive blockchain events so we know when things are happening in realtime. + +Remember that this contract is emitting events when transactions are accepted, rolled back, or finalized. In order to receive these events, we first need to instruct FireFly to listen for this specific type of blockchain event. To do this, we create an **Event Listener**. The `/contracts/listeners` endpoint is RESTful so there are `POST`, `GET`, and `DELETE` methods available on it. To create a new listener, we will make a `POST` request. We are going to tell FireFly to listen to events with name `"TransactionAccepted"`, `"TransactionRolledBack"`, or `"TransactionFinalized"` from the FireFly Interface we defined earlier, referenced by its ID. We will also tell FireFly which contract address we expect to emit these events, and the topic to assign these events to. You can specify multiple filters for a listener, in this case we specify one for each event. Topics are a way for applications to subscribe to events they are interested in. + +### Request + +```json +{ + "filters": [ + { + "interface": {"id":"120d061e-bcda-4c2f-a296-018d7cd62a04"}, + "location": {"address":"sample-contract@0.1.0"}, + "eventPath": "TransactionAccepted" + }, + { + "interface": {"id":"120d061e-bcda-4c2f-a296-018d7cd62a04"}, + "location": {"address":"sample-contract@0.1.0"}, + "eventPath": "TransactionRolledBack" + }, + { + "interface": {"id":"120d061e-bcda-4c2f-a296-018d7cd62a04"}, + "location": {"address":"sample-contract@0.1.0"}, + "eventPath": "TransactionFinalized" + } + ], + "options": { + "firstEvent": "newest" + }, + "topic": "sample-contract" +} +``` + +### Response + +```json +{ + "id": "b314d8af-2641-4bf2-b386-2e658f3e76a5", + "interface": { + "id": "120d061e-bcda-4c2f-a296-018d7cd62a04" + }, + "namespace": "default", + "name": "01JPB97KWQ1ZBPWQDNDMEYDMT2", + "backendId": "01JPB97KWQ1ZBPWQDNDMEYDMT2", + "location": { + "address": "sample-contract@0.1.0" + }, + "created": "2025-03-14T21:33:44.308362312Z", + "event": { + "name": "TransactionAccepted", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + "signature": "sample-contract@0.1.0:TransactionAccepted(string);sample-contract@0.1.0:TransactionRolledBack(string);sample-contract@0.1.0:TransactionRFinalized(string)", + "topic": "sample-contract", + "options": { + "firstEvent": "newest" + }, + "filters": [ + { + "event": { + "name": "TransactionAccepted", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + "location": { + "address": "sample-contract@0.1.0" + }, + "interface": { + "id": "120d061e-bcda-4c2f-a296-018d7cd62a04" + }, + "signature": "sample-contract@0.1.0:TransactionAccepted(string)" + }, + { + "event": { + "name": "TransactionRolledBack", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + "location": { + "address": "sample-contract@0.1.0" + }, + "interface": { + "id": "120d061e-bcda-4c2f-a296-018d7cd62a04" + }, + "signature": "sample-contract@0.1.0:TransactionRolledBack(string)" + } + { + "event": { + "name": "TransactionFinalized", + "description": "", + "params": [ + { + "name": "transactionId", + "schema": { + "type": "string" + } + } + ] + }, + "location": { + "address": "sample-contract@0.1.0" + }, + "interface": { + "id": "120d061e-bcda-4c2f-a296-018d7cd62a04" + }, + "signature": "sample-contract@0.1.0:TransactionFinalized(string)" + } + ] +} +``` + +We can see in the response, that FireFly pulls all the schema information from the FireFly Interface that we broadcasted earlier and creates the listener with that schema. This is useful so that we don't have to enter all of that data again. + +## Subscribe to events from our contract + +Now that we've told FireFly that it should listen for specific events on the blockchain, we can set up a **Subscription** for FireFly to send events to our app. To set up our subscription, we will make a `POST` to the `/subscriptions` endpoint. + +We will set a friendly name `sample-contract` to identify the Subscription when we are connecting to it in the next step. + +We're also going to set up a filter to only send events blockchain events from our listener that we created in the previous step. To do that, we'll **copy the listener ID** from the step above (`b314d8af-2641-4bf2-b386-2e658f3e76a5`) and set that as the value of the `listener` field in the example below: + +### Request + +`POST` `http://localhost:5000/api/v1/namespaces/default/subscriptions` + +```json +{ + "namespace": "default", + "name": "sample-contract", + "transport": "websockets", + "filter": { + "events": "blockchain_event_received", + "blockchainevent": { + "listener": "b314d8af-2641-4bf2-b386-2e658f3e76a5" + } + }, + "options": { + "firstEvent": "oldest" + } +} +``` + +### Response + +```json +{ + "id": "f826269c-65ed-4634-b24c-4f399ec53a32", + "namespace": "default", + "name": "sample-contract", + "transport": "websockets", + "filter": { + "events": "blockchain_event_received", + "message": {}, + "transaction": {}, + "blockchainevent": { + "listener": "b314d8af-2641-4bf2-b386-2e658f3e76a5" + } + }, + "options": { + "firstEvent": "-1", + "withData": false + }, + "created": "2025-03-15T17:35:30.131698921Z", + "updated": null +} +``` + +## Receive custom smart contract events + +The last step is to connect a WebSocket client to FireFly to receive the event. You can use any WebSocket client you like, such as [Postman](https://www.postman.com/) or a command line app like [`websocat`](https://github.com/vi/websocat). + +Connect your WebSocket client to `ws://localhost:5000/ws`. + +After connecting the WebSocket client, send a message to tell FireFly to: + +- Start sending events +- For the Subscription named `sample-contract` +- On the `default` namespace +- Automatically "ack" each event which will let FireFly immediately send the next event when available + +```json +{ + "type": "start", + "name": "sample-contract", + "namespace": "default", + "autoack": true +} +``` + +### WebSocket event + +After creating the subscription, you should see an event arrive on the connected WebSocket client that looks something like this: + +```json +{ + "id": "0f4a31d6-9743-4537-82df-5a9c76ccbd1e", + "sequence": 24, + "type": "blockchain_event_received", + "namespace": "default", + "reference": "dd3e1554-c832-47a8-898e-f1ee406bea41", + "created": "2025-03-15T17:32:27.824417878Z", + "blockchainevent": { + "id": "dd3e1554-c832-47a8-898e-f1ee406bea41", + "sequence": 7, + "source": "cardano", + "namespace": "default", + "name": "TransactionAccepted", + "listener": "1bfa3b0f-3d90-403e-94a4-af978d8c5b14", + "protocolId": "000000000010/000000/000000", + "output": { + "transactionId": "2fad3b4e560b562d32b2e54e25495d11ed342dafe7eba76bc1c4632bbc23d468" + }, + "info": { + "address": "0xa5ea5d0a6b2eaf194716f0cc73981939dca26da1", + "blockNumber": "10", + "logIndex": "0", + "signature": "TransactionAccepted(string)", + "subId": "sb-724b8416-786d-4e67-4cd3-5bae4a26eb0e", + "timestamp": "1647365460", + "transactionHash": "2fad3b4e560b562d32b2e54e25495d11ed342dafe7eba76bc1c4632bbc23d468", + "transactionIndex": "0x0" + }, + "timestamp": "2025-03-15T17:31:00Z", + "tx": { + "type": "" + } + }, + "subscription": { + "id": "f826269c-65ed-4634-b24c-4f399ec53a32", + "namespace": "default", + "name": "sample-contract" + } +} +``` + +You can see in the event received over the WebSocket connection, the blockchain event that was emitted from our first transaction, which happened in the past. We received this event, because when we set up both the Listener, and the Subscription, we specified the `"firstEvent"` as `"oldest"`. This tells FireFly to look for this event from the beginning of the blockchain, and that your app is interested in FireFly events since the beginning of FireFly's event history. From 6ef9ba7d1c39f93e574704da25a093c773bb2910 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 14 Mar 2025 23:03:09 -0400 Subject: [PATCH 36/67] fix: address captialization issues Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/chains/cardano.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-site/docs/tutorials/chains/cardano.md b/doc-site/docs/tutorials/chains/cardano.md index fe15d50f32..9dc70fda66 100644 --- a/doc-site/docs/tutorials/chains/cardano.md +++ b/doc-site/docs/tutorials/chains/cardano.md @@ -18,9 +18,9 @@ A Cardano stack can be run in two different ways; with a firefly > **NOTE**: The cardano-node communicates over a Unix socket, so this will not work on Windows. -Start a local cardano node. The fastest way to do this is to [use mithril](https://mithril.network/doc/manual/getting-started/bootstrap-cardano-node/) to bootstrap the node. +Start a local Cardano node. The fastest way to do this is to [use mithril](https://mithril.network/doc/manual/getting-started/bootstrap-cardano-node/) to bootstrap the node. -For an example of how to bootstrap and run the cardano node in docker, see [the firefly-cardano repo](https://github.com/hyperledger/firefly-cardano/blob/1be3b08d301d6d6eeb5b79e40cf3dbf66181c3de/infra/docker-compose.node.yaml#L4). +For an example of how to bootstrap and run the Cardano node in Docker, see [the firefly-cardano repo](https://github.com/hyperledger/firefly-cardano/blob/1be3b08d301d6d6eeb5b79e40cf3dbf66181c3de/infra/docker-compose.node.yaml#L4). The cardano-node exposes a Unix socket named `node.socket`. Pass that to firefly-cli. The example below uses `firefly-cli` to - Create a new Cardano-based stack named `dev` with 1 member. From e19609db8af798fd40d34df6131fbc030b3356c2 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sat, 15 Mar 2025 00:05:33 -0400 Subject: [PATCH 37/67] fix: update cardano images Signed-off-by: Simon Gellis --- manifest.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 493d42cde6..bb5f484796 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { "cardanoconnect": { "image": "ghcr.io/hyperledger/firefly-cardanoconnect", - "tag": "v0.3.0", - "sha": "3980f1d549a6cb1f397f8e66f6ed5bdd29a91580c68fd413ace8cc011dab9178" + "tag": "v0.4.0", + "sha": "d691cb0efe996b14b56ca90e88062ba79902a9d3a00c42324a6f2a6f4c769de7" }, "cardanosigner": { "image": "ghcr.io/hyperledger/firefly-cardanosigner", - "tag": "v0.3.0", - "sha": "ac5ee089513f734c0673f3faa136ac04b5918f3a27a5bd57b840e63a74984e32" + "tag": "v0.4.0", + "sha": "d5d391a25525f33ef30d9c1a21c109c6221e7aeba6afb4bf3a11f0933f594044" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", @@ -66,7 +66,7 @@ }, "ui": { "tag": "v1.3.1", - "release": "v1.3.1" + "release": "v1.3.1" }, "cli": { "tag": "v1.3.3-rc.1" From 0c170a773d4e2a2453e2828e5c372021db314996 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 17 Mar 2025 13:56:06 -0400 Subject: [PATCH 38/67] fix: finish sentences in docs Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/chains/cardano.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/doc-site/docs/tutorials/chains/cardano.md b/doc-site/docs/tutorials/chains/cardano.md index 9dc70fda66..1e2ccb5fa3 100644 --- a/doc-site/docs/tutorials/chains/cardano.md +++ b/doc-site/docs/tutorials/chains/cardano.md @@ -12,7 +12,7 @@ If you haven't set up the FireFly CLI already, please go back to the Getting Sta ## Create the stack -A Cardano stack can be run in two different ways; with a firefly +A Cardano stack can be run in two different ways; using a local Cardano node, or a remote Blockfrost address. ### Option 1: Use a local Cardano node @@ -23,13 +23,11 @@ Start a local Cardano node. The fastest way to do this is to [use mithril](https For an example of how to bootstrap and run the Cardano node in Docker, see [the firefly-cardano repo](https://github.com/hyperledger/firefly-cardano/blob/1be3b08d301d6d6eeb5b79e40cf3dbf66181c3de/infra/docker-compose.node.yaml#L4). The cardano-node exposes a Unix socket named `node.socket`. Pass that to firefly-cli. The example below uses `firefly-cli` to - - Create a new Cardano-based stack named `dev` with 1 member. - - Disable `multiparty` mode. + - Create a new Cardano-based stack named `dev`. - Connect to the local Cardano node, which is running in the [preview network](https://preview.cexplorer.io/). ```sh -ff init cardano dev 1 \ - --multiparty false \ +ff init cardano dev \ --network preview \ --socket /path/to/ipc/node.socket ``` @@ -39,13 +37,11 @@ ff init cardano dev 1 \ The Cardano connector can also use the [paid Blockfrost API](https://blockfrost.io/) in place of a local Cardano node. The example below uses firefly-cli to - - Create a new Cardano-based stack named `dev` with 1 member. - - Disable `multiparty` mode. - - Use the given block + - Create a new Cardano-based stack named `dev` + - Use the given blockfrost key for the preview network. ```sh -ff init cardano dev 1 \ - --multiparty false \ +ff init cardano dev \ --network preview \ --blockfrost-key previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` From 725f7069064a7312ab62f20f65f7f6c9ae42245d Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 17 Mar 2025 13:56:26 -0400 Subject: [PATCH 39/67] fix: correct timing-out test Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index f9d7a2ced2..b1a4bbb658 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -173,8 +173,12 @@ func TestInitAndStartWithCardanoConnect(t *testing.T) { fromServer <- `[]` // empty batch, will be ignored, but acked reply := <-toServer assert.Equal(t, `{"type":"ack","topic":"topic1/ns1"}`, reply) - fromServer <- `["different kind of bad batch"]` - fromServer <- `[{}]` // bad batch + fromServer <- `["different kind of bad batch"]` // bad batch, will be ignored but acked + reply = <-toServer + assert.Equal(t, `{"type":"ack","topic":"topic1/ns1"}`, reply) + fromServer <- `[{}]` // bad batch, will be ignored but acked + reply = <-toServer + assert.Equal(t, `{"type":"ack","topic":"topic1/ns1"}`, reply) // Bad data will be ignored fromServer <- `!json` From 05bab1bf981b4a691fada839baf7e46ff7bbfbe3 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Fri, 21 Mar 2025 16:45:51 -0400 Subject: [PATCH 40/67] feat: update docs and connector images Signed-off-by: Simon Gellis --- .../tutorials/custom_contracts/cardano.md | 32 ++++++++++--------- manifest.json | 8 ++--- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/doc-site/docs/tutorials/custom_contracts/cardano.md b/doc-site/docs/tutorials/custom_contracts/cardano.md index 5a3cf2d483..f5d60d7c4d 100644 --- a/doc-site/docs/tutorials/custom_contracts/cardano.md +++ b/doc-site/docs/tutorials/custom_contracts/cardano.md @@ -100,7 +100,7 @@ This is describing a contract with a single method, named `send_ada`. This metho It also emits three events: - `TransactionAccepted(string)` is emitted when the transaction is included in a block. - - `TransactionRolledBack(string)` is emitted if the transaction was included in a block, and that block got rolled back. This happens maybe once or twice a day on the Cardano network, so it is unlikely that you will ever see it in practice (but more likely than some other chains). + - `TransactionRolledBack(string)` is emitted if the transaction was included in a block, and that block got rolled back. This happens maybe once or twice a day on the Cardano network, which is more likely than some other chains, so your code must be able to gracefully handle rollbacks. - `TransactionFinalized(string)` is emitted when the transaction has been on the chain for "long enough" that it is effectively immutable. It is up to your tolerance risk. These three events are all automatically handled by the connector. @@ -119,7 +119,7 @@ edition = "2021" [dependencies] # The version of firefly-balius should match the version of firefly-cardano which you are using. -firefly-balius = { git = "https://github.com/hyperledger/firefly-cardano", rev = "0.3.1" } +firefly-balius = { git = "https://github.com/hyperledger/firefly-cardano", rev = "0.4.1" } pallas-addresses = "0.32" serde = { version = "1", features = ["derive"] } @@ -138,10 +138,11 @@ use balius_sdk::{ AddressPattern, BuildError, FeeChangeReturn, OutputBuilder, TxBuilder, UtxoPattern, UtxoSource, }, - Ack, Config, FnHandler, NewTx, Params, Worker, WorkerResult, + Ack, Config, FnHandler, Params, Worker, WorkerResult, }; use firefly_balius::{ - balius_sdk::{self, Json}, kv, CoinSelectionInput, FinalityMonitor, FinalizationCondition, SubmittedTx, WorkerExt as _ + balius_sdk::{self, Json}, + kv, CoinSelectionInput, FinalizationCondition, NewMonitoredTx, SubmittedTx, WorkerExt as _, }; use pallas_addresses::Address; use serde::{Deserialize, Serialize}; @@ -163,7 +164,7 @@ struct CurrentState { } /// This function builds a transaction to send ADA from one address to another. -fn send_ada(_: Config<()>, req: Params) -> WorkerResult { +fn send_ada(_: Config<()>, req: Params) -> WorkerResult { let from_address = Address::from_bech32(&req.from_address).map_err(|_| BuildError::MalformedAddress)?; @@ -176,9 +177,9 @@ fn send_ada(_: Config<()>, req: Params) -> WorkerResult { }); // In Cardano, addresses don't hold ADA or native tokens directly. - // Instead, they control uTXOS (unspent transaction outputs), - // and those uTXOs contain some amount of ADA and native tokens. - // You can't spent part of a uTXO in a transaction; instead, transactions + // Instead, they control UTxOs (unspent transaction outputs), + // and those UTxOs contain some amount of ADA and native tokens. + // You can't spent part of a UTxO in a transaction; instead, transactions // include inputs with more funds than they need, and a "change" output // to give any excess funds back to the original sender. @@ -195,17 +196,18 @@ fn send_ada(_: Config<()>, req: Params) -> WorkerResult { ) .with_output(FeeChangeReturn(address_source)); - // Return that TX. The framework will sign and submit it. - Ok(NewTx(Box::new(tx))) + // Return that TX. The framework will sign, submit, and monitor it. + // By returning a `NewMonitoredTx`, we tell the framework that we want it to monitor this transaction. + // This enables the TransactionApproved, TransactionRolledBack, and TransactionFinalized events from before. + // Note that we decide the transaction has been finalized after 4 blocks have reached the chain. + Ok(NewMonitoredTx( + Box::new(tx), + FinalizationCondition::AfterBlocks(4), + )) } /// This function is called when a TX produced by this contract is submitted to the blockchain, but before it has reached a block. fn handle_submit(_: Config<()>, tx: SubmittedTx) -> WorkerResult { - // Tell the framework that we want it to monitor this transaction. - // This enables the TransactionApproved, TransactionRolledBack, and TransactionFinalized events from before. - // Note that we decide the transaction has been finalized after 4 blocks have reached the chain. - FinalityMonitor.monitor_tx(&tx.hash, FinalizationCondition::AfterBlocks(4))?; - // Keep track of which TXs have been submitted. let mut state: CurrentState = kv::get("current_state")?.unwrap_or_default(); state.submitted_txs.insert(tx.hash); diff --git a/manifest.json b/manifest.json index bb5f484796..68ff26f9e5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { "cardanoconnect": { "image": "ghcr.io/hyperledger/firefly-cardanoconnect", - "tag": "v0.4.0", - "sha": "d691cb0efe996b14b56ca90e88062ba79902a9d3a00c42324a6f2a6f4c769de7" + "tag": "v0.4.1", + "sha": "78b1008bd62892f6eda197b5047d94e61621d0f06b299422ff8ed9b34ee5ce50" }, "cardanosigner": { "image": "ghcr.io/hyperledger/firefly-cardanosigner", - "tag": "v0.4.0", - "sha": "d5d391a25525f33ef30d9c1a21c109c6221e7aeba6afb4bf3a11f0933f594044" + "tag": "v0.4.1", + "sha": "d0b76613ccc70ff63e68b137766eb009d589489631cee6aabf2b45e33a1ca5d3" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", From cb828305f4ee47904732dc3f28512bfdf70ad21d Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Tue, 25 Mar 2025 14:42:33 +0000 Subject: [PATCH 41/67] fix release notes list formatting Signed-off-by: Enrique Lacal --- doc-site/docs/releasenotes/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc-site/docs/releasenotes/index.md b/doc-site/docs/releasenotes/index.md index 1c9a19473f..e2eeff128c 100644 --- a/doc-site/docs/releasenotes/index.md +++ b/doc-site/docs/releasenotes/index.md @@ -9,6 +9,7 @@ title: Release Notes ## [v1.3.3 - Mar 25, 2025](https://github.com/hyperledger/firefly/releases/tag/v1.3.3) What's New: + - Add new interface for blockchain plugins to stream receipt notifications in transactional batches - For blockchain connectors that have an `ack` based reliable receipt stream (or other checkpoint system) - Allows strictly ordered delivery of receipts from blockchain plugins that support it From a8a314f9777416bad7a7bb0ab2967bb4714c4d97 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Tue, 1 Apr 2025 11:20:53 +0100 Subject: [PATCH 42/67] fix: subscriptions historical filtering - a subscription always has a transport Signed-off-by: Enrique Lacal --- internal/events/event_manager.go | 2 -- internal/events/event_manager_test.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/events/event_manager.go b/internal/events/event_manager.go index 9a57bda107..32ea04dce3 100644 --- a/internal/events/event_manager.go +++ b/internal/events/event_manager.go @@ -311,8 +311,6 @@ func (em *eventManager) QueueBatchRewind(batchID *fftypes.UUID) { } func (em *eventManager) FilterHistoricalEventsOnSubscription(ctx context.Context, events []*core.EnrichedEvent, sub *core.Subscription) ([]*core.EnrichedEvent, error) { - // Transport must be provided for validation, but we're not using it for event delivery so fake the transport - sub.Transport = "websockets" subscriptionDef, err := em.subManager.parseSubscriptionDef(ctx, sub) if err != nil { return nil, err diff --git a/internal/events/event_manager_test.go b/internal/events/event_manager_test.go index ac06c88c08..b1e4e16e62 100644 --- a/internal/events/event_manager_test.go +++ b/internal/events/event_manager_test.go @@ -664,6 +664,7 @@ func TestEventFilterOnSubscriptionMatchesEventType(t *testing.T) { } subscription := &core.Subscription{ + Transport: "websockets", Filter: core.SubscriptionFilter{ Events: core.EventTypeIdentityConfirmed.String(), }, From 4780d442063eb8efa551561d8e9afa9e42445f0f Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 28 Apr 2025 14:06:47 -0400 Subject: [PATCH 43/67] Update project go version to 1.24.2 Signed-off-by: Simon Gellis --- .github/workflows/go.yml | 6 +++--- .github/workflows/integration.yml | 4 ++-- Dockerfile | 12 ++++++------ go.mod | 4 ++-- go.work | 4 ++-- manifest.json | 6 +++--- smart_contracts/fabric/custompin-sample/go.mod | 2 +- smart_contracts/fabric/firefly-go/go.mod | 2 +- test/data/contracts/assetcreator/go.mod | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fe7fc78a79..6b8257cbd4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.22 + go-version: 1.24 - name: Build and Test run: make @@ -54,7 +54,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.22 + go-version: 1.24 - name: Build Docker image run: make docker @@ -146,7 +146,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.22 + go-version: 1.24 - name: Download Docker image uses: actions/download-artifact@v4 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 256b3bc77b..ab9951cb37 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -57,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.22 + go-version: 1.24 - name: Update manifest to latest commit for every service run: ./manifestgen.sh head @@ -94,7 +94,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.22 + go-version: 1.24 - name: Update manifest to latest commit for every service run: ./manifestgen.sh head diff --git a/Dockerfile b/Dockerfile index a781407d2d..f6205ea18e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ FROM $FIREFLY_BUILDER_TAG AS firefly-builder ARG BUILD_VERSION ARG GIT_REF RUN apk add make=4.4.1-r2 \ - gcc=13.2.1_git20231014-r0 \ + gcc=14.2.0-r4 \ build-base=0.5-r3 \ - curl=8.12.1-r0 \ - git=2.43.6-r0 + curl=8.12.1-r1 \ + git=2.47.2-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ && chmod -R g+rwX /firefly \ @@ -61,7 +61,7 @@ RUN mkdir -p build/contracts \ && mv combined.json Firefly.json # SBOM -FROM alpine:3.19 AS sbom +FROM alpine:3.21 AS sbom WORKDIR / ADD . /SBOM RUN apk add --no-cache curl @@ -74,9 +74,9 @@ FROM $BASE_TAG ARG UI_TAG ARG UI_RELEASE RUN apk add --update --no-cache \ - sqlite=3.44.2-r0 \ + sqlite=3.48.0-r1 \ postgresql16-client=16.8-r0 \ - curl=8.12.1-r0 \ + curl=8.12.1-r1 \ jq=1.7.1-r0 WORKDIR /firefly RUN chgrp -R 0 /firefly \ diff --git a/go.mod b/go.mod index e3e0e6c4a1..7a057e38bf 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly -go 1.22 +go 1.24 -toolchain go1.22.7 +toolchain go1.24.2 require ( blockwatch.cc/tzgo v1.17.1 diff --git a/go.work b/go.work index 80c90d39e5..033ce7cc93 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,6 @@ -go 1.22 +go 1.24 -toolchain go1.22.7 +toolchain go1.24.2 use ( . diff --git a/manifest.json b/manifest.json index edfcd74273..6290d29b9f 100644 --- a/manifest.json +++ b/manifest.json @@ -41,17 +41,17 @@ }, "build": { "firefly-builder": { - "image": "golang:1.22-alpine3.19" + "image": "golang:1.24-alpine3.21" }, "fabric-builder": { - "image": "golang:1.22", + "image": "golang:1.24", "platform": "linux/x86_64" }, "solidity-builder": { "image": "ethereum/solc:0.8.11-alpine" }, "base": { - "image": "alpine:3.19.7" + "image": "alpine:3.21.3" } }, "ui": { diff --git a/smart_contracts/fabric/custompin-sample/go.mod b/smart_contracts/fabric/custompin-sample/go.mod index 0b65a0d98e..89c6b1496a 100644 --- a/smart_contracts/fabric/custompin-sample/go.mod +++ b/smart_contracts/fabric/custompin-sample/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly/custompin_sample -go 1.22 +go 1.24 require ( github.com/hyperledger/fabric-chaincode-go v0.0.0-20240124143825-7dec3c7e7d45 diff --git a/smart_contracts/fabric/firefly-go/go.mod b/smart_contracts/fabric/firefly-go/go.mod index 9166a36bd5..e8c1de0203 100644 --- a/smart_contracts/fabric/firefly-go/go.mod +++ b/smart_contracts/fabric/firefly-go/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly/chaincode-go -go 1.22 +go 1.24 require ( github.com/golang/protobuf v1.5.3 diff --git a/test/data/contracts/assetcreator/go.mod b/test/data/contracts/assetcreator/go.mod index 71092bea0f..11624d2810 100644 --- a/test/data/contracts/assetcreator/go.mod +++ b/test/data/contracts/assetcreator/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly/test/data/assetcreator -go 1.22 +go 1.24 -toolchain go1.22.0 +toolchain go1.24.2 require github.com/hyperledger/fabric-contract-api-go v1.2.2 From 03625d0eeb7520a977b5c9bc7c56b59e2eb107d1 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 28 Apr 2025 14:07:32 -0400 Subject: [PATCH 44/67] Update project x/crypto version to 0.37.0 Signed-off-by: Simon Gellis --- go.mod | 2 +- go.work.sum | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7a057e38bf..67191c892d 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.31.0 // indirect + golang.org/x/crypto v0.37.0 // indirect golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/term v0.27.0 // indirect diff --git a/go.work.sum b/go.work.sum index 863da39d56..656a081819 100644 --- a/go.work.sum +++ b/go.work.sum @@ -356,8 +356,6 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hyperledger/firefly-signer v1.1.20 h1:U/oGj+QuHdFp4NVZyYOzt3RW51m9nsdYQAGGeChG7g0= -github.com/hyperledger/firefly-signer v1.1.20/go.mod h1:4S8Ki1f1d8U+Ujojea/a3mkXnJ5Fuz+JBfrf9HBdyO0= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= @@ -492,14 +490,23 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= From 22281c78027ec945203a25cd87e2a806b9799ef8 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 28 Apr 2025 14:44:57 -0400 Subject: [PATCH 45/67] Update linter version for compatibility Signed-off-by: Simon Gellis --- .golangci.yml | 4 ++-- Makefile | 2 +- go.mod | 6 +++--- go.sum | 8 ++++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 87bbf218a7..074574b99a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,11 +1,11 @@ run: tests: false - skip-dirs: +issues: + exclude-dirs: - "mocks" - "ffconfig" - "test/e2e" linters-settings: - golint: {} gocritic: enabled-checks: [] disabled-checks: diff --git a/Makefile b/Makefile index d77d30cb73..160095e3ec 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ lint: ${LINT} ${MOCKERY}: $(VGO) install github.com/vektra/mockery/v2@latest ${LINT}: - $(VGO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $($(VGO) env GOPATH)/bin v1.64.8 ffcommon: $(eval WSCLIENT_PATH := $(shell $(VGO) list -f '{{.Dir}}' github.com/hyperledger/firefly-common/pkg/wsclient)) diff --git a/go.mod b/go.mod index 67191c892d..4e3568b2c3 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/stretchr/testify v1.8.4 gitlab.com/hfuss/mux-prometheus v0.0.5 golang.org/x/net v0.33.0 - golang.org/x/text v0.21.0 + golang.org/x/text v0.24.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -87,8 +87,8 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.37.0 // indirect golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.27.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/term v0.31.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 52db960a07..67d59b644f 100644 --- a/go.sum +++ b/go.sum @@ -220,6 +220,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e h1:723BNChdd0c2Wk6WOE320qGBiPtYx0F0Bbm1kriShfE= golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -253,6 +255,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -260,6 +264,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -268,6 +274,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= From 261171d6c18dc3929b158e5863c11f2542131bbc Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 28 Apr 2025 14:49:30 -0400 Subject: [PATCH 46/67] Fix makefile Signed-off-by: Simon Gellis --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 160095e3ec..ea8d71c7a8 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ lint: ${LINT} ${MOCKERY}: $(VGO) install github.com/vektra/mockery/v2@latest ${LINT}: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $($(VGO) env GOPATH)/bin v1.64.8 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(shell $(VGO) env GOPATH)/bin v1.64.8 ffcommon: $(eval WSCLIENT_PATH := $(shell $(VGO) list -f '{{.Dir}}' github.com/hyperledger/firefly-common/pkg/wsclient)) From be2a632493d382a6eb303e119e28a1e0b0e5f556 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 29 Apr 2025 11:09:51 -0400 Subject: [PATCH 47/67] Switch to go1.23 and new firefly-core Signed-off-by: Simon Gellis --- .github/workflows/go.yml | 6 ++-- .github/workflows/integration.yml | 4 +-- go.mod | 10 +++--- go.work | 4 +-- go.work.sum | 32 ++++++++++++++----- manifest.json | 4 +-- .../fabric/custompin-sample/go.mod | 2 +- smart_contracts/fabric/firefly-go/go.mod | 2 +- test/data/contracts/assetcreator/go.mod | 4 +-- 9 files changed, 42 insertions(+), 26 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6b8257cbd4..fa9363e15d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: 1.23 - name: Build and Test run: make @@ -54,7 +54,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: 1.23 - name: Build Docker image run: make docker @@ -146,7 +146,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: 1.23 - name: Download Docker image uses: actions/download-artifact@v4 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ab9951cb37..7e1895f753 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -57,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: 1.23 - name: Update manifest to latest commit for every service run: ./manifestgen.sh head @@ -94,7 +94,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: 1.23 - name: Update manifest to latest commit for every service run: ./manifestgen.sh head diff --git a/go.mod b/go.mod index 4e3568b2c3..8908151019 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly -go 1.24 +go 1.23 -toolchain go1.24.2 +toolchain go1.23.0 require ( blockwatch.cc/tzgo v1.17.1 @@ -17,7 +17,7 @@ require ( github.com/golang-migrate/migrate/v4 v4.17.0 github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.1 - github.com/hyperledger/firefly-common v1.4.15 + github.com/hyperledger/firefly-common v1.5.1 github.com/hyperledger/firefly-signer v1.1.20 github.com/jarcoal/httpmock v1.2.0 github.com/lib/pq v1.10.9 @@ -30,7 +30,7 @@ require ( github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.8.4 gitlab.com/hfuss/mux-prometheus v0.0.5 - golang.org/x/net v0.33.0 + golang.org/x/net v0.36.0 golang.org/x/text v0.24.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -85,7 +85,7 @@ require ( github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.37.0 // indirect + golang.org/x/crypto v0.35.0 // indirect golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect golang.org/x/sys v0.32.0 // indirect golang.org/x/term v0.31.0 // indirect diff --git a/go.work b/go.work index 033ce7cc93..20451ae8d1 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,6 @@ -go 1.24 +go 1.23 -toolchain go1.24.2 +toolchain go1.23.0 use ( . diff --git a/go.work.sum b/go.work.sum index 656a081819..ddef2b2b7a 100644 --- a/go.work.sum +++ b/go.work.sum @@ -288,10 +288,16 @@ github.com/fsouza/fake-gcs-server v1.17.0 h1:OeH75kBZcZa3ZE+zz/mFdJ2btt9FgqfjI7g github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= +github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE= +github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= @@ -336,6 +342,7 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= @@ -356,6 +363,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hyperledger/firefly-common v1.5.1 h1:/DREi1ye1HfYr3GDLBhXuugeMzT4zg9EN2uTYFlVY6M= +github.com/hyperledger/firefly-common v1.5.1/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= @@ -436,6 +445,10 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba h1:fhFP5RliM2HW/8XdcO5QngSfFli9GcRIpMXvypTQt6E= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c= @@ -458,6 +471,10 @@ github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/snowflakedb/gosnowflake v1.6.19 h1:KSHXrQ5o7uso25hNIzi/RObXtnSGkFgie91X82KcvMY= github.com/snowflakedb/gosnowflake v1.6.19/go.mod h1:FM1+PWUdwB9udFDsXdfD58NONC0m+MlOSmQRvimobSM= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xanzy/go-gitlab v0.15.0 h1:rWtwKTgEnXyNUGrOArN7yyc3THRkpYcKXIXia9abywQ= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -490,23 +507,22 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= -golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= -golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= diff --git a/manifest.json b/manifest.json index 6290d29b9f..2e28156134 100644 --- a/manifest.json +++ b/manifest.json @@ -41,10 +41,10 @@ }, "build": { "firefly-builder": { - "image": "golang:1.24-alpine3.21" + "image": "golang:1.23-alpine3.21" }, "fabric-builder": { - "image": "golang:1.24", + "image": "golang:1.23", "platform": "linux/x86_64" }, "solidity-builder": { diff --git a/smart_contracts/fabric/custompin-sample/go.mod b/smart_contracts/fabric/custompin-sample/go.mod index 89c6b1496a..ace68e44cc 100644 --- a/smart_contracts/fabric/custompin-sample/go.mod +++ b/smart_contracts/fabric/custompin-sample/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly/custompin_sample -go 1.24 +go 1.23 require ( github.com/hyperledger/fabric-chaincode-go v0.0.0-20240124143825-7dec3c7e7d45 diff --git a/smart_contracts/fabric/firefly-go/go.mod b/smart_contracts/fabric/firefly-go/go.mod index e8c1de0203..fb496e8ef0 100644 --- a/smart_contracts/fabric/firefly-go/go.mod +++ b/smart_contracts/fabric/firefly-go/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly/chaincode-go -go 1.24 +go 1.23 require ( github.com/golang/protobuf v1.5.3 diff --git a/test/data/contracts/assetcreator/go.mod b/test/data/contracts/assetcreator/go.mod index 11624d2810..a1a1697b1a 100644 --- a/test/data/contracts/assetcreator/go.mod +++ b/test/data/contracts/assetcreator/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly/test/data/assetcreator -go 1.24 +go 1.23 -toolchain go1.24.2 +toolchain go1.23.0 require github.com/hyperledger/fabric-contract-api-go v1.2.2 From 33783aeb441ed0d2cce798b016ec590158484425 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 29 Apr 2025 11:33:39 -0400 Subject: [PATCH 48/67] Fix tests Signed-off-by: Simon Gellis --- doc-site/docs/swagger/swagger.yaml | 2585 +++++++++++++++++ go.mod | 16 +- go.sum | 20 + go.work | 4 +- go.work.sum | 26 +- internal/apiserver/ffi2swagger_test.go | 32 +- .../chaincode/mocks/chaincodestub.go | 98 +- .../fabric/custompin-sample/go.mod | 2 +- .../chaincode/mocks/chaincodestub.go | 98 +- test/data/contracts/assetcreator/go.mod | 4 +- 10 files changed, 2815 insertions(+), 70 deletions(-) diff --git a/doc-site/docs/swagger/swagger.yaml b/doc-site/docs/swagger/swagger.yaml index cfac89b6bb..96668c639a 100644 --- a/doc-site/docs/swagger/swagger.yaml +++ b/doc-site/docs/swagger/swagger.yaml @@ -81,18 +81,22 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -106,10 +110,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the @@ -179,10 +186,12 @@ paths: interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -196,6 +205,8 @@ paths: smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string name: description: The name that is used in the URL to access the API type: string @@ -213,14 +224,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -234,10 +248,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -278,14 +295,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -299,10 +319,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -393,14 +416,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -414,10 +440,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -486,10 +515,12 @@ paths: interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -503,6 +534,8 @@ paths: smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string name: description: The name that is used in the URL to access the API type: string @@ -520,14 +553,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -541,10 +577,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -585,14 +624,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -606,10 +648,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -677,6 +722,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -684,11 +730,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -700,6 +748,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -712,6 +761,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -728,6 +779,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -744,11 +796,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -760,6 +814,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -772,6 +827,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -789,16 +846,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -815,11 +875,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -831,6 +893,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -843,6 +906,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -854,6 +919,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -866,6 +932,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -955,11 +1023,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -971,10 +1042,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -987,6 +1060,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -995,6 +1069,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -1002,6 +1078,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -1041,12 +1118,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -1118,6 +1197,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -1126,6 +1206,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -1150,6 +1231,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -1158,6 +1240,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -1181,6 +1264,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -1192,6 +1276,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -1200,6 +1285,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -1224,6 +1310,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -1232,6 +1319,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -1255,6 +1343,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -1382,6 +1471,7 @@ paths: application/json: schema: items: + nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -1390,10 +1480,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -1414,6 +1506,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -1426,6 +1519,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -1439,11 +1534,13 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -1468,6 +1565,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note @@ -1482,6 +1580,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -1489,10 +1589,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -1505,6 +1607,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -1514,14 +1618,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -1533,6 +1640,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -1543,6 +1652,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -1601,6 +1711,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -1621,6 +1732,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -1633,18 +1745,23 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -1673,10 +1790,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -1697,6 +1816,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -1709,6 +1829,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -1722,11 +1844,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -1749,6 +1873,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -1763,6 +1888,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -1770,10 +1897,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -1786,6 +1915,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -1795,14 +1926,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -1814,6 +1948,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -1824,6 +1960,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -1894,6 +2031,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -1901,11 +2039,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -1917,6 +2057,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -1929,6 +2070,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -1945,6 +2088,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -1961,11 +2105,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -1977,6 +2123,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -1989,6 +2136,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -2006,16 +2155,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -2032,11 +2184,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -2048,6 +2202,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2060,6 +2215,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -2071,6 +2228,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2083,6 +2241,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -2120,6 +2280,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -2127,11 +2288,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -2143,6 +2306,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2155,6 +2319,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -2171,6 +2337,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -2187,11 +2354,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -2203,6 +2372,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2215,6 +2385,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -2232,16 +2404,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -2258,11 +2433,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -2274,6 +2451,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2286,6 +2464,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -2297,6 +2477,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -2309,6 +2490,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -2392,6 +2575,8 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string options: additionalProperties: description: A map of named inputs that will be passed through @@ -2524,6 +2709,7 @@ paths: application/json: schema: items: + nullable: true properties: author: description: The DID of identity of the submitter @@ -2531,35 +2717,43 @@ paths: confirmed: description: The time when the batch was confirmed format: date-time + nullable: true type: string created: description: The time the batch was sealed format: date-time + nullable: true type: string group: description: The privacy group the batch is sent to, for private batches format: byte + nullable: true type: string hash: description: The hash of the manifest of the batch format: byte + nullable: true type: string id: description: The UUID of the batch format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction type: string manifest: description: The manifest of the batch + nullable: true + type: string namespace: description: The namespace of the batch type: string node: description: The UUID of the node that generated the batch format: uuid + nullable: true type: string tx: description: The FireFly transaction associated with this batch @@ -2567,6 +2761,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -2615,35 +2810,43 @@ paths: confirmed: description: The time when the batch was confirmed format: date-time + nullable: true type: string created: description: The time the batch was sealed format: date-time + nullable: true type: string group: description: The privacy group the batch is sent to, for private batches format: byte + nullable: true type: string hash: description: The hash of the manifest of the batch format: byte + nullable: true type: string id: description: The UUID of the batch format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction type: string manifest: description: The manifest of the batch + nullable: true + type: string namespace: description: The namespace of the batch type: string node: description: The UUID of the node that generated the batch format: uuid + nullable: true type: string tx: description: The FireFly transaction associated with this batch @@ -2651,6 +2854,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -2795,10 +2999,12 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -2811,6 +3017,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -2839,6 +3046,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -2853,6 +3061,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -2892,6 +3101,7 @@ paths: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -2904,6 +3114,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -2932,6 +3143,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -2946,6 +3158,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -2998,6 +3211,7 @@ paths: application/json: schema: items: + nullable: true properties: count: description: Total count of entries in this time bucket within @@ -3010,6 +3224,7 @@ paths: timestamp: description: Starting timestamp for the bucket format: date-time + nullable: true type: string types: description: Array of separate counts for individual types of @@ -3017,6 +3232,7 @@ paths: items: description: Array of separate counts for individual types of record within the bucket + nullable: true properties: count: description: Count of entries of a given type within a @@ -3060,8 +3276,12 @@ paths: contract: description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector + nullable: true + type: string definition: description: The definition of the smart contract + nullable: true + type: string idempotencyKey: description: An optional identifier to allow idempotent submission of requests. Stored on the transaction uniquely within a namespace @@ -3095,6 +3315,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -3103,6 +3324,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -3127,6 +3349,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -3135,6 +3358,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -3158,6 +3382,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -3169,6 +3394,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -3177,6 +3403,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -3201,6 +3428,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -3209,6 +3437,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -3232,6 +3461,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -3316,6 +3546,7 @@ paths: application/json: schema: items: + nullable: true properties: description: description: A description of the smart contract this FFI represents @@ -3324,6 +3555,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -3331,11 +3563,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -3347,6 +3581,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3361,6 +3596,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3377,6 +3614,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -3393,11 +3631,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -3409,6 +3649,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3423,6 +3664,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3440,16 +3683,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -3466,11 +3712,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -3482,6 +3730,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3496,6 +3745,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3507,6 +3758,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3521,6 +3773,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -3586,6 +3840,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -3597,6 +3852,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3609,6 +3865,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -3617,6 +3875,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -3637,6 +3896,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3649,6 +3909,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -3657,6 +3919,7 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -3677,6 +3940,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3689,12 +3953,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3707,6 +3974,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -3737,6 +4006,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -3744,11 +4014,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -3760,6 +4032,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3772,6 +4045,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3788,6 +4063,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -3804,11 +4080,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -3820,6 +4098,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3832,6 +4111,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3849,16 +4130,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -3875,11 +4159,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -3891,6 +4177,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3903,6 +4190,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -3914,6 +4203,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -3926,6 +4216,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -4019,6 +4311,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -4026,11 +4319,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -4042,6 +4337,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4054,6 +4350,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4070,6 +4368,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -4086,11 +4385,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -4102,6 +4403,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4114,6 +4416,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4131,16 +4435,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -4157,11 +4464,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -4173,6 +4482,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4185,6 +4495,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4196,6 +4508,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4208,6 +4521,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -4281,6 +4596,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -4288,11 +4604,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -4304,6 +4622,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4316,6 +4635,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4332,6 +4653,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -4348,11 +4670,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -4364,6 +4688,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4376,6 +4701,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4393,16 +4720,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -4419,11 +4749,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -4435,6 +4767,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4447,6 +4780,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4458,6 +4793,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4470,6 +4806,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -4552,6 +4890,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -4559,11 +4898,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -4575,6 +4916,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4587,6 +4929,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4603,6 +4947,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -4619,11 +4964,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -4635,6 +4982,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4647,6 +4995,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4664,16 +5014,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -4690,11 +5043,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -4706,6 +5061,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4718,6 +5074,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4729,6 +5087,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4741,6 +5100,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -4778,6 +5139,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -4785,11 +5147,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -4801,6 +5165,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4813,6 +5178,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4829,6 +5196,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -4845,11 +5213,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -4861,6 +5231,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4873,6 +5244,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4890,16 +5263,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -4916,11 +5292,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -4932,6 +5310,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4944,6 +5323,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -4955,6 +5336,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -4967,6 +5349,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5024,6 +5408,8 @@ paths: description: A blockchain connector specific payload. For example in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. + nullable: true + type: string name: description: The name of the FFI to generate type: string @@ -5047,6 +5433,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -5054,11 +5441,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -5070,6 +5459,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -5082,6 +5472,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -5098,6 +5490,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -5114,11 +5507,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -5130,6 +5525,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -5142,6 +5538,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -5159,16 +5557,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -5185,11 +5586,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -5201,6 +5604,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -5213,6 +5617,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -5224,6 +5630,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -5236,6 +5643,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5295,6 +5704,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -5306,6 +5716,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5318,6 +5729,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5344,6 +5757,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -5353,11 +5767,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -5369,10 +5786,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -5385,6 +5804,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -5393,6 +5813,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -5400,6 +5822,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -5439,12 +5862,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -5502,6 +5927,7 @@ paths: method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -5522,6 +5948,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5534,12 +5961,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5552,6 +5982,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5575,6 +6007,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -5583,6 +6016,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -5607,6 +6041,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -5615,6 +6050,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -5638,6 +6074,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -5649,6 +6086,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -5657,6 +6095,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -5681,6 +6120,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -5689,6 +6129,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -5712,6 +6153,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -5826,6 +6268,7 @@ paths: application/json: schema: items: + nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -5834,10 +6277,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -5858,6 +6303,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -5870,6 +6316,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5883,11 +6331,13 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -5912,6 +6362,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note @@ -5926,6 +6377,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -5933,10 +6386,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -5949,6 +6404,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -5958,14 +6415,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -5977,6 +6437,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -5987,6 +6449,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -6032,6 +6495,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -6052,6 +6516,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6064,6 +6529,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6081,11 +6548,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -6106,6 +6575,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -6120,6 +6590,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6132,10 +6604,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6148,15 +6622,19 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6168,12 +6646,15 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -6202,10 +6683,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -6226,6 +6709,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6238,6 +6722,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6251,11 +6737,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -6278,6 +6766,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -6292,6 +6781,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6299,10 +6790,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6315,6 +6808,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -6324,14 +6819,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6343,6 +6841,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -6353,6 +6853,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -6441,10 +6942,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -6465,6 +6968,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6477,6 +6981,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6490,11 +6996,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -6517,6 +7025,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -6531,6 +7040,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6538,10 +7049,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6554,6 +7067,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -6563,14 +7078,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6582,6 +7100,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -6592,6 +7112,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -6636,6 +7157,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -6656,6 +7178,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6668,6 +7191,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6685,11 +7210,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -6710,6 +7237,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -6724,6 +7252,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6736,10 +7266,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6752,15 +7284,19 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -6772,12 +7308,15 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -6832,6 +7371,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -6843,6 +7383,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6855,6 +7396,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -6881,6 +7424,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -6890,9 +7434,12 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -6913,6 +7460,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6925,12 +7473,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6943,6 +7494,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -7086,13 +7639,16 @@ paths: application/json: schema: items: + nullable: true properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -7117,10 +7673,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -7134,10 +7692,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -7154,6 +7714,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object type: array description: Success @@ -7180,6 +7742,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -7192,6 +7755,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -7199,6 +7763,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object multipart/form-data: schema: @@ -7230,10 +7796,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -7258,10 +7826,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -7275,10 +7845,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -7295,6 +7867,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -7353,10 +7927,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -7381,10 +7957,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -7398,10 +7976,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -7418,6 +7998,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -7635,10 +8217,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -7663,10 +8247,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -7680,10 +8266,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -7700,6 +8288,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -7877,23 +8467,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -7901,6 +8496,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -7913,26 +8509,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -7958,10 +8559,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -8032,6 +8635,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -8251,10 +8855,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -8279,10 +8885,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -8296,10 +8904,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -8316,6 +8926,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -8436,25 +9048,30 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -8474,6 +9091,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is @@ -8521,6 +9140,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -8536,21 +9157,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -8570,6 +9195,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -8585,21 +9212,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -8619,6 +9250,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -8663,21 +9296,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -8697,6 +9334,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -8814,12 +9453,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -8829,11 +9470,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -8844,6 +9487,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -8862,6 +9506,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -8932,6 +9577,7 @@ paths: from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed to @@ -8941,11 +9587,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -8956,6 +9604,7 @@ paths: event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events are @@ -8974,6 +9623,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted as @@ -9084,16 +9734,19 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time when the group was first used to send a message in the network format: date-time + nullable: true type: string hash: description: The identifier hash of this group. Derived from the name and group members format: byte + nullable: true type: string localNamespace: description: The local namespace of the group @@ -9102,6 +9755,7 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group + nullable: true properties: identity: description: The DID of the group member @@ -9110,6 +9764,7 @@ paths: description: The UUID of the node that receives a copy of the off-chain message for the identity format: uuid + nullable: true type: string type: object type: array @@ -9117,6 +9772,7 @@ paths: description: The message used to broadcast this group privately to the members format: uuid + nullable: true type: string name: description: The optional name of the group, allowing multiple @@ -9161,11 +9817,13 @@ paths: description: The time when the group was first used to send a message in the network format: date-time + nullable: true type: string hash: description: The identifier hash of this group. Derived from the name and group members format: byte + nullable: true type: string localNamespace: description: The local namespace of the group @@ -9174,6 +9832,7 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group + nullable: true properties: identity: description: The DID of the group member @@ -9182,6 +9841,7 @@ paths: description: The UUID of the node that receives a copy of the off-chain message for the identity format: uuid + nullable: true type: string type: object type: array @@ -9189,6 +9849,7 @@ paths: description: The message used to broadcast this group privately to the members format: uuid + nullable: true type: string name: description: The optional name of the group, allowing multiple @@ -9323,10 +9984,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9339,6 +10002,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9348,16 +10012,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9372,6 +10039,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9390,6 +10058,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, @@ -9399,6 +10068,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -9482,6 +10152,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9494,6 +10165,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9503,16 +10175,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9527,6 +10202,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9545,6 +10221,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -9556,6 +10233,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9568,6 +10246,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9577,16 +10256,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9601,6 +10283,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9619,6 +10302,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -9660,6 +10344,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9672,6 +10357,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9681,16 +10367,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9705,6 +10394,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9723,6 +10413,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -9778,6 +10469,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9790,6 +10482,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9799,16 +10492,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9823,6 +10519,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9841,6 +10538,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -9852,6 +10550,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -9864,6 +10563,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -9873,16 +10573,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -9897,6 +10600,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -9915,6 +10619,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -9966,6 +10671,7 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties + nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -10083,21 +10789,25 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -10288,28 +10998,34 @@ paths: application/json: schema: items: + nullable: true properties: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -10317,6 +11033,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are @@ -10329,26 +11046,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -10374,10 +11096,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -10448,6 +11172,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object type: array @@ -10488,10 +11213,12 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: For input allows you to specify data in-line in the @@ -10503,14 +11230,17 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: blob: description: An optional in-line hash reference to a previously uploaded binary data blob + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached @@ -10535,6 +11265,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -10547,10 +11278,12 @@ paths: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -10559,6 +11292,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -10566,6 +11301,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -10597,6 +11333,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -10609,26 +11346,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -10654,10 +11396,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -10728,6 +11472,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -10759,13 +11504,16 @@ paths: application/json: schema: items: + nullable: true properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -10790,10 +11538,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -10807,10 +11557,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -10827,6 +11579,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object type: array description: Success @@ -10932,12 +11686,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -10947,11 +11703,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -10962,6 +11720,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -10980,6 +11739,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -11055,10 +11815,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -11121,10 +11883,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -11137,6 +11901,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -11144,6 +11909,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array header: @@ -11157,6 +11924,7 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11220,23 +11988,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -11244,6 +12017,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -11256,20 +12030,24 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11295,10 +12073,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -11369,6 +12149,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -11380,23 +12161,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -11404,6 +12190,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -11416,20 +12203,24 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11455,10 +12246,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -11529,6 +12322,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -11568,10 +12362,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -11584,6 +12380,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -11591,6 +12388,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -11598,6 +12397,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -11636,12 +12436,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11705,23 +12507,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -11729,6 +12536,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -11741,26 +12549,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11786,10 +12599,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -11860,6 +12675,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -11871,23 +12687,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -11895,6 +12716,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -11907,26 +12729,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -11952,10 +12779,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -12026,6 +12855,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -12061,10 +12891,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -12077,6 +12909,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -12084,6 +12917,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -12091,6 +12926,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -12129,12 +12965,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -12198,10 +13036,12 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: For input allows you to specify data in-line in the @@ -12213,14 +13053,17 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: blob: description: An optional in-line hash reference to a previously uploaded binary data blob + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached @@ -12245,6 +13088,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -12257,10 +13101,12 @@ paths: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -12269,6 +13115,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -12276,6 +13124,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -12307,6 +13156,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -12319,26 +13169,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -12364,10 +13219,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -12438,6 +13295,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -12471,10 +13329,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the namespace was created format: date-time + nullable: true type: string description: description: A description of the namespace @@ -12528,6 +13388,7 @@ paths: created: description: The time the namespace was created format: date-time + nullable: true type: string description: description: A description of the namespace @@ -12628,18 +13489,22 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -12653,10 +13518,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the @@ -12733,10 +13601,12 @@ paths: interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -12750,6 +13620,8 @@ paths: smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string name: description: The name that is used in the URL to access the API type: string @@ -12767,14 +13639,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -12788,10 +13663,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -12832,14 +13710,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -12853,10 +13734,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -12961,14 +13845,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -12982,10 +13869,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -13061,10 +13951,12 @@ paths: interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -13078,6 +13970,8 @@ paths: smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string name: description: The name that is used in the URL to access the API type: string @@ -13095,14 +13989,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -13116,10 +14013,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -13160,14 +14060,17 @@ paths: id: description: The UUID of the contract API format: uuid + nullable: true type: string interface: description: Reference to the FireFly Interface definition associated with the contract API + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -13181,10 +14084,13 @@ paths: a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: The UUID of the broadcast message that was used to publish this API to the network format: uuid + nullable: true type: string name: description: The name that is used in the URL to access the API @@ -13259,6 +14165,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -13266,11 +14173,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -13282,6 +14191,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -13294,6 +14204,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -13310,6 +14222,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -13326,11 +14239,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -13342,6 +14257,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -13354,6 +14270,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -13371,16 +14289,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -13397,11 +14318,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -13413,6 +14336,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -13425,6 +14349,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -13436,6 +14362,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -13448,6 +14375,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -13527,6 +14456,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -13538,6 +14468,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -13550,6 +14481,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -13576,6 +14509,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -13585,11 +14519,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -13601,10 +14538,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -13617,6 +14556,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -13625,6 +14565,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -13632,6 +14574,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -13671,12 +14614,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -13734,6 +14679,7 @@ paths: method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -13754,6 +14700,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -13766,12 +14713,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -13784,6 +14734,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -13807,6 +14759,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -13815,6 +14768,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -13839,6 +14793,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -13847,6 +14802,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -13870,6 +14826,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -13881,6 +14838,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -13889,6 +14847,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -13913,6 +14872,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -13921,6 +14881,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -13944,6 +14905,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -14078,6 +15040,7 @@ paths: application/json: schema: items: + nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -14086,10 +15049,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -14110,6 +15075,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14122,6 +15088,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14135,11 +15103,13 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -14164,6 +15134,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note @@ -14178,6 +15149,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14185,10 +15158,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14201,6 +15176,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -14210,14 +15187,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14229,6 +15209,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -14239,6 +15221,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -14304,6 +15287,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -14324,6 +15308,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -14336,6 +15321,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14349,11 +15336,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -14374,6 +15363,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14388,6 +15378,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14395,10 +15387,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14411,15 +15405,19 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14431,12 +15429,15 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -14465,10 +15466,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -14489,6 +15492,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -14501,6 +15505,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14514,11 +15520,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -14541,6 +15549,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14555,6 +15564,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14562,10 +15573,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14578,6 +15591,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -14587,14 +15602,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -14606,6 +15624,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -14616,6 +15636,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -14693,6 +15714,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -14700,11 +15722,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -14716,6 +15740,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14728,6 +15753,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -14744,6 +15771,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -14760,11 +15788,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -14776,6 +15806,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14788,6 +15819,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -14805,16 +15838,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -14831,11 +15867,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -14847,6 +15885,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14859,6 +15898,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -14870,6 +15911,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14882,6 +15924,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -14919,6 +15963,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -14926,11 +15971,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -14942,6 +15989,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -14954,6 +16002,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -14970,6 +16020,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -14986,11 +16037,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -15002,6 +16055,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -15014,6 +16068,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -15031,16 +16087,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -15057,11 +16116,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -15073,6 +16134,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -15085,6 +16147,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -15096,6 +16160,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -15108,6 +16173,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -15181,6 +16248,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -15192,6 +16260,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -15204,6 +16273,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -15230,6 +16301,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -15239,11 +16311,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -15255,10 +16330,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -15271,6 +16348,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -15279,6 +16357,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -15286,6 +16366,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -15325,12 +16406,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -15388,6 +16471,7 @@ paths: method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -15408,6 +16492,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -15420,12 +16505,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -15438,6 +16526,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -15583,6 +16673,7 @@ paths: application/json: schema: items: + nullable: true properties: author: description: The DID of identity of the submitter @@ -15590,35 +16681,43 @@ paths: confirmed: description: The time when the batch was confirmed format: date-time + nullable: true type: string created: description: The time the batch was sealed format: date-time + nullable: true type: string group: description: The privacy group the batch is sent to, for private batches format: byte + nullable: true type: string hash: description: The hash of the manifest of the batch format: byte + nullable: true type: string id: description: The UUID of the batch format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction type: string manifest: description: The manifest of the batch + nullable: true + type: string namespace: description: The namespace of the batch type: string node: description: The UUID of the node that generated the batch format: uuid + nullable: true type: string tx: description: The FireFly transaction associated with this batch @@ -15626,6 +16725,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -15681,35 +16781,43 @@ paths: confirmed: description: The time when the batch was confirmed format: date-time + nullable: true type: string created: description: The time the batch was sealed format: date-time + nullable: true type: string group: description: The privacy group the batch is sent to, for private batches format: byte + nullable: true type: string hash: description: The hash of the manifest of the batch format: byte + nullable: true type: string id: description: The UUID of the batch format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction type: string manifest: description: The manifest of the batch + nullable: true + type: string namespace: description: The namespace of the batch type: string node: description: The UUID of the node that generated the batch format: uuid + nullable: true type: string tx: description: The FireFly transaction associated with this batch @@ -15717,6 +16825,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -15875,10 +16984,12 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -15891,6 +17002,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -15919,6 +17031,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -15933,6 +17046,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -15979,6 +17093,7 @@ paths: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -15991,6 +17106,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -16019,6 +17135,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -16033,6 +17150,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -16092,6 +17210,7 @@ paths: application/json: schema: items: + nullable: true properties: count: description: Total count of entries in this time bucket within @@ -16104,6 +17223,7 @@ paths: timestamp: description: Starting timestamp for the bucket format: date-time + nullable: true type: string types: description: Array of separate counts for individual types of @@ -16111,6 +17231,7 @@ paths: items: description: Array of separate counts for individual types of record within the bucket + nullable: true properties: count: description: Count of entries of a given type within a @@ -16161,8 +17282,12 @@ paths: contract: description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector + nullable: true + type: string definition: description: The definition of the smart contract + nullable: true + type: string idempotencyKey: description: An optional identifier to allow idempotent submission of requests. Stored on the transaction uniquely within a namespace @@ -16196,6 +17321,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -16204,6 +17330,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -16228,6 +17355,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -16236,6 +17364,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -16259,6 +17388,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -16270,6 +17400,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -16278,6 +17409,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -16302,6 +17434,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -16310,6 +17443,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -16333,6 +17467,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -16424,6 +17559,7 @@ paths: application/json: schema: items: + nullable: true properties: description: description: A description of the smart contract this FFI represents @@ -16432,6 +17568,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -16439,11 +17576,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -16455,6 +17594,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16469,6 +17609,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -16485,6 +17627,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -16501,11 +17644,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -16517,6 +17662,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16531,6 +17677,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -16548,16 +17696,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -16574,11 +17725,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -16590,6 +17743,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16604,6 +17758,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -16615,6 +17771,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16629,6 +17786,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -16701,6 +17860,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -16712,6 +17872,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16724,6 +17885,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -16732,6 +17895,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -16752,6 +17916,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16764,6 +17929,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -16772,6 +17939,7 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -16792,6 +17960,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16804,12 +17973,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16822,6 +17994,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -16852,6 +18026,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -16859,11 +18034,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -16875,6 +18052,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16887,6 +18065,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -16903,6 +18083,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -16919,11 +18100,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -16935,6 +18118,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -16947,6 +18131,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -16964,16 +18150,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -16990,11 +18179,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -17006,6 +18197,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17018,6 +18210,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17029,6 +18223,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17041,6 +18236,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -17148,6 +18345,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -17155,11 +18353,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -17171,6 +18371,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17183,6 +18384,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17199,6 +18402,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -17215,11 +18419,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -17231,6 +18437,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17243,6 +18450,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17260,16 +18469,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -17286,11 +18498,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -17302,6 +18516,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17314,6 +18529,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17325,6 +18542,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17337,6 +18555,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -17417,6 +18637,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -17424,11 +18645,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -17440,6 +18663,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17452,6 +18676,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17468,6 +18694,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -17484,11 +18711,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -17500,6 +18729,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17512,6 +18742,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17529,16 +18761,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -17555,11 +18790,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -17571,6 +18808,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17583,6 +18821,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17594,6 +18834,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17606,6 +18847,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -17695,6 +18938,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -17702,11 +18946,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -17718,6 +18964,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17730,6 +18977,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17746,6 +18995,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -17762,11 +19012,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -17778,6 +19030,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17790,6 +19043,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17807,16 +19062,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -17833,11 +19091,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -17849,6 +19109,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17861,6 +19122,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17872,6 +19135,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17884,6 +19148,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -17921,6 +19187,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -17928,11 +19195,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -17944,6 +19213,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -17956,6 +19226,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -17972,6 +19244,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -17988,11 +19261,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -18004,6 +19279,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18016,6 +19292,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -18033,16 +19311,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -18059,11 +19340,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -18075,6 +19358,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18087,6 +19371,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -18098,6 +19384,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18110,6 +19397,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -18174,6 +19463,8 @@ paths: description: A blockchain connector specific payload. For example in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. + nullable: true + type: string name: description: The name of the FFI to generate type: string @@ -18197,6 +19488,7 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions + nullable: true properties: description: description: A description of the smart contract error @@ -18204,11 +19496,13 @@ paths: id: description: The UUID of the FFI error definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this error is part of format: uuid + nullable: true type: string name: description: The name of the error @@ -18220,6 +19514,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18232,6 +19527,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -18248,6 +19545,7 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions + nullable: true properties: description: description: A description of the smart contract event @@ -18264,11 +19562,13 @@ paths: id: description: The UUID of the FFI event definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this event is part of format: uuid + nullable: true type: string name: description: The name of the event @@ -18280,6 +19580,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18292,6 +19593,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -18309,16 +19612,19 @@ paths: description: The UUID of the FireFly interface (FFI) smart contract definition format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this FFI to the network format: uuid + nullable: true type: string methods: description: An array of smart contract method definitions items: description: An array of smart contract method definitions + nullable: true properties: description: description: A description of the smart contract method @@ -18335,11 +19641,13 @@ paths: id: description: The UUID of the FFI method definition format: uuid + nullable: true type: string interface: description: The UUID of the FFI smart contract definition that this method is part of format: uuid + nullable: true type: string name: description: The name of the method @@ -18351,6 +19659,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18363,6 +19672,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array pathname: @@ -18374,6 +19685,7 @@ paths: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -18386,6 +19698,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -18452,6 +19766,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -18463,6 +19778,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -18475,6 +19791,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -18501,6 +19819,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -18510,11 +19829,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -18526,10 +19848,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -18542,6 +19866,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -18550,6 +19875,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -18557,6 +19884,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -18596,12 +19924,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -18659,6 +19989,7 @@ paths: method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -18679,6 +20010,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -18691,12 +20023,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -18709,6 +20044,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -18732,6 +20069,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -18740,6 +20078,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -18764,6 +20103,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -18772,6 +20112,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -18795,6 +20136,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -18806,6 +20148,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -18814,6 +20157,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -18838,6 +20182,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -18846,6 +20191,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -18869,6 +20215,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -18990,6 +20337,7 @@ paths: application/json: schema: items: + nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -18998,10 +20346,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -19022,6 +20372,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -19034,6 +20385,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19047,11 +20400,13 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -19076,6 +20431,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note @@ -19090,6 +20446,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19097,10 +20455,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19113,6 +20473,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -19122,14 +20484,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19141,6 +20506,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -19151,6 +20518,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -19203,6 +20571,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -19223,6 +20592,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -19235,6 +20605,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19252,11 +20624,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -19277,6 +20651,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -19291,6 +20666,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19303,10 +20680,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19319,15 +20698,19 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19339,12 +20722,15 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -19373,10 +20759,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -19397,6 +20785,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -19409,6 +20798,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19422,11 +20813,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -19449,6 +20842,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -19463,6 +20857,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19470,10 +20866,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19486,6 +20884,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -19495,14 +20895,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19514,6 +20917,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -19524,6 +20929,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -19626,10 +21032,12 @@ paths: created: description: The creation time of the listener format: date-time + nullable: true type: string event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -19650,6 +21058,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -19662,6 +21071,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19675,11 +21086,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -19702,6 +21115,7 @@ paths: items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -19716,6 +21130,8 @@ paths: for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19723,10 +21139,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19739,6 +21157,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -19748,14 +21168,17 @@ paths: id: description: The UUID of the smart contract listener format: uuid + nullable: true type: string interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19767,6 +21190,8 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string @@ -19777,6 +21202,7 @@ paths: options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -19828,6 +21254,7 @@ paths: event: description: 'Deprecated: Please use ''event'' in the array of ''filters'' instead' + nullable: true properties: description: description: A description of the smart contract event @@ -19848,6 +21275,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -19860,6 +21288,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19877,11 +21307,13 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. + nullable: true properties: event: description: The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI when supplied + nullable: true properties: description: description: A description of the smart contract event @@ -19902,6 +21334,7 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that @@ -19916,6 +21349,8 @@ paths: native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -19928,10 +21363,12 @@ paths: description: A reference to an existing FFI, containing pre-registered type information for the event, used in combination with eventPath + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19944,15 +21381,19 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array interface: description: 'Deprecated: Please use ''interface'' in the array of ''filters'' instead' + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -19964,12 +21405,15 @@ paths: location: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' + nullable: true + type: string name: description: A descriptive name for the listener type: string options: description: Options that control how the listener subscribes to events from the underlying blockchain + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block number, @@ -20031,6 +21475,7 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI + nullable: true properties: description: description: A description of the smart contract error @@ -20042,6 +21487,7 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20054,6 +21500,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -20080,6 +21528,7 @@ paths: a dedicated API for your FFI, including all methods and an OpenAPI/Swagger interface format: uuid + nullable: true type: string key: description: The blockchain signing key that will sign the invocation. @@ -20089,11 +21538,14 @@ paths: location: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method must support on-chain/off-chain correlation by taking a data input on the call + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -20105,10 +21557,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -20121,6 +21575,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -20129,6 +21584,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -20136,6 +21593,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -20175,12 +21633,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -20238,6 +21698,7 @@ paths: method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified + nullable: true properties: description: description: A description of the smart contract method @@ -20258,6 +21719,7 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20270,12 +21732,15 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array returns: description: An array of method return definitions items: description: An array of method return definitions + nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20288,6 +21753,8 @@ paths: Converters are available for native blockchain interface definitions / type systems - such as an Ethereum ABI. See the documentation for more detail + nullable: true + type: string type: object type: array type: object @@ -20438,13 +21905,16 @@ paths: application/json: schema: items: + nullable: true properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -20469,10 +21939,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -20486,10 +21958,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -20506,6 +21980,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object type: array description: Success @@ -20539,6 +22015,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -20551,6 +22028,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -20558,6 +22036,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object multipart/form-data: schema: @@ -20589,10 +22069,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -20617,10 +22099,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -20634,10 +22118,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -20654,6 +22140,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -20726,10 +22214,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -20754,10 +22244,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -20771,10 +22263,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -20791,6 +22285,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -21022,10 +22518,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -21050,10 +22548,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -21067,10 +22567,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -21087,6 +22589,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -21271,23 +22775,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -21295,6 +22804,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -21307,26 +22817,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -21352,10 +22867,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -21426,6 +22943,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -21659,10 +23177,12 @@ paths: properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -21687,10 +23207,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -21704,10 +23226,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -21724,6 +23248,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object description: Success default: @@ -21858,25 +23384,30 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -21896,6 +23427,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is @@ -21950,6 +23483,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -21965,21 +23500,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -21999,6 +23538,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -22014,21 +23555,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -22048,6 +23593,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -22099,21 +23646,25 @@ paths: created: description: The time the datatype was created format: date-time + nullable: true type: string hash: description: The hash of the value, such as the JSON schema. Allows all parties to be confident they have the exact same rules for verifying data created against a datatype format: byte + nullable: true type: string id: description: The UUID of the datatype format: uuid + nullable: true type: string message: description: The UUID of the broadcast message that was used to publish this datatype to the network format: uuid + nullable: true type: string name: description: The name of the datatype @@ -22133,6 +23684,8 @@ paths: value: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) + nullable: true + type: string version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -22257,12 +23810,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -22272,11 +23827,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -22287,6 +23844,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -22305,6 +23863,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -22382,6 +23941,7 @@ paths: from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed to @@ -22391,11 +23951,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -22406,6 +23968,7 @@ paths: event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events are @@ -22424,6 +23987,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted as @@ -22541,16 +24105,19 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time when the group was first used to send a message in the network format: date-time + nullable: true type: string hash: description: The identifier hash of this group. Derived from the name and group members format: byte + nullable: true type: string localNamespace: description: The local namespace of the group @@ -22559,6 +24126,7 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group + nullable: true properties: identity: description: The DID of the group member @@ -22567,6 +24135,7 @@ paths: description: The UUID of the node that receives a copy of the off-chain message for the identity format: uuid + nullable: true type: string type: object type: array @@ -22574,6 +24143,7 @@ paths: description: The message used to broadcast this group privately to the members format: uuid + nullable: true type: string name: description: The optional name of the group, allowing multiple @@ -22625,11 +24195,13 @@ paths: description: The time when the group was first used to send a message in the network format: date-time + nullable: true type: string hash: description: The identifier hash of this group. Derived from the name and group members format: byte + nullable: true type: string localNamespace: description: The local namespace of the group @@ -22638,6 +24210,7 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group + nullable: true properties: identity: description: The DID of the group member @@ -22646,6 +24219,7 @@ paths: description: The UUID of the node that receives a copy of the off-chain message for the identity format: uuid + nullable: true type: string type: object type: array @@ -22653,6 +24227,7 @@ paths: description: The message used to broadcast this group privately to the members format: uuid + nullable: true type: string name: description: The optional name of the group, allowing multiple @@ -22794,10 +24369,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -22810,6 +24387,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -22819,16 +24397,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -22843,6 +24424,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -22861,6 +24443,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, @@ -22870,6 +24453,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -22960,6 +24544,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -22972,6 +24557,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -22981,16 +24567,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -23005,6 +24594,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -23023,6 +24613,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -23034,6 +24625,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -23046,6 +24638,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -23055,16 +24648,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -23079,6 +24675,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -23097,6 +24694,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -23145,6 +24743,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -23157,6 +24756,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -23166,16 +24766,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -23190,6 +24793,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -23208,6 +24812,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -23270,6 +24875,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -23282,6 +24888,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -23291,16 +24898,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -23315,6 +24925,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -23333,6 +24944,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -23344,6 +24956,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -23356,6 +24969,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -23365,16 +24979,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -23389,6 +25006,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -23407,6 +25025,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -23465,6 +25084,7 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties + nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -23589,21 +25209,25 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -23801,28 +25425,34 @@ paths: application/json: schema: items: + nullable: true properties: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -23830,6 +25460,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are @@ -23842,26 +25473,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -23887,10 +25523,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -23961,6 +25599,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object type: array @@ -24008,10 +25647,12 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: For input allows you to specify data in-line in the @@ -24023,14 +25664,17 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: blob: description: An optional in-line hash reference to a previously uploaded binary data blob + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached @@ -24055,6 +25699,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -24067,10 +25712,12 @@ paths: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -24079,6 +25726,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -24086,6 +25735,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -24117,6 +25767,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -24129,26 +25780,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -24174,10 +25830,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -24248,6 +25906,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -24286,13 +25945,16 @@ paths: application/json: schema: items: + nullable: true properties: blob: description: An optional hash reference to a binary blob attachment + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached to @@ -24317,10 +25979,12 @@ paths: created: description: The creation time of the data resource format: date-time + nullable: true type: string datatype: description: The optional datatype to use of validation of this data + nullable: true properties: name: description: The name of the datatype @@ -24334,10 +25998,12 @@ paths: description: The hash of the data resource. Derived from the value and the hash of any binary blob attachment format: byte + nullable: true type: string id: description: The UUID of the data resource format: uuid + nullable: true type: string namespace: description: The namespace of the data resource @@ -24354,6 +26020,8 @@ paths: description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment + nullable: true + type: string type: object type: array description: Success @@ -24466,12 +26134,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -24481,11 +26151,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -24496,6 +26168,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -24514,6 +26187,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -24596,10 +26270,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -24669,10 +26345,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -24685,6 +26363,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -24692,6 +26371,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -24699,6 +26380,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -24737,12 +26419,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -24806,23 +26490,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -24830,6 +26519,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -24842,26 +26532,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -24887,10 +26582,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -24961,6 +26658,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -24972,23 +26670,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -24996,6 +26699,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -25008,26 +26712,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25053,10 +26762,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -25127,6 +26838,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -25173,10 +26885,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -25189,6 +26903,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -25196,6 +26911,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -25203,6 +26920,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -25241,12 +26959,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25310,23 +27030,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -25334,6 +27059,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -25346,26 +27072,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25391,10 +27122,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -25465,6 +27198,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -25476,23 +27210,28 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: The list of data elements attached to the message items: description: The list of data elements attached to the message + nullable: true properties: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string type: object type: array @@ -25500,6 +27239,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -25512,26 +27252,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25557,10 +27302,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -25631,6 +27378,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -25673,10 +27421,12 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -25689,6 +27439,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line data @@ -25696,6 +27447,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -25703,6 +27456,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -25741,12 +27495,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25810,10 +27566,12 @@ paths: batch: description: The UUID of the batch in which the message was pinned/transferred format: uuid + nullable: true type: string confirmed: description: The timestamp of when the message was confirmed/rejected format: date-time + nullable: true type: string data: description: For input allows you to specify data in-line in the @@ -25825,14 +27583,17 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: blob: description: An optional in-line hash reference to a previously uploaded binary data blob + nullable: true properties: hash: description: The hash of the binary blob data format: byte + nullable: true type: string name: description: The name field from the metadata attached @@ -25857,6 +27618,7 @@ paths: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -25869,10 +27631,12 @@ paths: hash: description: The hash of the referenced data format: byte + nullable: true type: string id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -25881,6 +27645,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -25888,6 +27654,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -25919,6 +27686,7 @@ paths: description: The hash of the message. Derived from the header, which includes the data hash format: byte + nullable: true type: string header: description: The message header contains all fields that are used @@ -25931,26 +27699,31 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string created: description: The creation time of the message format: date-time + nullable: true type: string datahash: description: A single hash representing all data in the message. Derived from the array of data ids+hashes attached to this message format: byte + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string id: description: The UUID of the message. Unique to each message format: uuid + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -25976,10 +27749,12 @@ paths: txparent: description: The parent transaction that originally triggered this message + nullable: true properties: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -26050,6 +27825,7 @@ paths: description: The ID of the transaction used to order/deliver this message format: uuid + nullable: true type: string type: object description: Success @@ -26154,6 +27930,7 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties + nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -26314,10 +28091,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26330,6 +28109,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26339,16 +28119,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -26363,6 +28146,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -26381,6 +28165,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, @@ -26390,6 +28175,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -26453,6 +28239,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26465,6 +28252,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26474,16 +28262,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -26498,6 +28289,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -26516,6 +28308,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, that @@ -26525,6 +28318,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -26665,10 +28459,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26681,6 +28477,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26690,16 +28487,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -26714,6 +28514,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -26732,6 +28533,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object type: array @@ -26774,6 +28576,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26786,6 +28589,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26795,16 +28599,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -26819,6 +28626,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -26837,6 +28645,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -26884,6 +28693,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26896,6 +28706,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26905,16 +28716,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -26929,6 +28743,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -26947,6 +28762,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -26958,6 +28774,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -26970,6 +28787,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -26979,16 +28797,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27003,6 +28824,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27021,6 +28843,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27147,10 +28970,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27163,6 +28988,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27172,16 +28998,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27196,6 +29025,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27214,6 +29044,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object type: array @@ -27291,6 +29122,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27303,6 +29135,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27312,16 +29145,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27336,6 +29172,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27354,6 +29191,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27365,6 +29203,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27377,6 +29216,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27386,16 +29226,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27410,6 +29253,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27428,6 +29272,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27469,6 +29314,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27481,6 +29327,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27490,16 +29337,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27514,6 +29364,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27532,6 +29383,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27579,6 +29431,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27591,6 +29444,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27600,16 +29454,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27624,6 +29481,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27642,6 +29500,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27653,6 +29512,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -27665,6 +29525,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -27674,16 +29535,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -27698,6 +29562,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -27716,6 +29581,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -27811,10 +29677,12 @@ paths: group-name). This context is combined with the member and nonce to determine the final hash that is written on-chain format: byte + nullable: true type: string hash: description: The unique masked pin string format: byte + nullable: true type: string identity: description: The member of the privacy group the next-pin applies @@ -27949,10 +29817,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -27961,6 +29831,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -27985,6 +29856,7 @@ paths: previous operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -27993,6 +29865,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -28016,6 +29889,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object type: array @@ -28065,6 +29939,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string detail: description: Additional detailed information about an operation @@ -28076,6 +29951,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -28100,6 +29976,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -28108,6 +29985,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -28131,6 +30009,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -28178,6 +30057,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -28186,6 +30066,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -28210,6 +30091,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -28218,6 +30100,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -28241,6 +30124,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -28347,15 +30231,18 @@ paths: description: The UUID of the batch of messages this pin is part of format: uuid + nullable: true type: string batchHash: description: The manifest hash batch of messages this pin is part of format: byte + nullable: true type: string created: description: The time the FireFly node created the pin format: date-time + nullable: true type: string dispatched: description: Once true, this pin has been processed and will @@ -28367,6 +30254,7 @@ paths: pins are created. If the message is private, the hash is masked for privacy format: byte + nullable: true type: string index: description: The index of this pin within the batch. One pin @@ -28430,6 +30318,7 @@ paths: description: The ID of the batch to which the event aggregator should rewind. Either sequence or batch must be specified format: uuid + nullable: true type: string sequence: description: The sequence of the pin to which the event aggregator @@ -28447,6 +30336,7 @@ paths: description: The ID of the batch to which the event aggregator should rewind. Either sequence or batch must be specified format: uuid + nullable: true type: string sequence: description: The sequence of the pin to which the event aggregator @@ -28491,9 +30381,11 @@ paths: contract: description: Information about the multi-party smart contract configured for this namespace + nullable: true properties: active: description: The currently active FireFly smart contract + nullable: true properties: firstEvent: description: A blockchain specific string, such as @@ -28525,11 +30417,14 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object terminated: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts + nullable: true properties: firstEvent: description: A blockchain specific string, such @@ -28562,6 +30457,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array type: object @@ -28572,10 +30469,12 @@ paths: type: object namespace: description: The namespace that this status applies to + nullable: true properties: created: description: The time the namespace was created format: date-time + nullable: true type: string description: description: A description of the namespace @@ -28590,10 +30489,12 @@ paths: type: object node: description: Details of the local node + nullable: true properties: id: description: The UUID of the node, if registered format: uuid + nullable: true type: string name: description: The name of this node, as specified in the local @@ -28606,6 +30507,7 @@ paths: org: description: Details of the root organization identity registered for this namespace on the local node + nullable: true properties: did: description: The DID of the organization identity, if registered @@ -28613,6 +30515,7 @@ paths: id: description: The UUID of the organization, if registered format: uuid + nullable: true type: string name: description: The name of the node operator organization, as @@ -28628,6 +30531,7 @@ paths: items: description: Array of verifiers (blockchain keys) owned by this identity + nullable: true properties: type: description: The type of the verifier @@ -28651,6 +30555,7 @@ paths: description: The blockchain plugins on this namespace items: description: The blockchain plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28664,6 +30569,7 @@ paths: description: The data exchange plugins on this namespace items: description: The data exchange plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28677,6 +30583,7 @@ paths: description: The database plugins on this namespace items: description: The database plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28690,6 +30597,7 @@ paths: description: The event plugins on this namespace items: description: The event plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28703,6 +30611,7 @@ paths: description: The identity plugins on this namespace items: description: The identity plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28716,6 +30625,7 @@ paths: description: The shared storage plugins on this namespace items: description: The shared storage plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28729,6 +30639,7 @@ paths: description: The token plugins on this namespace items: description: The token plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -28774,6 +30685,7 @@ paths: description: An array of currently active batch processors items: description: An array of currently active batch processors + nullable: true properties: dispatcher: description: The type of dispatcher for this processor @@ -28816,6 +30728,7 @@ paths: description: If a flush is in progress, this is the UUID of the batch being flushed format: uuid + nullable: true type: string lastFlushError: description: The last error received by this batch processor @@ -28824,10 +30737,12 @@ paths: lastFlushErrorTime: description: The time of the last flush format: date-time + nullable: true type: string lastFlushStartTime: description: The last time a flush was performed format: date-time + nullable: true type: string totalBatches: description: The total count of batches flushed by this @@ -28877,9 +30792,11 @@ paths: contracts: description: Information about the active and terminated multi-party smart contracts configured for this namespace + nullable: true properties: active: description: The currently active FireFly smart contract + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -28911,6 +30828,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string status: description: The status of the contract listener. One of 'syncing', 'synced', or 'unknown' @@ -28920,6 +30839,7 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts + nullable: true properties: firstEvent: description: A blockchain specific string, such as a @@ -28951,6 +30871,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array type: object @@ -28964,6 +30886,7 @@ paths: description: The ID of the pending message that broadcast the identity claim to the network format: uuid + nullable: true type: string status: description: The status of the node registration, one of 'unregistered', @@ -28978,6 +30901,7 @@ paths: description: The ID of the pending message that broadcast the identity claim to the network format: uuid + nullable: true type: string status: description: The status of the organization registration, @@ -29085,10 +31009,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -29173,6 +31099,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -29196,10 +31123,12 @@ paths: a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be @@ -29211,6 +31140,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -29241,6 +31171,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -29303,6 +31234,7 @@ paths: this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -29351,6 +31283,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -29360,6 +31293,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object type: array @@ -29484,10 +31418,12 @@ paths: payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -29498,6 +31434,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -29528,6 +31465,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake alive @@ -29587,6 +31525,7 @@ paths: your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send a @@ -29633,6 +31572,7 @@ paths: as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -29649,6 +31589,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -29732,6 +31673,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -29754,10 +31696,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -29768,6 +31712,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -29798,6 +31743,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -29860,6 +31806,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -29907,6 +31854,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -29916,6 +31864,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -30038,10 +31987,12 @@ paths: payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -30052,6 +32003,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -30082,6 +32034,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake alive @@ -30141,6 +32094,7 @@ paths: your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send a @@ -30187,6 +32141,7 @@ paths: as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -30203,6 +32158,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -30286,6 +32242,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -30308,10 +32265,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -30322,6 +32281,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -30352,6 +32312,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -30414,6 +32375,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -30461,6 +32423,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -30470,6 +32433,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -30550,6 +32514,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -30633,6 +32598,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -30655,10 +32621,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -30669,6 +32637,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -30699,6 +32668,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -30761,6 +32731,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -30808,6 +32779,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -30817,6 +32789,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -30942,12 +32915,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -30957,11 +32932,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -30972,6 +32949,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -30990,6 +32968,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -31093,6 +33072,7 @@ paths: application/json: schema: items: + nullable: true properties: key: description: The blockchain signing identity this balance applies @@ -31181,11 +33161,13 @@ paths: application/json: schema: items: + nullable: true properties: pool: description: The UUID the token pool this balance entry applies to format: uuid + nullable: true type: string type: object type: array @@ -31328,6 +33310,7 @@ paths: application/json: schema: items: + nullable: true properties: active: description: Indicates if this approval is currently active @@ -31341,6 +33324,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -31350,6 +33334,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -31371,18 +33356,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -31394,6 +33382,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -31411,6 +33400,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -31479,6 +33469,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the approval + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -31490,10 +33481,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -31506,6 +33499,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -31514,6 +33508,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -31521,6 +33517,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -31560,12 +33557,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -31626,6 +33625,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string type: object responses: @@ -31646,6 +33646,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -31655,6 +33656,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -31676,18 +33678,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -31699,6 +33704,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -31716,6 +33722,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -31740,6 +33747,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -31749,6 +33757,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -31770,18 +33779,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -31793,6 +33805,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -31810,6 +33823,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -31915,6 +33929,7 @@ paths: application/json: schema: items: + nullable: true properties: balance: description: The numeric balance. For non-fungible tokens will @@ -31939,6 +33954,7 @@ paths: description: The UUID the token pool this balance entry applies to format: uuid + nullable: true type: string tokenIndex: description: The index of the token within the pool that this @@ -31948,6 +33964,7 @@ paths: description: The last time the balance was updated by applying a transfer event format: date-time + nullable: true type: string uri: description: The URI of the token this balance entry applies @@ -32023,6 +34040,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -32034,10 +34052,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -32050,6 +34070,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -32058,6 +34079,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -32065,6 +34088,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -32104,12 +34128,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -32195,6 +34221,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -32204,6 +34231,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -32218,18 +34246,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -32238,6 +34269,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -32259,6 +34291,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -32291,6 +34324,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -32300,6 +34334,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -32314,18 +34349,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -32334,6 +34372,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -32355,6 +34394,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -32401,6 +34441,7 @@ paths: application/json: schema: items: + nullable: true properties: name: description: The name of the token connector, as configured @@ -32476,6 +34517,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -32487,10 +34529,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -32503,6 +34547,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -32511,6 +34556,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -32518,6 +34565,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -32557,12 +34605,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -32648,6 +34698,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -32657,6 +34708,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -32671,18 +34723,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -32691,6 +34746,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -32712,6 +34768,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -32744,6 +34801,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -32753,6 +34811,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -32767,18 +34826,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -32787,6 +34849,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -32808,6 +34871,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -32973,6 +35037,7 @@ paths: application/json: schema: items: + nullable: true properties: active: description: Indicates whether the pool has been successfully @@ -32987,6 +35052,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -32994,6 +35060,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33006,10 +35073,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33039,10 +35108,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33073,6 +35145,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -33148,10 +35221,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33204,6 +35279,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -33211,6 +35287,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33222,10 +35299,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33255,10 +35334,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33289,6 +35371,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -33320,6 +35403,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -33327,6 +35411,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33338,10 +35423,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33371,10 +35458,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33405,6 +35495,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -33499,6 +35590,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -33506,6 +35598,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33517,10 +35610,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33550,10 +35645,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33584,6 +35682,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -33660,6 +35759,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -33667,6 +35767,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33678,10 +35779,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33711,10 +35814,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33745,6 +35851,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -33776,6 +35883,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -33783,6 +35891,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -33794,10 +35903,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -33827,10 +35938,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -33861,6 +35975,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -34027,6 +36142,7 @@ paths: application/json: schema: items: + nullable: true properties: amount: description: The amount for the transfer. For non-fungible tokens @@ -34038,6 +36154,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -34047,6 +36164,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -34061,18 +36179,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -34081,6 +36202,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -34102,6 +36224,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -34186,6 +36309,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -34197,10 +36321,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -34213,6 +36339,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -34221,6 +36348,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -34228,6 +36357,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -34267,12 +36397,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -34358,6 +36490,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -34367,6 +36500,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -34381,18 +36515,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -34401,6 +36538,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -34422,6 +36560,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -34454,6 +36593,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -34463,6 +36603,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -34477,18 +36618,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -34497,6 +36641,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -34518,6 +36663,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -34580,6 +36726,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -34589,6 +36736,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -34603,18 +36751,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -34623,6 +36774,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -34644,6 +36796,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -34749,6 +36902,7 @@ paths: application/json: schema: items: + nullable: true properties: blockchainIds: description: The blockchain transaction ID, in the format specific @@ -34768,10 +36922,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -34910,10 +37066,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -34975,10 +37133,12 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -34991,6 +37151,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -35019,6 +37180,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -35033,6 +37195,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -35076,10 +37239,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -35088,6 +37253,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -35112,6 +37278,7 @@ paths: previous operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -35120,6 +37287,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -35143,6 +37311,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object type: array @@ -35188,6 +37357,7 @@ paths: items: description: A set of records describing the activities within the transaction known by the local FireFly node + nullable: true properties: error: description: If an error occurred related to the detail @@ -35198,6 +37368,7 @@ paths: The type of this record can be inferred from the entry type format: uuid + nullable: true type: string info: additionalProperties: @@ -35218,6 +37389,7 @@ paths: such as the time an event was created, or the last update time of an operation format: date-time + nullable: true type: string type: description: The type of the transaction status detail record @@ -35318,21 +37490,25 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -35391,17 +37567,20 @@ paths: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -35568,6 +37747,7 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties + nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -35721,10 +37901,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -35737,6 +37919,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -35746,16 +37929,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -35770,6 +37956,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -35788,6 +37975,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, @@ -35797,6 +37985,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -35853,6 +38042,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -35865,6 +38055,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -35874,16 +38065,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -35898,6 +38092,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -35916,6 +38111,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string verifiers: description: The verifiers, such as blockchain signing keys, that @@ -35925,6 +38121,7 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity + nullable: true properties: type: description: The type of the verifier @@ -36058,10 +38255,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36074,6 +38273,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36083,16 +38283,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36107,6 +38310,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36125,6 +38329,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object type: array @@ -36160,6 +38365,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36172,6 +38378,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36181,16 +38388,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36205,6 +38415,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36223,6 +38434,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36263,6 +38475,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36275,6 +38488,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36284,16 +38498,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36308,6 +38525,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36326,6 +38544,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36337,6 +38556,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36349,6 +38569,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36358,16 +38579,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36382,6 +38606,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36400,6 +38625,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36519,10 +38745,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36535,6 +38763,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36544,16 +38773,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36568,6 +38800,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36586,6 +38819,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object type: array @@ -36656,6 +38890,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36668,6 +38903,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36677,16 +38913,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36701,6 +38940,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36719,6 +38959,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36730,6 +38971,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36742,6 +38984,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36751,16 +38994,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36775,6 +39021,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36793,6 +39040,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36827,6 +39075,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36839,6 +39088,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36848,16 +39098,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36872,6 +39125,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36890,6 +39144,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -36930,6 +39185,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -36942,6 +39198,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -36951,16 +39208,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -36975,6 +39235,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -36993,6 +39254,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -37004,6 +39266,7 @@ paths: created: description: The creation time of the identity format: date-time + nullable: true type: string description: description: A description of the identity. Part of the updatable @@ -37016,6 +39279,7 @@ paths: id: description: The UUID of the identity format: uuid + nullable: true type: string messages: description: References to the broadcast messages that established @@ -37025,16 +39289,19 @@ paths: claim: description: The UUID of claim message format: uuid + nullable: true type: string update: description: The UUID of the most recently applied update message. Unset if no updates have been confirmed format: uuid + nullable: true type: string verification: description: The UUID of claim message. Unset for root organization identities format: uuid + nullable: true type: string type: object name: @@ -37049,6 +39316,7 @@ paths: description: The UUID of the parent identity. Unset for root organization identities format: uuid + nullable: true type: string profile: additionalProperties: @@ -37067,6 +39335,7 @@ paths: updated: description: The last update time of the identity profile format: date-time + nullable: true type: string type: object description: Success @@ -37155,10 +39424,12 @@ paths: group-name). This context is combined with the member and nonce to determine the final hash that is written on-chain format: byte + nullable: true type: string hash: description: The unique masked pin string format: byte + nullable: true type: string identity: description: The member of the privacy group the next-pin applies @@ -37286,10 +39557,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -37298,6 +39571,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -37322,6 +39596,7 @@ paths: previous operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -37330,6 +39605,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -37353,6 +39629,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object type: array @@ -37395,6 +39672,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string detail: description: Additional detailed information about an operation @@ -37406,6 +39684,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -37430,6 +39709,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -37438,6 +39718,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -37461,6 +39742,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -37501,6 +39783,7 @@ paths: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -37509,6 +39792,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -37533,6 +39817,7 @@ paths: operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -37541,6 +39826,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -37564,6 +39850,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object description: Success @@ -37663,15 +39950,18 @@ paths: description: The UUID of the batch of messages this pin is part of format: uuid + nullable: true type: string batchHash: description: The manifest hash batch of messages this pin is part of format: byte + nullable: true type: string created: description: The time the FireFly node created the pin format: date-time + nullable: true type: string dispatched: description: Once true, this pin has been processed and will @@ -37683,6 +39973,7 @@ paths: pins are created. If the message is private, the hash is masked for privacy format: byte + nullable: true type: string index: description: The index of this pin within the batch. One pin @@ -37739,6 +40030,7 @@ paths: description: The ID of the batch to which the event aggregator should rewind. Either sequence or batch must be specified format: uuid + nullable: true type: string sequence: description: The sequence of the pin to which the event aggregator @@ -37756,6 +40048,7 @@ paths: description: The ID of the batch to which the event aggregator should rewind. Either sequence or batch must be specified format: uuid + nullable: true type: string sequence: description: The sequence of the pin to which the event aggregator @@ -37793,9 +40086,11 @@ paths: contract: description: Information about the multi-party smart contract configured for this namespace + nullable: true properties: active: description: The currently active FireFly smart contract + nullable: true properties: firstEvent: description: A blockchain specific string, such as @@ -37827,11 +40122,14 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object terminated: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts + nullable: true properties: firstEvent: description: A blockchain specific string, such @@ -37864,6 +40162,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array type: object @@ -37874,10 +40174,12 @@ paths: type: object namespace: description: The namespace that this status applies to + nullable: true properties: created: description: The time the namespace was created format: date-time + nullable: true type: string description: description: A description of the namespace @@ -37892,10 +40194,12 @@ paths: type: object node: description: Details of the local node + nullable: true properties: id: description: The UUID of the node, if registered format: uuid + nullable: true type: string name: description: The name of this node, as specified in the local @@ -37908,6 +40212,7 @@ paths: org: description: Details of the root organization identity registered for this namespace on the local node + nullable: true properties: did: description: The DID of the organization identity, if registered @@ -37915,6 +40220,7 @@ paths: id: description: The UUID of the organization, if registered format: uuid + nullable: true type: string name: description: The name of the node operator organization, as @@ -37930,6 +40236,7 @@ paths: items: description: Array of verifiers (blockchain keys) owned by this identity + nullable: true properties: type: description: The type of the verifier @@ -37953,6 +40260,7 @@ paths: description: The blockchain plugins on this namespace items: description: The blockchain plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -37966,6 +40274,7 @@ paths: description: The data exchange plugins on this namespace items: description: The data exchange plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -37979,6 +40288,7 @@ paths: description: The database plugins on this namespace items: description: The database plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -37992,6 +40302,7 @@ paths: description: The event plugins on this namespace items: description: The event plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -38005,6 +40316,7 @@ paths: description: The identity plugins on this namespace items: description: The identity plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -38018,6 +40330,7 @@ paths: description: The shared storage plugins on this namespace items: description: The shared storage plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -38031,6 +40344,7 @@ paths: description: The token plugins on this namespace items: description: The token plugins on this namespace + nullable: true properties: name: description: The name of the plugin @@ -38069,6 +40383,7 @@ paths: description: An array of currently active batch processors items: description: An array of currently active batch processors + nullable: true properties: dispatcher: description: The type of dispatcher for this processor @@ -38111,6 +40426,7 @@ paths: description: If a flush is in progress, this is the UUID of the batch being flushed format: uuid + nullable: true type: string lastFlushError: description: The last error received by this batch processor @@ -38119,10 +40435,12 @@ paths: lastFlushErrorTime: description: The time of the last flush format: date-time + nullable: true type: string lastFlushStartTime: description: The last time a flush was performed format: date-time + nullable: true type: string totalBatches: description: The total count of batches flushed by this @@ -38165,9 +40483,11 @@ paths: contracts: description: Information about the active and terminated multi-party smart contracts configured for this namespace + nullable: true properties: active: description: The currently active FireFly smart contract + nullable: true properties: firstEvent: description: A blockchain specific string, such as a block @@ -38199,6 +40519,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string status: description: The status of the contract listener. One of 'syncing', 'synced', or 'unknown' @@ -38208,6 +40530,7 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts + nullable: true properties: firstEvent: description: A blockchain specific string, such as a @@ -38239,6 +40562,8 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel + nullable: true + type: string type: object type: array type: object @@ -38252,6 +40577,7 @@ paths: description: The ID of the pending message that broadcast the identity claim to the network format: uuid + nullable: true type: string status: description: The status of the node registration, one of 'unregistered', @@ -38266,6 +40592,7 @@ paths: description: The ID of the pending message that broadcast the identity claim to the network format: uuid + nullable: true type: string status: description: The status of the organization registration, @@ -38366,10 +40693,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -38454,6 +40783,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -38477,10 +40807,12 @@ paths: a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be @@ -38492,6 +40824,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -38522,6 +40855,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -38584,6 +40918,7 @@ paths: this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -38632,6 +40967,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -38641,6 +40977,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object type: array @@ -38758,10 +41095,12 @@ paths: payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -38772,6 +41111,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -38802,6 +41142,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake alive @@ -38861,6 +41202,7 @@ paths: your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send a @@ -38907,6 +41249,7 @@ paths: as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -38923,6 +41266,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -39006,6 +41350,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -39028,10 +41373,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -39042,6 +41389,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -39072,6 +41420,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -39134,6 +41483,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -39181,6 +41531,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -39190,6 +41541,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -39305,10 +41657,12 @@ paths: payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -39319,6 +41673,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -39349,6 +41704,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake alive @@ -39408,6 +41764,7 @@ paths: your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send a @@ -39454,6 +41811,7 @@ paths: as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -39470,6 +41828,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -39553,6 +41912,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -39575,10 +41935,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -39589,6 +41951,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -39619,6 +41982,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -39681,6 +42045,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -39728,6 +42093,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -39737,6 +42103,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -39803,6 +42170,7 @@ paths: created: description: Creation time of the subscription format: date-time + nullable: true type: string ephemeral: description: Ephemeral subscriptions only exist as long as the @@ -39886,6 +42254,7 @@ paths: id: description: The UUID of the subscription format: uuid + nullable: true type: string name: description: The name of the subscription. The application specifies @@ -39908,10 +42277,12 @@ paths: single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. + nullable: true type: boolean batchTimeout: description: When batching is enabled, the optional timeout to send events even when the batch hasn't filled. + nullable: true type: string fastack: description: 'Webhooks only: When true the event will be acknowledged @@ -39922,6 +42293,7 @@ paths: events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' + nullable: true type: string headers: additionalProperties: @@ -39952,6 +42324,7 @@ paths: proxyURL: description: HTTP proxy URL to use for outbound requests to the webhook + nullable: true type: string requestTimeout: description: The max duration to hold a TLS handshake @@ -40014,6 +42387,7 @@ paths: is the maximum number of events you would expect to be redelivered after it restarts minimum: 0 + nullable: true type: integer reply: description: 'Webhooks only: Whether to automatically send @@ -40061,6 +42435,7 @@ paths: in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. + nullable: true type: boolean type: object transport: @@ -40070,6 +42445,7 @@ paths: updated: description: Last time the subscription was updated format: date-time + nullable: true type: string type: object description: Success @@ -40188,12 +42564,14 @@ paths: application/json: schema: items: + nullable: true properties: correlator: description: For message events, this is the 'header.cid' field from the referenced message. For certain other event types, a secondary object is referenced such as a token pool format: uuid + nullable: true type: string created: description: The time the event was emitted. Not guaranteed @@ -40203,11 +42581,13 @@ paths: 'created' field for querying events in the exact order they are delivered to applications format: date-time + nullable: true type: string id: description: The UUID assigned to this event by your local FireFly node format: uuid + nullable: true type: string namespace: description: The namespace of the event. Your application must @@ -40218,6 +42598,7 @@ paths: this event. The event type determines what type of resource is referenced, and whether this field might be unset format: uuid + nullable: true type: string sequence: description: A sequence indicating the order in which events @@ -40236,6 +42617,7 @@ paths: description: The UUID of a transaction that is event is part of. Not all events are part of a transaction format: uuid + nullable: true type: string type: description: All interesting activity in FireFly is emitted @@ -40332,6 +42714,7 @@ paths: application/json: schema: items: + nullable: true properties: key: description: The blockchain signing identity this balance applies @@ -40413,11 +42796,13 @@ paths: application/json: schema: items: + nullable: true properties: pool: description: The UUID the token pool this balance entry applies to format: uuid + nullable: true type: string type: object type: array @@ -40553,6 +42938,7 @@ paths: application/json: schema: items: + nullable: true properties: active: description: Indicates if this approval is currently active @@ -40566,6 +42952,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -40575,6 +42962,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -40596,18 +42984,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -40619,6 +43010,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -40636,6 +43028,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -40697,6 +43090,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the approval + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -40708,10 +43102,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -40724,6 +43120,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -40732,6 +43129,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -40739,6 +43138,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -40778,12 +43178,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -40844,6 +43246,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string type: object responses: @@ -40864,6 +43267,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -40873,6 +43277,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -40894,18 +43299,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -40917,6 +43325,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -40934,6 +43343,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -40958,6 +43368,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -40967,6 +43378,7 @@ paths: created: description: The creation time of the token approval format: date-time + nullable: true type: string info: additionalProperties: @@ -40988,18 +43400,21 @@ paths: description: The UUID of this token approval, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this approval using the data field of the approval in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the approval, which must match @@ -41011,6 +43426,7 @@ paths: pool: description: The UUID the token pool this approval applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -41028,6 +43444,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -41126,6 +43543,7 @@ paths: application/json: schema: items: + nullable: true properties: balance: description: The numeric balance. For non-fungible tokens will @@ -41150,6 +43568,7 @@ paths: description: The UUID the token pool this balance entry applies to format: uuid + nullable: true type: string tokenIndex: description: The index of the token within the pool that this @@ -41159,6 +43578,7 @@ paths: description: The last time the balance was updated by applying a transfer event format: date-time + nullable: true type: string uri: description: The URI of the token this balance entry applies @@ -41227,6 +43647,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -41238,10 +43659,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -41254,6 +43677,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -41262,6 +43686,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -41269,6 +43695,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -41308,12 +43735,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -41395,6 +43824,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -41404,6 +43834,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -41418,18 +43849,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -41438,6 +43872,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -41459,6 +43894,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -41491,6 +43927,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -41500,6 +43937,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -41514,18 +43952,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -41534,6 +43975,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -41555,6 +43997,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -41594,6 +44037,7 @@ paths: application/json: schema: items: + nullable: true properties: name: description: The name of the token connector, as configured @@ -41658,6 +44102,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -41669,10 +44114,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -41685,6 +44132,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -41693,6 +44141,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -41700,6 +44150,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -41739,12 +44190,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -41830,6 +44283,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -41839,6 +44293,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -41853,18 +44308,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -41873,6 +44331,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -41894,6 +44353,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -41926,6 +44386,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -41935,6 +44396,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -41949,18 +44411,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -41969,6 +44434,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -41990,6 +44456,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42148,6 +44615,7 @@ paths: application/json: schema: items: + nullable: true properties: active: description: Indicates whether the pool has been successfully @@ -42162,6 +44630,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42169,6 +44638,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42181,10 +44651,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42214,10 +44686,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -42248,6 +44723,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42316,10 +44792,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42372,6 +44850,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42379,6 +44858,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42390,10 +44870,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42423,10 +44905,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -42457,6 +44942,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42488,6 +44974,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42495,6 +44982,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42506,10 +44994,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42539,10 +45029,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -42573,6 +45066,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42653,6 +45147,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42660,6 +45155,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42671,10 +45167,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42704,10 +45202,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -42738,6 +45239,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42807,6 +45309,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42814,6 +45317,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42825,10 +45329,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42858,10 +45364,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -42892,6 +45401,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -42923,6 +45433,7 @@ paths: created: description: The creation time of the pool format: date-time + nullable: true type: string decimals: description: Number of decimal places that this token has @@ -42930,6 +45441,7 @@ paths: id: description: The UUID of the token pool format: uuid + nullable: true type: string info: additionalProperties: @@ -42941,10 +45453,12 @@ paths: interface: description: A reference to an existing FFI, containing pre-registered type information for the token contract + nullable: true properties: id: description: The UUID of the FireFly interface format: uuid + nullable: true type: string name: description: The name of the FireFly interface @@ -42974,10 +45488,13 @@ paths: description: The UUID of the broadcast message used to inform the network about this pool format: uuid + nullable: true type: string methods: description: The method definitions resolved by the token connector to be used by each token operation + nullable: true + type: string name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -43008,6 +45525,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -43167,6 +45685,7 @@ paths: application/json: schema: items: + nullable: true properties: amount: description: The amount for the transfer. For non-fungible tokens @@ -43178,6 +45697,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -43187,6 +45707,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -43201,18 +45722,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -43221,6 +45745,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -43242,6 +45767,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -43319,6 +45845,7 @@ paths: which can be of type broadcast or private. Your chosen token connector and on-chain smart contract must support on-chain/off-chain correlation by taking a `data` input on the transfer + nullable: true properties: data: description: For input allows you to specify data in-line in @@ -43330,10 +45857,12 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments + nullable: true properties: datatype: description: The optional datatype to use for validation of the in-line data + nullable: true properties: name: description: The name of the datatype @@ -43346,6 +45875,7 @@ paths: id: description: The UUID of the referenced data resource format: uuid + nullable: true type: string validator: description: The data validator type to use for in-line @@ -43354,6 +45884,8 @@ paths: value: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean + nullable: true + type: string type: object type: array group: @@ -43361,6 +45893,7 @@ paths: of recipients in-line in the message. Alternative to using the header.group to specify the hash of a group that has been previously resolved + nullable: true properties: members: description: An array of members of the group. If no identities @@ -43400,12 +45933,14 @@ paths: description: The correlation ID of the message. Set this when a message is a response to another message format: uuid + nullable: true type: string group: description: Private messages only - the identifier hash of the privacy group. Derived from the name and member list of the group format: byte + nullable: true type: string key: description: The on-chain signing key used to sign the transaction @@ -43491,6 +46026,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -43500,6 +46036,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -43514,18 +46051,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -43534,6 +46074,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -43555,6 +46096,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -43587,6 +46129,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -43596,6 +46139,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -43610,18 +46154,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -43630,6 +46177,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -43651,6 +46199,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -43706,6 +46255,7 @@ paths: blockchainEvent: description: The UUID of the blockchain event format: uuid + nullable: true type: string connector: description: The name of the token connector, as specified in @@ -43715,6 +46265,7 @@ paths: created: description: The creation time of the transfer format: date-time + nullable: true type: string from: description: The source account for the transfer. On input defaults @@ -43729,18 +46280,21 @@ paths: description: The UUID of this token transfer, in the local FireFly node format: uuid + nullable: true type: string message: description: The UUID of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: uuid + nullable: true type: string messageHash: description: The hash of a message that has been correlated with this transfer using the data field of the transfer in a compatible token connector format: byte + nullable: true type: string namespace: description: The namespace for the transfer, which must match @@ -43749,6 +46303,7 @@ paths: pool: description: The UUID the token pool this transfer applies to format: uuid + nullable: true type: string protocolId: description: An alphanumerically sortable string that represents @@ -43770,6 +46325,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -43868,6 +46424,7 @@ paths: application/json: schema: items: + nullable: true properties: blockchainIds: description: The blockchain transaction ID, in the format specific @@ -43887,10 +46444,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -44022,10 +46581,12 @@ paths: Note the transaction is individually created with the same UUID on each participant in the FireFly transaction format: date-time + nullable: true type: string id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string idempotencyKey: description: An optional unique identifier for a transaction. @@ -44080,10 +46641,12 @@ paths: application/json: schema: items: + nullable: true properties: id: description: The UUID assigned to the event by FireFly format: uuid + nullable: true type: string info: additionalProperties: @@ -44096,6 +46659,7 @@ paths: description: The UUID of the listener that detected this event, or nil for built-in events in the system namespace format: uuid + nullable: true type: string name: description: The name of the event in the blockchain smart contract @@ -44124,6 +46688,7 @@ paths: description: The time allocated to this event by the blockchain. This is the block timestamp for most blockchain connectors format: date-time + nullable: true type: string tx: description: If this blockchain event is coorelated to FireFly @@ -44138,6 +46703,7 @@ paths: id: description: The UUID of the FireFly transaction format: uuid + nullable: true type: string type: description: The type of the FireFly transaction @@ -44174,10 +46740,12 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time the operation was created format: date-time + nullable: true type: string error: description: Any error reported back from the plugin for this @@ -44186,6 +46754,7 @@ paths: id: description: The UUID of the operation format: uuid + nullable: true type: string input: additionalProperties: @@ -44210,6 +46779,7 @@ paths: previous operation, this field points to the UUID of the operation being retried format: uuid + nullable: true type: string status: description: The current status of the operation @@ -44218,6 +46788,7 @@ paths: description: The UUID of the FireFly transaction the operation is part of format: uuid + nullable: true type: string type: description: The type of the operation @@ -44241,6 +46812,7 @@ paths: updated: description: The last update time of the operation format: date-time + nullable: true type: string type: object type: array @@ -44279,6 +46851,7 @@ paths: items: description: A set of records describing the activities within the transaction known by the local FireFly node + nullable: true properties: error: description: If an error occurred related to the detail @@ -44289,6 +46862,7 @@ paths: The type of this record can be inferred from the entry type format: uuid + nullable: true type: string info: additionalProperties: @@ -44309,6 +46883,7 @@ paths: such as the time an event was created, or the last update time of an operation format: date-time + nullable: true type: string type: description: The type of the transaction status detail record @@ -44402,21 +46977,25 @@ paths: application/json: schema: items: + nullable: true properties: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -44468,17 +47047,20 @@ paths: created: description: The time this verifier was created on this node format: date-time + nullable: true type: string hash: description: Hash used as a globally consistent identifier for this namespace + type + value combination on every node in the network format: byte + nullable: true type: string identity: description: The UUID of the parent identity that has claimed this verifier format: uuid + nullable: true type: string namespace: description: The namespace of the verifier @@ -44577,6 +47159,7 @@ paths: description: List of currently active websocket client connections items: description: List of currently active websocket client connections + nullable: true properties: id: description: The unique ID assigned to this client connection @@ -44591,6 +47174,7 @@ paths: items: description: List of subscriptions currently started by this client + nullable: true properties: ephemeral: description: Indicates whether the subscription is @@ -44690,6 +47274,7 @@ paths: description: The time the subscription started (reset on dynamic namespace reload) format: date-time + nullable: true type: string type: object type: array diff --git a/go.mod b/go.mod index 8908151019..22c656923e 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly -go 1.23 +go 1.23.0 -toolchain go1.23.0 +toolchain go1.23.4 require ( blockwatch.cc/tzgo v1.17.1 @@ -11,7 +11,7 @@ require ( github.com/aidarkhanov/nanoid v1.0.8 github.com/blang/semver/v4 v4.0.0 github.com/docker/go-units v0.5.0 - github.com/getkin/kin-openapi v0.122.0 + github.com/getkin/kin-openapi v0.131.0 github.com/ghodss/yaml v1.0.0 github.com/go-resty/resty/v2 v2.11.0 github.com/golang-migrate/migrate/v4 v4.17.0 @@ -28,7 +28,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 gitlab.com/hfuss/mux-prometheus v0.0.5 golang.org/x/net v0.36.0 golang.org/x/text v0.24.0 @@ -44,8 +44,8 @@ require ( github.com/echa/log v1.2.4 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/swag v0.22.7 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/google/uuid v1.5.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect @@ -65,6 +65,8 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -79,7 +81,7 @@ require ( github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.5.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/wayneashleyberry/terminal-dimensions v1.1.0 // indirect github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect diff --git a/go.sum b/go.sum index 67d59b644f..ef506e0cdd 100644 --- a/go.sum +++ b/go.sum @@ -48,12 +48,18 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getkin/kin-openapi v0.122.0 h1:WB9Jbl0Hp/T79/JF9xlSW5Kl9uYdk/AWD0yAd9HOM10= github.com/getkin/kin-openapi v0.122.0/go.mod h1:PCWw/lfBrJY4HcdqE3jj+QFkaFK8ABoqo7PvqVhXXqw= +github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE= +github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= @@ -79,6 +85,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hyperledger/firefly-common v1.4.15 h1:dp4Mo2JQRPMbL7hoMw8T/ktvIUgematOLkXIppQtBp0= github.com/hyperledger/firefly-common v1.4.15/go.mod h1:bA7tAJxcpfQMrHN3/YycTSpyk4g2WlnDlpHx8WOUtAY= +github.com/hyperledger/firefly-common v1.5.1 h1:/DREi1ye1HfYr3GDLBhXuugeMzT4zg9EN2uTYFlVY6M= +github.com/hyperledger/firefly-common v1.5.1/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-signer v1.1.20 h1:U/oGj+QuHdFp4NVZyYOzt3RW51m9nsdYQAGGeChG7g0= github.com/hyperledger/firefly-signer v1.1.20/go.mod h1:4S8Ki1f1d8U+Ujojea/a3mkXnJ5Fuz+JBfrf9HBdyO0= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -134,6 +142,10 @@ github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= +github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= +github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= @@ -191,6 +203,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -198,6 +212,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= @@ -220,6 +236,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e h1:723BNChdd0c2Wk6WOE320qGBiPtYx0F0Bbm1kriShfE= @@ -236,6 +254,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/go.work b/go.work index 20451ae8d1..b4f0e2c040 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,6 @@ -go 1.23 +go 1.23.0 -toolchain go1.23.0 +toolchain go1.23.4 use ( . diff --git a/go.work.sum b/go.work.sum index ddef2b2b7a..11df210ea7 100644 --- a/go.work.sum +++ b/go.work.sum @@ -288,16 +288,10 @@ github.com/fsouza/fake-gcs-server v1.17.0 h1:OeH75kBZcZa3ZE+zz/mFdJ2btt9FgqfjI7g github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= -github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE= -github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= @@ -363,8 +357,6 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hyperledger/firefly-common v1.5.1 h1:/DREi1ye1HfYr3GDLBhXuugeMzT4zg9EN2uTYFlVY6M= -github.com/hyperledger/firefly-common v1.5.1/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= @@ -418,6 +410,7 @@ github.com/markbates/pkger v0.15.1 h1:3MPelV53RnGSW07izx5xGxl4e/sdRD6zqseIk0rMAS github.com/markbates/pkger v0.15.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/maxbrunsfeld/counterfeiter/v6 v6.11.2/go.mod h1:VzB2VoMh1Y32/QqDfg9ZJYHj99oM4LiGtqPZydTiQSQ= github.com/microsoft/go-mssqldb v1.0.0 h1:k2p2uuG8T5T/7Hp7/e3vMGTnnR0sU4h8d1CcC71iLHU= github.com/microsoft/go-mssqldb v1.0.0/go.mod h1:+4wZTUnz/SV6nffv+RRRB/ss8jPng5Sho2SmM1l2ts4= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= @@ -445,10 +438,6 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba h1:fhFP5RliM2HW/8XdcO5QngSfFli9GcRIpMXvypTQt6E= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c= @@ -471,10 +460,6 @@ github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/snowflakedb/gosnowflake v1.6.19 h1:KSHXrQ5o7uso25hNIzi/RObXtnSGkFgie91X82KcvMY= github.com/snowflakedb/gosnowflake v1.6.19/go.mod h1:FM1+PWUdwB9udFDsXdfD58NONC0m+MlOSmQRvimobSM= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xanzy/go-gitlab v0.15.0 h1:rWtwKTgEnXyNUGrOArN7yyc3THRkpYcKXIXia9abywQ= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -507,12 +492,11 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= -golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -521,9 +505,11 @@ golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= diff --git a/internal/apiserver/ffi2swagger_test.go b/internal/apiserver/ffi2swagger_test.go index aae513061a..db9f838c6e 100644 --- a/internal/apiserver/ffi2swagger_test.go +++ b/internal/apiserver/ffi2swagger_test.go @@ -127,27 +127,27 @@ func TestGenerate(t *testing.T) { assert.ElementsMatch(t, []string{"/interface", "/invoke/method1", "/invoke/method2", "/query/method1", "/query/method2", "/listeners/event1"}, pathNames(doc.Paths)) invokeMethod1 := doc.Paths.Value("/invoke/method1").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", invokeMethod1.Type) + assert.True(t, invokeMethod1.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "location", "options", "key", "idempotencyKey"}, paramNames(invokeMethod1.Properties)) - assert.Equal(t, "object", invokeMethod1.Properties["input"].Value.Type) + assert.True(t, invokeMethod1.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{"x", "y", "z"}, paramNames(invokeMethod1.Properties["input"].Value.Properties)) invokeMethod2 := doc.Paths.Value("/invoke/method2").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", invokeMethod2.Type) + assert.True(t, invokeMethod2.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "location", "options", "key", "idempotencyKey"}, paramNames(invokeMethod2.Properties)) - assert.Equal(t, "object", invokeMethod2.Properties["input"].Value.Type) + assert.True(t, invokeMethod2.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{}, paramNames(invokeMethod2.Properties["input"].Value.Properties)) queryMethod1 := doc.Paths.Value("/query/method1").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", queryMethod1.Type) + assert.True(t, queryMethod1.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "location", "options", "key", "idempotencyKey"}, paramNames(queryMethod1.Properties)) - assert.Equal(t, "object", queryMethod1.Properties["input"].Value.Type) + assert.True(t, queryMethod1.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{"x", "y", "z"}, paramNames(queryMethod1.Properties["input"].Value.Properties)) queryMethod2 := doc.Paths.Value("/query/method2").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", queryMethod2.Type) + assert.True(t, queryMethod2.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "location", "options", "key", "idempotencyKey"}, paramNames(queryMethod2.Properties)) - assert.Equal(t, "object", queryMethod2.Properties["input"].Value.Type) + assert.True(t, queryMethod2.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{}, paramNames(queryMethod2.Properties["input"].Value.Properties)) } @@ -164,27 +164,27 @@ func TestGenerateWithLocation(t *testing.T) { assert.ElementsMatch(t, []string{"/interface", "/invoke/method1", "/invoke/method2", "/query/method1", "/query/method2", "/listeners/event1"}, pathNames(doc.Paths)) invokeMethod1 := doc.Paths.Value("/invoke/method1").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", invokeMethod1.Type) + assert.True(t, invokeMethod1.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "options", "key", "idempotencyKey"}, paramNames(invokeMethod1.Properties)) - assert.Equal(t, "object", invokeMethod1.Properties["input"].Value.Type) + assert.True(t, invokeMethod1.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{"x", "y", "z"}, paramNames(invokeMethod1.Properties["input"].Value.Properties)) invokeMethod2 := doc.Paths.Value("/invoke/method2").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", invokeMethod2.Type) + assert.True(t, invokeMethod2.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "options", "key", "idempotencyKey"}, paramNames(invokeMethod2.Properties)) - assert.Equal(t, "object", invokeMethod2.Properties["input"].Value.Type) + assert.True(t, invokeMethod2.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{}, paramNames(invokeMethod2.Properties["input"].Value.Properties)) queryMethod1 := doc.Paths.Value("/query/method1").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", queryMethod1.Type) + assert.True(t, queryMethod1.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "options", "key", "idempotencyKey"}, paramNames(queryMethod1.Properties)) - assert.Equal(t, "object", queryMethod1.Properties["input"].Value.Type) + assert.True(t, queryMethod1.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{"x", "y", "z"}, paramNames(queryMethod1.Properties["input"].Value.Properties)) queryMethod2 := doc.Paths.Value("/query/method2").Post.RequestBody.Value.Content.Get("application/json").Schema.Value - assert.Equal(t, "object", queryMethod2.Type) + assert.True(t, queryMethod2.Type.Is("object")) assert.ElementsMatch(t, []string{"input", "options", "key", "idempotencyKey"}, paramNames(queryMethod2.Properties)) - assert.Equal(t, "object", queryMethod2.Properties["input"].Value.Type) + assert.True(t, queryMethod2.Properties["input"].Value.Type.Is("object")) assert.ElementsMatch(t, []string{}, paramNames(queryMethod2.Properties["input"].Value.Properties)) } diff --git a/smart_contracts/fabric/custompin-sample/chaincode/mocks/chaincodestub.go b/smart_contracts/fabric/custompin-sample/chaincode/mocks/chaincodestub.go index 93f08ee70d..609657142f 100644 --- a/smart_contracts/fabric/custompin-sample/chaincode/mocks/chaincodestub.go +++ b/smart_contracts/fabric/custompin-sample/chaincode/mocks/chaincodestub.go @@ -4,9 +4,9 @@ package mocks import ( "sync" + "github.com/golang/protobuf/ptypes/timestamp" "github.com/hyperledger/fabric-chaincode-go/shim" "github.com/hyperledger/fabric-protos-go/peer" - "google.golang.org/protobuf/types/known/timestamppb" ) type ChaincodeStub struct { @@ -388,16 +388,16 @@ type ChaincodeStub struct { getTxIDReturnsOnCall map[int]struct { result1 string } - GetTxTimestampStub func() (*timestamppb.Timestamp, error) + GetTxTimestampStub func() (*timestamp.Timestamp, error) getTxTimestampMutex sync.RWMutex getTxTimestampArgsForCall []struct { } getTxTimestampReturns struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error } getTxTimestampReturnsOnCall map[int]struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error } InvokeChaincodeStub func(string, [][]byte, string) peer.Response @@ -413,6 +413,18 @@ type ChaincodeStub struct { invokeChaincodeReturnsOnCall map[int]struct { result1 peer.Response } + PurgePrivateDataStub func(string, string) error + purgePrivateDataMutex sync.RWMutex + purgePrivateDataArgsForCall []struct { + arg1 string + arg2 string + } + purgePrivateDataReturns struct { + result1 error + } + purgePrivateDataReturnsOnCall map[int]struct { + result1 error + } PutPrivateDataStub func(string, string, []byte) error putPrivateDataMutex sync.RWMutex putPrivateDataArgsForCall []struct { @@ -2290,7 +2302,7 @@ func (fake *ChaincodeStub) GetTxIDReturnsOnCall(i int, result1 string) { }{result1} } -func (fake *ChaincodeStub) GetTxTimestamp() (*timestamppb.Timestamp, error) { +func (fake *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) { fake.getTxTimestampMutex.Lock() ret, specificReturn := fake.getTxTimestampReturnsOnCall[len(fake.getTxTimestampArgsForCall)] fake.getTxTimestampArgsForCall = append(fake.getTxTimestampArgsForCall, struct { @@ -2314,34 +2326,34 @@ func (fake *ChaincodeStub) GetTxTimestampCallCount() int { return len(fake.getTxTimestampArgsForCall) } -func (fake *ChaincodeStub) GetTxTimestampCalls(stub func() (*timestamppb.Timestamp, error)) { +func (fake *ChaincodeStub) GetTxTimestampCalls(stub func() (*timestamp.Timestamp, error)) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = stub } -func (fake *ChaincodeStub) GetTxTimestampReturns(result1 *timestamppb.Timestamp, result2 error) { +func (fake *ChaincodeStub) GetTxTimestampReturns(result1 *timestamp.Timestamp, result2 error) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = nil fake.getTxTimestampReturns = struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }{result1, result2} } -func (fake *ChaincodeStub) GetTxTimestampReturnsOnCall(i int, result1 *timestamppb.Timestamp, result2 error) { +func (fake *ChaincodeStub) GetTxTimestampReturnsOnCall(i int, result1 *timestamp.Timestamp, result2 error) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = nil if fake.getTxTimestampReturnsOnCall == nil { fake.getTxTimestampReturnsOnCall = make(map[int]struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }) } fake.getTxTimestampReturnsOnCall[i] = struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }{result1, result2} } @@ -2414,6 +2426,68 @@ func (fake *ChaincodeStub) InvokeChaincodeReturnsOnCall(i int, result1 peer.Resp }{result1} } +func (fake *ChaincodeStub) PurgePrivateData(arg1 string, arg2 string) error { + fake.purgePrivateDataMutex.Lock() + ret, specificReturn := fake.purgePrivateDataReturnsOnCall[len(fake.purgePrivateDataArgsForCall)] + fake.purgePrivateDataArgsForCall = append(fake.purgePrivateDataArgsForCall, struct { + arg1 string + arg2 string + }{arg1, arg2}) + stub := fake.PurgePrivateDataStub + fakeReturns := fake.purgePrivateDataReturns + fake.recordInvocation("PurgePrivateData", []interface{}{arg1, arg2}) + fake.purgePrivateDataMutex.Unlock() + if stub != nil { + return stub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *ChaincodeStub) PurgePrivateDataCallCount() int { + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() + return len(fake.purgePrivateDataArgsForCall) +} + +func (fake *ChaincodeStub) PurgePrivateDataCalls(stub func(string, string) error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = stub +} + +func (fake *ChaincodeStub) PurgePrivateDataArgsForCall(i int) (string, string) { + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() + argsForCall := fake.purgePrivateDataArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *ChaincodeStub) PurgePrivateDataReturns(result1 error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = nil + fake.purgePrivateDataReturns = struct { + result1 error + }{result1} +} + +func (fake *ChaincodeStub) PurgePrivateDataReturnsOnCall(i int, result1 error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = nil + if fake.purgePrivateDataReturnsOnCall == nil { + fake.purgePrivateDataReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.purgePrivateDataReturnsOnCall[i] = struct { + result1 error + }{result1} +} + func (fake *ChaincodeStub) PutPrivateData(arg1 string, arg2 string, arg3 []byte) error { var arg3Copy []byte if arg3 != nil { @@ -2883,6 +2957,8 @@ func (fake *ChaincodeStub) Invocations() map[string][][]interface{} { defer fake.getTxTimestampMutex.RUnlock() fake.invokeChaincodeMutex.RLock() defer fake.invokeChaincodeMutex.RUnlock() + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() fake.putPrivateDataMutex.RLock() defer fake.putPrivateDataMutex.RUnlock() fake.putStateMutex.RLock() diff --git a/smart_contracts/fabric/custompin-sample/go.mod b/smart_contracts/fabric/custompin-sample/go.mod index ace68e44cc..b585e10175 100644 --- a/smart_contracts/fabric/custompin-sample/go.mod +++ b/smart_contracts/fabric/custompin-sample/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly/custompin_sample -go 1.23 +go 1.23.0 require ( github.com/hyperledger/fabric-chaincode-go v0.0.0-20240124143825-7dec3c7e7d45 diff --git a/smart_contracts/fabric/firefly-go/chaincode/mocks/chaincodestub.go b/smart_contracts/fabric/firefly-go/chaincode/mocks/chaincodestub.go index 93f08ee70d..609657142f 100644 --- a/smart_contracts/fabric/firefly-go/chaincode/mocks/chaincodestub.go +++ b/smart_contracts/fabric/firefly-go/chaincode/mocks/chaincodestub.go @@ -4,9 +4,9 @@ package mocks import ( "sync" + "github.com/golang/protobuf/ptypes/timestamp" "github.com/hyperledger/fabric-chaincode-go/shim" "github.com/hyperledger/fabric-protos-go/peer" - "google.golang.org/protobuf/types/known/timestamppb" ) type ChaincodeStub struct { @@ -388,16 +388,16 @@ type ChaincodeStub struct { getTxIDReturnsOnCall map[int]struct { result1 string } - GetTxTimestampStub func() (*timestamppb.Timestamp, error) + GetTxTimestampStub func() (*timestamp.Timestamp, error) getTxTimestampMutex sync.RWMutex getTxTimestampArgsForCall []struct { } getTxTimestampReturns struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error } getTxTimestampReturnsOnCall map[int]struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error } InvokeChaincodeStub func(string, [][]byte, string) peer.Response @@ -413,6 +413,18 @@ type ChaincodeStub struct { invokeChaincodeReturnsOnCall map[int]struct { result1 peer.Response } + PurgePrivateDataStub func(string, string) error + purgePrivateDataMutex sync.RWMutex + purgePrivateDataArgsForCall []struct { + arg1 string + arg2 string + } + purgePrivateDataReturns struct { + result1 error + } + purgePrivateDataReturnsOnCall map[int]struct { + result1 error + } PutPrivateDataStub func(string, string, []byte) error putPrivateDataMutex sync.RWMutex putPrivateDataArgsForCall []struct { @@ -2290,7 +2302,7 @@ func (fake *ChaincodeStub) GetTxIDReturnsOnCall(i int, result1 string) { }{result1} } -func (fake *ChaincodeStub) GetTxTimestamp() (*timestamppb.Timestamp, error) { +func (fake *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) { fake.getTxTimestampMutex.Lock() ret, specificReturn := fake.getTxTimestampReturnsOnCall[len(fake.getTxTimestampArgsForCall)] fake.getTxTimestampArgsForCall = append(fake.getTxTimestampArgsForCall, struct { @@ -2314,34 +2326,34 @@ func (fake *ChaincodeStub) GetTxTimestampCallCount() int { return len(fake.getTxTimestampArgsForCall) } -func (fake *ChaincodeStub) GetTxTimestampCalls(stub func() (*timestamppb.Timestamp, error)) { +func (fake *ChaincodeStub) GetTxTimestampCalls(stub func() (*timestamp.Timestamp, error)) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = stub } -func (fake *ChaincodeStub) GetTxTimestampReturns(result1 *timestamppb.Timestamp, result2 error) { +func (fake *ChaincodeStub) GetTxTimestampReturns(result1 *timestamp.Timestamp, result2 error) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = nil fake.getTxTimestampReturns = struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }{result1, result2} } -func (fake *ChaincodeStub) GetTxTimestampReturnsOnCall(i int, result1 *timestamppb.Timestamp, result2 error) { +func (fake *ChaincodeStub) GetTxTimestampReturnsOnCall(i int, result1 *timestamp.Timestamp, result2 error) { fake.getTxTimestampMutex.Lock() defer fake.getTxTimestampMutex.Unlock() fake.GetTxTimestampStub = nil if fake.getTxTimestampReturnsOnCall == nil { fake.getTxTimestampReturnsOnCall = make(map[int]struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }) } fake.getTxTimestampReturnsOnCall[i] = struct { - result1 *timestamppb.Timestamp + result1 *timestamp.Timestamp result2 error }{result1, result2} } @@ -2414,6 +2426,68 @@ func (fake *ChaincodeStub) InvokeChaincodeReturnsOnCall(i int, result1 peer.Resp }{result1} } +func (fake *ChaincodeStub) PurgePrivateData(arg1 string, arg2 string) error { + fake.purgePrivateDataMutex.Lock() + ret, specificReturn := fake.purgePrivateDataReturnsOnCall[len(fake.purgePrivateDataArgsForCall)] + fake.purgePrivateDataArgsForCall = append(fake.purgePrivateDataArgsForCall, struct { + arg1 string + arg2 string + }{arg1, arg2}) + stub := fake.PurgePrivateDataStub + fakeReturns := fake.purgePrivateDataReturns + fake.recordInvocation("PurgePrivateData", []interface{}{arg1, arg2}) + fake.purgePrivateDataMutex.Unlock() + if stub != nil { + return stub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *ChaincodeStub) PurgePrivateDataCallCount() int { + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() + return len(fake.purgePrivateDataArgsForCall) +} + +func (fake *ChaincodeStub) PurgePrivateDataCalls(stub func(string, string) error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = stub +} + +func (fake *ChaincodeStub) PurgePrivateDataArgsForCall(i int) (string, string) { + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() + argsForCall := fake.purgePrivateDataArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *ChaincodeStub) PurgePrivateDataReturns(result1 error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = nil + fake.purgePrivateDataReturns = struct { + result1 error + }{result1} +} + +func (fake *ChaincodeStub) PurgePrivateDataReturnsOnCall(i int, result1 error) { + fake.purgePrivateDataMutex.Lock() + defer fake.purgePrivateDataMutex.Unlock() + fake.PurgePrivateDataStub = nil + if fake.purgePrivateDataReturnsOnCall == nil { + fake.purgePrivateDataReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.purgePrivateDataReturnsOnCall[i] = struct { + result1 error + }{result1} +} + func (fake *ChaincodeStub) PutPrivateData(arg1 string, arg2 string, arg3 []byte) error { var arg3Copy []byte if arg3 != nil { @@ -2883,6 +2957,8 @@ func (fake *ChaincodeStub) Invocations() map[string][][]interface{} { defer fake.getTxTimestampMutex.RUnlock() fake.invokeChaincodeMutex.RLock() defer fake.invokeChaincodeMutex.RUnlock() + fake.purgePrivateDataMutex.RLock() + defer fake.purgePrivateDataMutex.RUnlock() fake.putPrivateDataMutex.RLock() defer fake.putPrivateDataMutex.RUnlock() fake.putStateMutex.RLock() diff --git a/test/data/contracts/assetcreator/go.mod b/test/data/contracts/assetcreator/go.mod index a1a1697b1a..bd5ae3b811 100644 --- a/test/data/contracts/assetcreator/go.mod +++ b/test/data/contracts/assetcreator/go.mod @@ -1,8 +1,8 @@ module github.com/hyperledger/firefly/test/data/assetcreator -go 1.23 +go 1.23.0 -toolchain go1.23.0 +toolchain go1.23.4 require github.com/hyperledger/fabric-contract-api-go v1.2.2 From 533f6a41bcfa2892c04b728732fda602d25440a1 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 29 Apr 2025 11:34:43 -0400 Subject: [PATCH 49/67] Update firefly-signer patch version Signed-off-by: Simon Gellis --- go.mod | 2 +- go.work.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 22c656923e..2e7ca740ba 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.1 github.com/hyperledger/firefly-common v1.5.1 - github.com/hyperledger/firefly-signer v1.1.20 + github.com/hyperledger/firefly-signer v1.1.21 github.com/jarcoal/httpmock v1.2.0 github.com/lib/pq v1.10.9 github.com/mattn/go-sqlite3 v1.14.19 diff --git a/go.work.sum b/go.work.sum index 11df210ea7..751ff748db 100644 --- a/go.work.sum +++ b/go.work.sum @@ -357,6 +357,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= +github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= From da7afa077a9b4bf36190c3a4285bbafb8a052f12 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Tue, 29 Apr 2025 12:22:02 -0400 Subject: [PATCH 50/67] Install golangci-lint the old way Signed-off-by: Simon Gellis --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea8d71c7a8..f411b91b4d 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ lint: ${LINT} ${MOCKERY}: $(VGO) install github.com/vektra/mockery/v2@latest ${LINT}: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(shell $(VGO) env GOPATH)/bin v1.64.8 + $(VGO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 ffcommon: $(eval WSCLIENT_PATH := $(shell $(VGO) list -f '{{.Dir}}' github.com/hyperledger/firefly-common/pkg/wsclient)) From 97edd3235d39feaabb57666d328490c4417cdb51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 09:21:47 +0000 Subject: [PATCH 51/67] Bump axios in /smart_contracts/ethereum/solidity_firefly Bumps [axios](https://github.com/axios/axios) from 1.7.9 to 1.9.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.9...v1.9.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.9.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- .../ethereum/solidity_firefly/package-lock.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/smart_contracts/ethereum/solidity_firefly/package-lock.json b/smart_contracts/ethereum/solidity_firefly/package-lock.json index c911f7a69c..87ea583b77 100644 --- a/smart_contracts/ethereum/solidity_firefly/package-lock.json +++ b/smart_contracts/ethereum/solidity_firefly/package-lock.json @@ -2281,10 +2281,11 @@ } }, "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "follow-redirects": "^1.15.6", From 8cc7e0069929191282b360ddd1664c3590c6f174 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 30 Apr 2025 20:11:29 -0400 Subject: [PATCH 52/67] Update custom contracts docs Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/custom_contracts/cardano.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc-site/docs/tutorials/custom_contracts/cardano.md b/doc-site/docs/tutorials/custom_contracts/cardano.md index f5d60d7c4d..2f13e96ae7 100644 --- a/doc-site/docs/tutorials/custom_contracts/cardano.md +++ b/doc-site/docs/tutorials/custom_contracts/cardano.md @@ -16,7 +16,9 @@ Cardano dApps typically have two components: off-chain and on-chain. ## Writing a dApp -First, decide on the contract which your dApp will satisfy. FireFly uses [JSON schema](https://json-schema.org/) to describe its contracts. Create a file named `contract.json`. An example is below: +> **NOTE:** The source code to this dApp is also available [on GitHub](https://github.com/hyperledger/firefly-cardano/tree/main/wasm/simple-tx). + +First, decide on the contract which your dApp will satisfy. FireFly uses [FireFly Interface Format](https://hyperledger.github.io/firefly/latest/reference/firefly_interface_format/) to describe its contracts. Create a file named `contract.json`. An example is below: ### Contract @@ -493,6 +495,8 @@ After connecting the WebSocket client, send a message to tell FireFly to: } ``` +> **NOTE:** Do not use `autoack` in production, as it can cause your application to miss events. For resilience, your app should instead respond with an "ack" message to each incoming event. For more details, see the [Websockets documentation](../../reference/types/subscription/#using-start-and-ack-explicitly). + ### WebSocket event After creating the subscription, you should see an event arrive on the connected WebSocket client that looks something like this: From 71673fde1513132cd09aae48f63ffcbdcadb8df5 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 30 Apr 2025 20:13:30 -0400 Subject: [PATCH 53/67] Remove comment Signed-off-by: Simon Gellis --- internal/networkmap/did.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/networkmap/did.go b/internal/networkmap/did.go index 0b4e829f7e..b52f290cdb 100644 --- a/internal/networkmap/did.go +++ b/internal/networkmap/did.go @@ -94,7 +94,7 @@ func (nm *networkMap) generateDIDAuthentication(ctx context.Context, identity *c func (nm *networkMap) generateCardanoAddressVerifier(identity *core.Identity, verifier *core.Verifier) *VerificationMethod { return &VerificationMethod{ ID: verifier.Hash.String(), - Type: "PaymentVerificationKeyShelley_ed25519", // hope that it's safe to assume we always use Shelley + Type: "PaymentVerificationKeyShelley_ed25519", Controller: identity.DID, BlockchainAccountID: verifier.Value, } From c48427dfa4c1dd7c23d8f09ac1e2acab93bcfe80 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Thu, 1 May 2025 13:52:49 +0100 Subject: [PATCH 54/67] Pull in fix from FireFly common for openapi JSONAny schema type Signed-off-by: Enrique Lacal --- doc-site/docs/swagger/swagger.yaml | 540 ++++++++++++++--------------- go.mod | 3 +- go.sum | 41 +-- 3 files changed, 278 insertions(+), 306 deletions(-) diff --git a/doc-site/docs/swagger/swagger.yaml b/doc-site/docs/swagger/swagger.yaml index 96668c639a..cd06e5075c 100644 --- a/doc-site/docs/swagger/swagger.yaml +++ b/doc-site/docs/swagger/swagger.yaml @@ -111,7 +111,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -206,7 +206,7 @@ paths: identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object name: description: The name that is used in the URL to access the API type: string @@ -249,7 +249,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -320,7 +320,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -441,7 +441,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -535,7 +535,7 @@ paths: identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object name: description: The name that is used in the URL to access the API type: string @@ -578,7 +578,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -649,7 +649,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -762,7 +762,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -828,7 +828,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -907,7 +907,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -933,7 +933,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1024,7 +1024,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -1070,7 +1070,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -1520,7 +1520,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1581,7 +1581,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1608,7 +1608,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -1641,7 +1641,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -1746,7 +1746,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1754,7 +1754,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -1830,7 +1830,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1889,7 +1889,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -1916,7 +1916,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -1949,7 +1949,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -2071,7 +2071,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2137,7 +2137,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2216,7 +2216,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2242,7 +2242,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -2320,7 +2320,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2386,7 +2386,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2465,7 +2465,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -2491,7 +2491,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -2576,7 +2576,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object options: additionalProperties: description: A map of named inputs that will be passed through @@ -2746,7 +2746,7 @@ paths: manifest: description: The manifest of the batch nullable: true - type: string + type: object namespace: description: The namespace of the batch type: string @@ -2839,7 +2839,7 @@ paths: manifest: description: The manifest of the batch nullable: true - type: string + type: object namespace: description: The namespace of the batch type: string @@ -3277,11 +3277,11 @@ paths: description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector nullable: true - type: string + type: object definition: description: The definition of the smart contract nullable: true - type: string + type: object idempotencyKey: description: An optional identifier to allow idempotent submission of requests. Stored on the transaction uniquely within a namespace @@ -3597,7 +3597,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -3665,7 +3665,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -3746,7 +3746,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -3774,7 +3774,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -3866,7 +3866,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -3910,7 +3910,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -3954,7 +3954,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -3975,7 +3975,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -4046,7 +4046,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4112,7 +4112,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4191,7 +4191,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4217,7 +4217,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -4351,7 +4351,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4417,7 +4417,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4496,7 +4496,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4522,7 +4522,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -4636,7 +4636,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4702,7 +4702,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4781,7 +4781,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4807,7 +4807,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -4930,7 +4930,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -4996,7 +4996,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5075,7 +5075,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5101,7 +5101,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -5179,7 +5179,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5245,7 +5245,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5324,7 +5324,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5350,7 +5350,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -5409,7 +5409,7 @@ paths: in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. nullable: true - type: string + type: object name: description: The name of the FFI to generate type: string @@ -5473,7 +5473,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5539,7 +5539,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5618,7 +5618,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -5644,7 +5644,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -5730,7 +5730,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -5768,7 +5768,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -5814,7 +5814,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -5962,7 +5962,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -5983,7 +5983,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6317,7 +6317,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6378,7 +6378,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6405,7 +6405,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -6438,7 +6438,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -6530,7 +6530,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6591,7 +6591,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6623,7 +6623,7 @@ paths: example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array interface: @@ -6647,7 +6647,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -6723,7 +6723,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6782,7 +6782,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -6809,7 +6809,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -6842,7 +6842,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -6982,7 +6982,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7041,7 +7041,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7068,7 +7068,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -7101,7 +7101,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -7192,7 +7192,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7253,7 +7253,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7285,7 +7285,7 @@ paths: example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array interface: @@ -7309,7 +7309,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -7397,7 +7397,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7435,7 +7435,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object method: description: An in-line FFI method definition for the method to invoke. Required when FFI is not specified @@ -7474,7 +7474,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -7495,7 +7495,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -7715,7 +7715,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object type: array description: Success @@ -7764,7 +7764,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object multipart/form-data: schema: @@ -7868,7 +7868,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -7999,7 +7999,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -8289,7 +8289,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -8927,7 +8927,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -9092,7 +9092,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is @@ -9141,7 +9141,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -9196,7 +9196,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -9251,7 +9251,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -9335,7 +9335,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -11293,7 +11293,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -11580,7 +11580,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object type: array description: Success @@ -11910,7 +11910,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array header: @@ -12389,7 +12389,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -12918,7 +12918,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -13116,7 +13116,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -13519,7 +13519,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -13621,7 +13621,7 @@ paths: identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object name: description: The name that is used in the URL to access the API type: string @@ -13664,7 +13664,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -13735,7 +13735,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -13870,7 +13870,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -13971,7 +13971,7 @@ paths: identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object name: description: The name that is used in the URL to access the API type: string @@ -14014,7 +14014,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -14085,7 +14085,7 @@ paths: contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: The UUID of the broadcast message that was used to publish this API to the network @@ -14205,7 +14205,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -14271,7 +14271,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -14350,7 +14350,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -14376,7 +14376,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -14482,7 +14482,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -14520,7 +14520,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -14566,7 +14566,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -14714,7 +14714,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -14735,7 +14735,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15089,7 +15089,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15150,7 +15150,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15177,7 +15177,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -15210,7 +15210,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -15322,7 +15322,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15379,7 +15379,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15406,7 +15406,7 @@ paths: example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array interface: @@ -15430,7 +15430,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -15506,7 +15506,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15565,7 +15565,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -15592,7 +15592,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -15625,7 +15625,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -15754,7 +15754,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -15820,7 +15820,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -15899,7 +15899,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -15925,7 +15925,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -16003,7 +16003,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -16069,7 +16069,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -16148,7 +16148,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -16174,7 +16174,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -16274,7 +16274,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -16312,7 +16312,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -16358,7 +16358,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -16506,7 +16506,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -16527,7 +16527,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -16710,7 +16710,7 @@ paths: manifest: description: The manifest of the batch nullable: true - type: string + type: object namespace: description: The namespace of the batch type: string @@ -16810,7 +16810,7 @@ paths: manifest: description: The manifest of the batch nullable: true - type: string + type: object namespace: description: The namespace of the batch type: string @@ -17283,11 +17283,11 @@ paths: description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector nullable: true - type: string + type: object definition: description: The definition of the smart contract nullable: true - type: string + type: object idempotencyKey: description: An optional identifier to allow idempotent submission of requests. Stored on the transaction uniquely within a namespace @@ -17610,7 +17610,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -17678,7 +17678,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -17759,7 +17759,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -17787,7 +17787,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -17886,7 +17886,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -17930,7 +17930,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -17974,7 +17974,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -17995,7 +17995,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -18066,7 +18066,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18132,7 +18132,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18211,7 +18211,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18237,7 +18237,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -18385,7 +18385,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18451,7 +18451,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18530,7 +18530,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18556,7 +18556,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -18677,7 +18677,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18743,7 +18743,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18822,7 +18822,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -18848,7 +18848,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -18978,7 +18978,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19044,7 +19044,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19123,7 +19123,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19149,7 +19149,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -19227,7 +19227,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19293,7 +19293,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19372,7 +19372,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19398,7 +19398,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -19464,7 +19464,7 @@ paths: in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. nullable: true - type: string + type: object name: description: The name of the FFI to generate type: string @@ -19528,7 +19528,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19594,7 +19594,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19673,7 +19673,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array pathname: @@ -19699,7 +19699,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -19792,7 +19792,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -19830,7 +19830,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -19876,7 +19876,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -20024,7 +20024,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -20045,7 +20045,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20386,7 +20386,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20447,7 +20447,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20474,7 +20474,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -20507,7 +20507,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -20606,7 +20606,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20667,7 +20667,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20699,7 +20699,7 @@ paths: example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array interface: @@ -20723,7 +20723,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -20799,7 +20799,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20858,7 +20858,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -20885,7 +20885,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -20918,7 +20918,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -21072,7 +21072,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21131,7 +21131,7 @@ paths: / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21158,7 +21158,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object signature: description: The stringified signature of the event and location, as computed by the blockchain plugin @@ -21191,7 +21191,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -21289,7 +21289,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21350,7 +21350,7 @@ paths: systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21382,7 +21382,7 @@ paths: example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array interface: @@ -21406,7 +21406,7 @@ paths: description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true - type: string + type: object name: description: A descriptive name for the listener type: string @@ -21501,7 +21501,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21539,7 +21539,7 @@ paths: description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object message: description: You can specify a message to correlate with the invocation, which can be of type broadcast or private. Your specified method @@ -21585,7 +21585,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -21733,7 +21733,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array returns: @@ -21754,7 +21754,7 @@ paths: definitions / type systems - such as an Ethereum ABI. See the documentation for more detail nullable: true - type: string + type: object type: object type: array type: object @@ -21981,7 +21981,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object type: array description: Success @@ -22037,7 +22037,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object multipart/form-data: schema: @@ -22141,7 +22141,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -22286,7 +22286,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -22590,7 +22590,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -23249,7 +23249,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object description: Success default: @@ -23428,7 +23428,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is @@ -23484,7 +23484,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -23539,7 +23539,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -23594,7 +23594,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -23685,7 +23685,7 @@ paths: description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true - type: string + type: object version: description: The version of the datatype. Multiple versions can exist with the same name. Use of semantic versioning is encourages, @@ -25727,7 +25727,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -26021,7 +26021,7 @@ paths: database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment nullable: true - type: string + type: object type: object type: array description: Success @@ -26372,7 +26372,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -26912,7 +26912,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -27448,7 +27448,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -27646,7 +27646,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -30418,7 +30418,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object terminated: description: Previously-terminated FireFly smart contracts @@ -30458,7 +30458,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array type: object @@ -30829,7 +30829,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object status: description: The status of the contract listener. One of 'syncing', 'synced', or 'unknown' @@ -30872,7 +30872,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array type: object @@ -33509,7 +33509,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -34080,7 +34080,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -34557,7 +34557,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -35114,7 +35114,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -35340,7 +35340,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -35464,7 +35464,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -35651,7 +35651,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -35820,7 +35820,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -35944,7 +35944,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -36349,7 +36349,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -40123,7 +40123,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object terminated: description: Previously-terminated FireFly smart contracts @@ -40163,7 +40163,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array type: object @@ -40520,7 +40520,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object status: description: The status of the contract listener. One of 'syncing', 'synced', or 'unknown' @@ -40563,7 +40563,7 @@ paths: For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true - type: string + type: object type: object type: array type: object @@ -43130,7 +43130,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -43687,7 +43687,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -44142,7 +44142,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: @@ -44692,7 +44692,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -44911,7 +44911,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -45035,7 +45035,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -45208,7 +45208,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -45370,7 +45370,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -45494,7 +45494,7 @@ paths: description: The method definitions resolved by the token connector to be used by each token operation nullable: true - type: string + type: object name: description: The name of the token pool. Note the name is not validated against the description of the token on the blockchain @@ -45885,7 +45885,7 @@ paths: description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true - type: string + type: object type: object type: array group: diff --git a/go.mod b/go.mod index 2e7ca740ba..74bb7c5805 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,6 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/invopop/yaml v0.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/karlseguin/ccache v2.0.3+incompatible // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect @@ -98,3 +97,5 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/hyperledger/firefly-common => ../firefly-common diff --git a/go.sum b/go.sum index ef506e0cdd..f44441670a 100644 --- a/go.sum +++ b/go.sum @@ -46,18 +46,12 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getkin/kin-openapi v0.122.0 h1:WB9Jbl0Hp/T79/JF9xlSW5Kl9uYdk/AWD0yAd9HOM10= -github.com/getkin/kin-openapi v0.122.0/go.mod h1:PCWw/lfBrJY4HcdqE3jj+QFkaFK8ABoqo7PvqVhXXqw= github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE= github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= @@ -83,16 +77,10 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hyperledger/firefly-common v1.4.15 h1:dp4Mo2JQRPMbL7hoMw8T/ktvIUgematOLkXIppQtBp0= -github.com/hyperledger/firefly-common v1.4.15/go.mod h1:bA7tAJxcpfQMrHN3/YycTSpyk4g2WlnDlpHx8WOUtAY= -github.com/hyperledger/firefly-common v1.5.1 h1:/DREi1ye1HfYr3GDLBhXuugeMzT4zg9EN2uTYFlVY6M= -github.com/hyperledger/firefly-common v1.5.1/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= -github.com/hyperledger/firefly-signer v1.1.20 h1:U/oGj+QuHdFp4NVZyYOzt3RW51m9nsdYQAGGeChG7g0= -github.com/hyperledger/firefly-signer v1.1.20/go.mod h1:4S8Ki1f1d8U+Ujojea/a3mkXnJ5Fuz+JBfrf9HBdyO0= +github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= +github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= -github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -173,8 +161,8 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/qeesung/image2ascii v1.0.1 h1:Fe5zTnX/v/qNC3OC4P/cfASOXS501Xyw2UUcgrLgtp4= github.com/qeesung/image2ascii v1.0.1/go.mod h1:kZKhyX0h2g/YXa/zdJR3JnLnJ8avHjZ3LrvEKSYyAyU= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -201,16 +189,12 @@ github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMV github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -234,12 +218,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e h1:723BNChdd0c2Wk6WOE320qGBiPtYx0F0Bbm1kriShfE= golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -252,15 +232,13 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -273,8 +251,6 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -282,8 +258,6 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -292,8 +266,6 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -320,7 +292,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= From a5d6e4cd2ef7ee97dc43bf130b35c89933638b3a Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 1 May 2025 10:41:33 -0400 Subject: [PATCH 55/67] Use fresh error codes for cardano errors Signed-off-by: Simon Gellis --- internal/blockchain/cardano/cardano_test.go | 24 ++++++++++----------- internal/coremsgs/en_error_messages.go | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/blockchain/cardano/cardano_test.go b/internal/blockchain/cardano/cardano_test.go index b1a4bbb658..4ca5fc0cf1 100644 --- a/internal/blockchain/cardano/cardano_test.go +++ b/internal/blockchain/cardano/cardano_test.go @@ -222,7 +222,7 @@ func TestStartNamespaceStreamQueryError(t *testing.T) { assert.NoError(t, err) err = c.StartNamespace(c.ctx, "ns1") - assert.Regexp(t, "FF10282.*pop", err) + assert.Regexp(t, "FF10484.*pop", err) } func TestStartNamespaceStreamCreateError(t *testing.T) { @@ -248,7 +248,7 @@ func TestStartNamespaceStreamCreateError(t *testing.T) { assert.NoError(t, err) err = c.StartNamespace(c.ctx, "ns1") - assert.Regexp(t, "FF10282.*pop", err) + assert.Regexp(t, "FF10484.*pop", err) } func TestStartNamespaceStreamUpdateError(t *testing.T) { @@ -274,7 +274,7 @@ func TestStartNamespaceStreamUpdateError(t *testing.T) { assert.NoError(t, err) err = c.StartNamespace(c.ctx, "ns1") - assert.Regexp(t, "FF10282.*pop", err) + assert.Regexp(t, "FF10484.*pop", err) } func TestStartNamespaceWSConnectFail(t *testing.T) { @@ -359,7 +359,7 @@ func TestVerifyCardanoAddress(t *testing.T) { assert.Regexp(t, "FF10354", err) _, err = c.ResolveSigningKey(context.Background(), "baddr1cafed00d", blockchain.ResolveKeyIntentSign) - assert.Regexp(t, "FF10140", err) + assert.Regexp(t, "FF10483", err) key, err := c.ResolveSigningKey(context.Background(), "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x", blockchain.ResolveKeyIntentSign) assert.NoError(t, err) @@ -868,7 +868,7 @@ func TestDeleteContractListenerFail(t *testing.T) { httpmock.NewStringResponder(500, "oops")) err := c.DeleteContractListener(context.Background(), sub, true) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestGetContractListenerStatus(t *testing.T) { @@ -917,7 +917,7 @@ func TestGetContractListenerErrorNotFound(t *testing.T) { httpmock.NewStringResponder(404, "no")) _, _, _, err := c.GetContractListenerStatus(context.Background(), "ns1", "sb-1", false) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestGetTransactionStatusSuccess(t *testing.T) { @@ -1062,7 +1062,7 @@ func TestGetTransactionStatusError(t *testing.T) { httpmock.NewStringResponder(500, "uh oh")) _, err := c.GetTransactionStatus(context.Background(), op) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestGetTransactionStatusHandleReceipt(t *testing.T) { @@ -1226,7 +1226,7 @@ func TestAddFireflySubscriptionListError(t *testing.T) { ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} _, err = c.AddFireflySubscription(c.ctx, ns, contract, "") - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestAddFireflySubscriptionAlreadyExists(t *testing.T) { @@ -1326,7 +1326,7 @@ func TestAddFireflySubscriptionCreateError(t *testing.T) { ns := &core.Namespace{Name: "ns1", NetworkName: "ns1"} _, err = c.AddFireflySubscription(c.ctx, ns, contract, "") - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestInvokeContractOK(t *testing.T) { @@ -1456,7 +1456,7 @@ func TestInvokeContractConnectorError(t *testing.T) { rejected, err := c.InvokeContract(context.Background(), "opId", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.True(t, rejected) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestQueryContractOK(t *testing.T) { @@ -1587,7 +1587,7 @@ func TestQueryContractConnectorError(t *testing.T) { assert.NoError(t, err) _, err = c.QueryContract(context.Background(), signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestQueryContractInvalidJson(t *testing.T) { @@ -1653,7 +1653,7 @@ func TestDeployContractConnectorError(t *testing.T) { rejected, err := c.DeployContract(context.Background(), nsOpId, signingKey, definition, contract, nil, nil) assert.True(t, rejected) - assert.Regexp(t, "FF10282", err) + assert.Regexp(t, "FF10484", err) } func TestGetFFIParamValidator(t *testing.T) { diff --git a/internal/coremsgs/en_error_messages.go b/internal/coremsgs/en_error_messages.go index 03034c60f4..dd37050db8 100644 --- a/internal/coremsgs/en_error_messages.go +++ b/internal/coremsgs/en_error_messages.go @@ -59,7 +59,6 @@ var ( MsgSerializationFailed = ffe("FF10137", "Serialization failed") MsgMissingPluginConfig = ffe("FF10138", "Missing configuration '%s' for %s") MsgMissingDataHashIndex = ffe("FF10139", "Missing data hash for index '%d' in message", 400) - MsgInvalidCardanoAddress = ffe("FF10140", "Supplied cardano address is invalid", 400) MsgInvalidEthAddress = ffe("FF10141", "Supplied ethereum address is invalid", 400) MsgInvalidTezosAddress = ffe("FF10142", "Supplied tezos address is invalid", 400) Msg404NoResult = ffe("FF10143", "No result found", 404) @@ -147,7 +146,6 @@ var ( MsgAuthorOrgSigningKeyMismatch = ffe("FF10279", "Author organization '%s' is not associated with signing key '%s'") MsgCannotTransferToSelf = ffe("FF10280", "From and to addresses must be different", 400) MsgLocalOrgNotSet = ffe("FF10281", "Unable to resolve the local root org. Please ensure org.name is configured", 500) - MsgCardanoconnectRESTErr = ffe("FF10282", "Error from cardano connector: %s") MsgTezosconnectRESTErr = ffe("FF10283", "Error from tezos connector: %s") MsgFabconnectRESTErr = ffe("FF10284", "Error from fabconnect: %s") MsgInvalidIdentity = ffe("FF10285", "Supplied Fabric signer identity is invalid", 400) @@ -323,4 +321,6 @@ var ( MsgInvalidIdentityPatch = ffe("FF10480", "A profile must be provided when updating an identity", 400) MsgNodeNotProvidedForCheck = ffe("FF10481", "Node not provided for check", 500) MsgNodeMissingProfile = ffe("FF10482", "Node provided for check does not have a profile", 500) + MsgInvalidCardanoAddress = ffe("FF10483", "Supplied cardano address is invalid", 400) + MsgCardanoconnectRESTErr = ffe("FF10484", "Error from cardano connector: %s") ) From ae14ee237e07cf8b7eee5d188815089654e3f01a Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Thu, 1 May 2025 17:41:36 +0100 Subject: [PATCH 56/67] Update FF Common to 1.5.3 Signed-off-by: Enrique Lacal --- go.mod | 4 +--- go.sum | 2 ++ go.work.sum | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 74bb7c5805..ab4ebf4ac9 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang-migrate/migrate/v4 v4.17.0 github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.1 - github.com/hyperledger/firefly-common v1.5.1 + github.com/hyperledger/firefly-common v1.5.3 github.com/hyperledger/firefly-signer v1.1.21 github.com/jarcoal/httpmock v1.2.0 github.com/lib/pq v1.10.9 @@ -97,5 +97,3 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/hyperledger/firefly-common => ../firefly-common diff --git a/go.sum b/go.sum index f44441670a..05f2103339 100644 --- a/go.sum +++ b/go.sum @@ -77,6 +77,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hyperledger/firefly-common v1.5.3 h1:ujiDT4eI/QxP1E0ahlJALDn0EsI8wk2Meta2acl4AgU= +github.com/hyperledger/firefly-common v1.5.3/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= diff --git a/go.work.sum b/go.work.sum index 751ff748db..078c97e08e 100644 --- a/go.work.sum +++ b/go.work.sum @@ -357,8 +357,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= -github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= +github.com/hyperledger/firefly-common v1.5.3 h1:ujiDT4eI/QxP1E0ahlJALDn0EsI8wk2Meta2acl4AgU= +github.com/hyperledger/firefly-common v1.5.3/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= @@ -503,7 +503,6 @@ golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= From db032f6f62f7e2eed8140b2ef41ff233569309a6 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Fri, 2 May 2025 10:59:24 +0100 Subject: [PATCH 57/67] Update FireFly Common to 1.5.4 Signed-off-by: Enrique Lacal --- go.mod | 2 +- go.sum | 4 ++-- go.work.sum | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ab4ebf4ac9..5545d86b71 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang-migrate/migrate/v4 v4.17.0 github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.1 - github.com/hyperledger/firefly-common v1.5.3 + github.com/hyperledger/firefly-common v1.5.4 github.com/hyperledger/firefly-signer v1.1.21 github.com/jarcoal/httpmock v1.2.0 github.com/lib/pq v1.10.9 diff --git a/go.sum b/go.sum index 05f2103339..744decdf6d 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hyperledger/firefly-common v1.5.3 h1:ujiDT4eI/QxP1E0ahlJALDn0EsI8wk2Meta2acl4AgU= -github.com/hyperledger/firefly-common v1.5.3/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= +github.com/hyperledger/firefly-common v1.5.4 h1:UFnN+4tzGIqHnAPh1Q9zw9sKrxwlgG7R1QFP2AIxg8g= +github.com/hyperledger/firefly-common v1.5.4/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= diff --git a/go.work.sum b/go.work.sum index 078c97e08e..dcaf859dba 100644 --- a/go.work.sum +++ b/go.work.sum @@ -359,6 +359,8 @@ github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hyperledger/firefly-common v1.5.3 h1:ujiDT4eI/QxP1E0ahlJALDn0EsI8wk2Meta2acl4AgU= github.com/hyperledger/firefly-common v1.5.3/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= +github.com/hyperledger/firefly-common v1.5.4 h1:UFnN+4tzGIqHnAPh1Q9zw9sKrxwlgG7R1QFP2AIxg8g= +github.com/hyperledger/firefly-common v1.5.4/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= From c389b2ad80c641dae7bf86e6e02502c4dbe7e96a Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Fri, 2 May 2025 11:00:02 +0100 Subject: [PATCH 58/67] Updated Swagger Signed-off-by: Enrique Lacal --- doc-site/docs/swagger/swagger.yaml | 717 ++++++++++++++--------------- 1 file changed, 348 insertions(+), 369 deletions(-) diff --git a/doc-site/docs/swagger/swagger.yaml b/doc-site/docs/swagger/swagger.yaml index cd06e5075c..a9917f2ff3 100644 --- a/doc-site/docs/swagger/swagger.yaml +++ b/doc-site/docs/swagger/swagger.yaml @@ -81,7 +81,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID of the contract API @@ -106,6 +105,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -201,6 +201,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric @@ -215,6 +216,7 @@ paths: network type: string type: object + required: true responses: "200": content: @@ -244,6 +246,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -315,6 +318,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -436,6 +440,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -530,6 +535,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric @@ -544,6 +550,7 @@ paths: network type: string type: object + required: true responses: "200": content: @@ -573,6 +580,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -644,6 +652,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -722,7 +731,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -748,7 +756,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -756,6 +763,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -779,7 +787,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -814,7 +821,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -822,6 +828,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -858,7 +865,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -893,7 +899,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -901,6 +906,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -919,7 +925,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -927,6 +932,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -1021,6 +1027,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -1042,7 +1049,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -1067,6 +1073,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -1188,6 +1195,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -1471,7 +1479,6 @@ paths: application/json: schema: items: - nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -1506,7 +1513,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -1514,6 +1520,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -1534,7 +1541,6 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -1565,7 +1571,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note @@ -1574,6 +1579,7 @@ paths: blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -1604,6 +1610,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -1638,6 +1645,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -1732,7 +1740,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -1740,6 +1747,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -1751,6 +1759,7 @@ paths: type: array type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -1777,6 +1786,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -1816,7 +1826,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -1824,6 +1833,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -1844,7 +1854,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -1873,7 +1882,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -1882,6 +1890,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -1912,6 +1921,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -1946,6 +1956,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -2018,6 +2029,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -2031,7 +2043,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -2057,7 +2068,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2065,6 +2075,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2088,7 +2099,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -2123,7 +2133,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2131,6 +2140,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2167,7 +2177,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -2202,7 +2211,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2210,6 +2218,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2228,7 +2237,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2236,6 +2244,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2280,7 +2289,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -2306,7 +2314,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2314,6 +2321,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2337,7 +2345,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -2372,7 +2379,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2380,6 +2386,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2416,7 +2423,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -2451,7 +2457,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2459,6 +2464,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2477,7 +2483,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -2485,6 +2490,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -2573,6 +2579,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -2585,6 +2592,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -2709,7 +2717,6 @@ paths: application/json: schema: items: - nullable: true properties: author: description: The DID of identity of the submitter @@ -2744,6 +2751,7 @@ paths: description: The on-chain signing key used to sign the transaction type: string manifest: + additionalProperties: true description: The manifest of the batch nullable: true type: object @@ -2837,6 +2845,7 @@ paths: description: The on-chain signing key used to sign the transaction type: string manifest: + additionalProperties: true description: The manifest of the batch nullable: true type: object @@ -2893,6 +2902,7 @@ paths: requestBody: content: application/json: {} + required: true responses: "204": content: @@ -2999,7 +3009,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID assigned to the event by FireFly @@ -3211,7 +3220,6 @@ paths: application/json: schema: items: - nullable: true properties: count: description: Total count of entries in this time bucket within @@ -3232,7 +3240,6 @@ paths: items: description: Array of separate counts for individual types of record within the bucket - nullable: true properties: count: description: Count of entries of a given type within a @@ -3274,11 +3281,13 @@ paths: schema: properties: contract: + additionalProperties: true description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector nullable: true type: object definition: + additionalProperties: true description: The definition of the smart contract nullable: true type: object @@ -3306,6 +3315,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -3546,7 +3556,6 @@ paths: application/json: schema: items: - nullable: true properties: description: description: A description of the smart contract this FFI represents @@ -3555,7 +3564,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -3581,7 +3589,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -3590,6 +3597,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -3614,7 +3622,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -3649,7 +3656,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -3658,6 +3664,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -3695,7 +3702,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -3730,7 +3736,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -3739,6 +3744,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -3758,7 +3764,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -3767,6 +3772,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -3840,7 +3846,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -3852,7 +3857,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3860,6 +3864,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -3875,7 +3880,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -3896,7 +3900,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3904,6 +3907,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -3919,7 +3923,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -3940,7 +3943,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3948,6 +3950,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -3961,7 +3964,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -3969,6 +3971,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -3993,6 +3996,7 @@ paths: such as 'v1.0.1' is encouraged type: string type: object + required: true responses: "200": content: @@ -4006,7 +4010,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -4032,7 +4035,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4040,6 +4042,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4063,7 +4066,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -4098,7 +4100,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4106,6 +4107,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4142,7 +4144,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -4177,7 +4178,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4185,6 +4185,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4203,7 +4204,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4211,6 +4211,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4311,7 +4312,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -4337,7 +4337,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4345,6 +4344,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4368,7 +4368,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -4403,7 +4402,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4411,6 +4409,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4447,7 +4446,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -4482,7 +4480,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4490,6 +4487,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4508,7 +4506,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4516,6 +4513,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4596,7 +4594,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -4622,7 +4619,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4630,6 +4626,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4653,7 +4650,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -4688,7 +4684,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4696,6 +4691,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4732,7 +4728,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -4767,7 +4762,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4775,6 +4769,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4793,7 +4788,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4801,6 +4795,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4877,6 +4872,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -4890,7 +4886,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -4916,7 +4911,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4924,6 +4918,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -4947,7 +4942,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -4982,7 +4976,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -4990,6 +4983,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5026,7 +5020,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -5061,7 +5054,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5069,6 +5061,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5087,7 +5080,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5095,6 +5087,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5139,7 +5132,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -5165,7 +5157,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5173,6 +5164,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5196,7 +5188,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -5231,7 +5222,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5239,6 +5229,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5275,7 +5266,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -5310,7 +5300,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5318,6 +5307,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5336,7 +5326,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5344,6 +5333,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5405,6 +5395,7 @@ paths: utility type: string input: + additionalProperties: true description: A blockchain connector specific payload. For example in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. @@ -5420,6 +5411,7 @@ paths: description: The version of the FFI to generate type: string type: object + required: true responses: "200": content: @@ -5433,7 +5425,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -5459,7 +5450,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5467,6 +5457,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5490,7 +5481,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -5525,7 +5515,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5533,6 +5522,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5569,7 +5559,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -5604,7 +5593,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5612,6 +5600,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5630,7 +5619,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -5638,6 +5626,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5704,7 +5693,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -5716,7 +5704,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5724,6 +5711,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5765,6 +5753,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -5786,7 +5775,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -5811,6 +5799,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -5948,7 +5937,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5956,6 +5944,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5969,7 +5958,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -5977,6 +5965,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -5998,6 +5987,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -6268,7 +6258,6 @@ paths: application/json: schema: items: - nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -6303,7 +6292,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -6311,6 +6299,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -6331,7 +6320,6 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -6362,7 +6350,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note @@ -6371,6 +6358,7 @@ paths: blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -6401,6 +6389,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -6435,6 +6424,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -6516,7 +6506,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6524,6 +6513,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -6548,7 +6538,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -6575,7 +6564,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -6584,6 +6572,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -6619,6 +6608,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -6644,6 +6634,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -6670,6 +6661,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -6709,7 +6701,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6717,6 +6708,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -6737,7 +6729,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -6766,7 +6757,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -6775,6 +6765,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -6805,6 +6796,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -6839,6 +6831,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -6968,7 +6961,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -6976,6 +6968,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -6996,7 +6989,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -7025,7 +7017,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -7034,6 +7025,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -7064,6 +7056,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -7098,6 +7091,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -7178,7 +7172,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -7186,6 +7179,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -7210,7 +7204,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -7237,7 +7230,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -7246,6 +7238,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -7281,6 +7274,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -7306,6 +7300,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -7332,6 +7327,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -7371,7 +7367,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -7383,7 +7378,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -7391,6 +7385,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -7432,6 +7427,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -7460,7 +7456,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -7468,6 +7463,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -7481,7 +7477,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -7489,6 +7484,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -7510,6 +7506,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -7639,7 +7636,6 @@ paths: application/json: schema: items: - nullable: true properties: blob: description: An optional hash reference to a binary blob attachment @@ -7711,6 +7707,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -7761,6 +7758,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -7788,6 +7786,7 @@ paths: description: Success type: string type: object + required: true responses: "201": content: @@ -7864,6 +7863,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -7995,6 +7995,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -8209,6 +8210,7 @@ paths: of requests. Stored on the transaction uniquely within a namespace type: string type: object + required: true responses: "200": content: @@ -8285,6 +8287,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -8478,7 +8481,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -8847,6 +8849,7 @@ paths: of requests. Stored on the transaction uniquely within a namespace type: string type: object + required: true responses: "200": content: @@ -8923,6 +8926,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -9048,7 +9052,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the datatype was created @@ -9089,6 +9092,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -9138,6 +9142,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -9148,6 +9153,7 @@ paths: such as v1.0.1 type: string type: object + required: true responses: "200": content: @@ -9193,6 +9199,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -9248,6 +9255,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -9332,6 +9340,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -9453,7 +9462,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -9734,7 +9742,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time when the group was first used to send @@ -9755,7 +9762,6 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group - nullable: true properties: identity: description: The DID of the group member @@ -9832,7 +9838,6 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group - nullable: true properties: identity: description: The DID of the group member @@ -9984,7 +9989,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -10068,7 +10072,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -10143,6 +10146,7 @@ paths: description: The type of the identity type: string type: object + required: true responses: "200": content: @@ -10460,6 +10464,7 @@ paths: profile information of an identity type: object type: object + required: true responses: "200": content: @@ -10671,7 +10676,6 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties - nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -10789,7 +10793,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time this verifier was created on this node @@ -10998,7 +11001,6 @@ paths: application/json: schema: items: - nullable: true properties: batch: description: The UUID of the batch in which the message was @@ -11015,7 +11017,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -11230,7 +11231,6 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: blob: description: An optional in-line hash reference to a previously @@ -11290,6 +11290,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -11504,7 +11505,6 @@ paths: application/json: schema: items: - nullable: true properties: blob: description: An optional hash reference to a binary blob attachment @@ -11576,6 +11576,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -11686,7 +11687,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -11883,7 +11883,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -11907,6 +11906,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -11979,6 +11979,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -11999,7 +12000,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -12172,7 +12172,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -12362,7 +12361,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -12386,6 +12384,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -12498,6 +12497,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -12518,7 +12518,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -12698,7 +12697,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -12891,7 +12889,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -12915,6 +12912,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -13027,6 +13025,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -13053,7 +13052,6 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: blob: description: An optional in-line hash reference to a previously @@ -13113,6 +13111,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -13329,7 +13328,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the namespace was created @@ -13489,7 +13487,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID of the contract API @@ -13514,6 +13511,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -13616,6 +13614,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric @@ -13630,6 +13629,7 @@ paths: network type: string type: object + required: true responses: "200": content: @@ -13659,6 +13659,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -13730,6 +13731,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -13865,6 +13867,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -13966,6 +13969,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric @@ -13980,6 +13984,7 @@ paths: network type: string type: object + required: true responses: "200": content: @@ -14009,6 +14014,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -14080,6 +14086,7 @@ paths: type: string type: object location: + additionalProperties: true description: If this API is tied to an individual instance of a smart contract, this field can include a blockchain specific contract identifier. For example an Ethereum contract address, @@ -14165,7 +14172,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -14191,7 +14197,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -14199,6 +14204,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14222,7 +14228,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -14257,7 +14262,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -14265,6 +14269,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14301,7 +14306,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -14336,7 +14340,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -14344,6 +14347,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14362,7 +14366,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -14370,6 +14373,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14456,7 +14460,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -14468,7 +14471,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -14476,6 +14478,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14517,6 +14520,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -14538,7 +14542,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -14563,6 +14566,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -14700,7 +14704,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -14708,6 +14711,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14721,7 +14725,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -14729,6 +14732,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -14750,6 +14754,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -15040,7 +15045,6 @@ paths: application/json: schema: items: - nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -15075,7 +15079,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15083,6 +15086,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15103,7 +15107,6 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -15134,7 +15137,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note @@ -15143,6 +15145,7 @@ paths: blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -15173,6 +15176,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -15207,6 +15211,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -15308,7 +15313,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -15316,6 +15320,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15336,7 +15341,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -15363,7 +15367,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15372,6 +15375,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -15402,6 +15406,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -15427,6 +15432,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -15453,6 +15459,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -15492,7 +15499,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -15500,6 +15506,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15520,7 +15527,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -15549,7 +15555,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15558,6 +15563,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -15588,6 +15594,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -15622,6 +15629,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -15701,6 +15709,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -15714,7 +15723,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -15740,7 +15748,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15748,6 +15755,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15771,7 +15779,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -15806,7 +15813,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15814,6 +15820,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15850,7 +15857,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -15885,7 +15891,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15893,6 +15898,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15911,7 +15917,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15919,6 +15924,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -15963,7 +15969,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -15989,7 +15994,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -15997,6 +16001,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16020,7 +16025,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -16055,7 +16059,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -16063,6 +16066,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16099,7 +16103,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -16134,7 +16137,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -16142,6 +16144,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16160,7 +16163,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -16168,6 +16170,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16248,7 +16251,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -16260,7 +16262,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16268,6 +16269,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16309,6 +16311,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -16330,7 +16333,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -16355,6 +16357,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -16492,7 +16495,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16500,6 +16502,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16513,7 +16516,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -16521,6 +16523,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -16542,6 +16545,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -16673,7 +16677,6 @@ paths: application/json: schema: items: - nullable: true properties: author: description: The DID of identity of the submitter @@ -16708,6 +16711,7 @@ paths: description: The on-chain signing key used to sign the transaction type: string manifest: + additionalProperties: true description: The manifest of the batch nullable: true type: object @@ -16808,6 +16812,7 @@ paths: description: The on-chain signing key used to sign the transaction type: string manifest: + additionalProperties: true description: The manifest of the batch nullable: true type: object @@ -16871,6 +16876,7 @@ paths: requestBody: content: application/json: {} + required: true responses: "204": content: @@ -16984,7 +16990,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID assigned to the event by FireFly @@ -17210,7 +17215,6 @@ paths: application/json: schema: items: - nullable: true properties: count: description: Total count of entries in this time bucket within @@ -17231,7 +17235,6 @@ paths: items: description: Array of separate counts for individual types of record within the bucket - nullable: true properties: count: description: Count of entries of a given type within a @@ -17280,11 +17283,13 @@ paths: schema: properties: contract: + additionalProperties: true description: The smart contract to deploy. This should be pre-compiled if required by the blockchain connector nullable: true type: object definition: + additionalProperties: true description: The definition of the smart contract nullable: true type: object @@ -17312,6 +17317,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -17559,7 +17565,6 @@ paths: application/json: schema: items: - nullable: true properties: description: description: A description of the smart contract this FFI represents @@ -17568,7 +17573,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -17594,7 +17598,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -17603,6 +17606,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -17627,7 +17631,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -17662,7 +17665,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -17671,6 +17673,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -17708,7 +17711,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -17743,7 +17745,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -17752,6 +17753,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -17771,7 +17773,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -17780,6 +17781,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -17860,7 +17862,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -17872,7 +17873,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -17880,6 +17880,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -17895,7 +17896,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -17916,7 +17916,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -17924,6 +17923,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -17939,7 +17939,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -17960,7 +17959,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -17968,6 +17966,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -17981,7 +17980,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -17989,6 +17987,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18013,6 +18012,7 @@ paths: such as 'v1.0.1' is encouraged type: string type: object + required: true responses: "200": content: @@ -18026,7 +18026,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -18052,7 +18051,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18060,6 +18058,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18083,7 +18082,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -18118,7 +18116,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18126,6 +18123,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18162,7 +18160,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -18197,7 +18194,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18205,6 +18201,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18223,7 +18220,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18231,6 +18227,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18345,7 +18342,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -18371,7 +18367,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18379,6 +18374,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18402,7 +18398,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -18437,7 +18432,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18445,6 +18439,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18481,7 +18476,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -18516,7 +18510,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18524,6 +18517,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18542,7 +18536,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18550,6 +18543,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18637,7 +18631,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -18663,7 +18656,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18671,6 +18663,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18694,7 +18687,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -18729,7 +18721,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18737,6 +18728,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18773,7 +18765,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -18808,7 +18799,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18816,6 +18806,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18834,7 +18825,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18842,6 +18832,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18925,6 +18916,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -18938,7 +18930,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -18964,7 +18955,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -18972,6 +18962,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -18995,7 +18986,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -19030,7 +19020,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19038,6 +19027,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19074,7 +19064,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -19109,7 +19098,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19117,6 +19105,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19135,7 +19124,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19143,6 +19131,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19187,7 +19176,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -19213,7 +19201,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19221,6 +19208,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19244,7 +19232,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -19279,7 +19266,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19287,6 +19273,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19323,7 +19310,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -19358,7 +19344,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19366,6 +19351,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19384,7 +19370,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19392,6 +19377,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19460,6 +19446,7 @@ paths: utility type: string input: + additionalProperties: true description: A blockchain connector specific payload. For example in Ethereum this is a JSON structure containing an 'abi' array, and optionally a 'devdocs' array. @@ -19475,6 +19462,7 @@ paths: description: The version of the FFI to generate type: string type: object + required: true responses: "200": content: @@ -19488,7 +19476,6 @@ paths: description: An array of smart contract error definitions items: description: An array of smart contract error definitions - nullable: true properties: description: description: A description of the smart contract error @@ -19514,7 +19501,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19522,6 +19508,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19545,7 +19532,6 @@ paths: description: An array of smart contract event definitions items: description: An array of smart contract event definitions - nullable: true properties: description: description: A description of the smart contract event @@ -19580,7 +19566,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19588,6 +19573,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19624,7 +19610,6 @@ paths: description: An array of smart contract method definitions items: description: An array of smart contract method definitions - nullable: true properties: description: description: A description of the smart contract method @@ -19659,7 +19644,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19667,6 +19651,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19685,7 +19670,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -19693,6 +19677,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19766,7 +19751,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -19778,7 +19762,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -19786,6 +19769,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -19827,6 +19811,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -19848,7 +19833,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -19873,6 +19857,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -20010,7 +19995,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20018,6 +20002,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -20031,7 +20016,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20039,6 +20023,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -20060,6 +20045,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -20337,7 +20323,6 @@ paths: application/json: schema: items: - nullable: true properties: backendId: description: An ID assigned by the blockchain connector to this @@ -20372,7 +20357,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -20380,6 +20364,7 @@ paths: according to the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -20400,7 +20385,6 @@ paths: Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -20431,7 +20415,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note @@ -20440,6 +20423,7 @@ paths: blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -20470,6 +20454,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -20504,6 +20489,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -20592,7 +20578,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20600,6 +20585,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -20624,7 +20610,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -20651,7 +20636,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -20660,6 +20644,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -20695,6 +20680,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -20720,6 +20706,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -20746,6 +20733,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -20785,7 +20773,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -20793,6 +20780,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -20813,7 +20801,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -20842,7 +20829,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -20851,6 +20837,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -20881,6 +20868,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -20915,6 +20903,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -21058,7 +21047,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -21066,6 +21054,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -21086,7 +21075,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -21115,7 +21103,6 @@ paths: items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -21124,6 +21111,7 @@ paths: smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available @@ -21154,6 +21142,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -21188,6 +21177,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -21275,7 +21265,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -21283,6 +21272,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -21307,7 +21297,6 @@ paths: filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. - nullable: true properties: event: description: The definition of the event, either provided @@ -21334,7 +21323,6 @@ paths: description: An array of event parameter/argument definitions items: description: An array of event parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that @@ -21343,6 +21331,7 @@ paths: contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for @@ -21378,6 +21367,7 @@ paths: type: string type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -21403,6 +21393,7 @@ paths: type: string type: object location: + additionalProperties: true description: 'Deprecated: Please use ''location'' in the array of ''filters'' instead' nullable: true @@ -21429,6 +21420,7 @@ paths: to easily subscribe to all events they need type: string type: object + required: true responses: "200": content: @@ -21475,7 +21467,6 @@ paths: items: description: An in-line FFI errors definition for the method to invoke. Alternative to specifying FFI - nullable: true properties: description: description: A description of the smart contract error @@ -21487,7 +21478,6 @@ paths: description: An array of error parameter/argument definitions items: description: An array of error parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -21495,6 +21485,7 @@ paths: the order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -21536,6 +21527,7 @@ paths: the node type: string location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel nullable: true @@ -21557,7 +21549,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -21582,6 +21573,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -21719,7 +21711,6 @@ paths: description: An array of method parameter/argument definitions items: description: An array of method parameter/argument definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -21727,6 +21718,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -21740,7 +21732,6 @@ paths: description: An array of method return definitions items: description: An array of method return definitions - nullable: true properties: name: description: The name of the parameter. Note that parameters @@ -21748,6 +21739,7 @@ paths: order in the blockchain smart contract type: string schema: + additionalProperties: true description: FireFly uses an extended subset of JSON Schema to describe parameters, similar to OpenAPI/Swagger. Converters are available for native blockchain interface @@ -21769,6 +21761,7 @@ paths: the blockchain connector type: object type: object + required: true responses: "200": content: @@ -21905,7 +21898,6 @@ paths: application/json: schema: items: - nullable: true properties: blob: description: An optional hash reference to a binary blob attachment @@ -21977,6 +21969,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -22034,6 +22027,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -22061,6 +22055,7 @@ paths: description: Success type: string type: object + required: true responses: "201": content: @@ -22137,6 +22132,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -22282,6 +22278,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -22510,6 +22507,7 @@ paths: of requests. Stored on the transaction uniquely within a namespace type: string type: object + required: true responses: "200": content: @@ -22586,6 +22584,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -22786,7 +22785,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -23169,6 +23167,7 @@ paths: of requests. Stored on the transaction uniquely within a namespace type: string type: object + required: true responses: "200": content: @@ -23245,6 +23244,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -23384,7 +23384,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the datatype was created @@ -23425,6 +23424,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -23481,6 +23481,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -23491,6 +23492,7 @@ paths: such as v1.0.1 type: string type: object + required: true responses: "200": content: @@ -23536,6 +23538,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -23591,6 +23594,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -23682,6 +23686,7 @@ paths: - definition type: string value: + additionalProperties: true description: The definition of the datatype, in the syntax supported by the validator (such as a JSON Schema definition) nullable: true @@ -23810,7 +23815,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -24105,7 +24109,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time when the group was first used to send @@ -24126,7 +24129,6 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group - nullable: true properties: identity: description: The DID of the group member @@ -24210,7 +24212,6 @@ paths: description: The list of members in this privacy group items: description: The list of members in this privacy group - nullable: true properties: identity: description: The DID of the group member @@ -24369,7 +24370,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -24453,7 +24453,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -24535,6 +24534,7 @@ paths: description: The type of the identity type: string type: object + required: true responses: "200": content: @@ -24866,6 +24866,7 @@ paths: profile information of an identity type: object type: object + required: true responses: "200": content: @@ -25084,7 +25085,6 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties - nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -25209,7 +25209,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time this verifier was created on this node @@ -25425,7 +25424,6 @@ paths: application/json: schema: items: - nullable: true properties: batch: description: The UUID of the batch in which the message was @@ -25442,7 +25440,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -25664,7 +25661,6 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: blob: description: An optional in-line hash reference to a previously @@ -25724,6 +25720,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -25945,7 +25942,6 @@ paths: application/json: schema: items: - nullable: true properties: blob: description: An optional hash reference to a binary blob attachment @@ -26017,6 +26013,7 @@ paths: description: The data validator type type: string value: + additionalProperties: true description: The value for the data, stored in the FireFly core database. Can be any JSON type - object, array, string, number or boolean. Can be combined with a binary blob attachment @@ -26134,7 +26131,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -26345,7 +26341,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -26369,6 +26364,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -26481,6 +26477,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -26501,7 +26498,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -26681,7 +26677,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -26885,7 +26880,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -26909,6 +26903,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -27021,6 +27016,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -27041,7 +27037,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -27221,7 +27216,6 @@ paths: description: The list of data elements attached to the message items: description: The list of data elements attached to the message - nullable: true properties: hash: description: The hash of the referenced data @@ -27421,7 +27415,6 @@ paths: message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation of @@ -27445,6 +27438,7 @@ paths: description: The data validator type to use for in-line data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -27557,6 +27551,7 @@ paths: message is sent to other members of the network type: string type: object + required: true responses: "200": content: @@ -27583,7 +27578,6 @@ paths: the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: blob: description: An optional in-line hash reference to a previously @@ -27643,6 +27637,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -27863,6 +27858,7 @@ paths: - terminate type: string type: object + required: true responses: "202": content: @@ -27930,7 +27926,6 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties - nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -28091,7 +28086,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -28175,7 +28169,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -28318,7 +28311,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -28459,7 +28451,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -28684,6 +28675,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "200": content: @@ -28970,7 +28962,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -29113,6 +29104,7 @@ paths: description: The type of the identity type: string type: object + required: true responses: "200": content: @@ -29422,6 +29414,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "200": content: @@ -29817,7 +29810,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the operation was created @@ -30048,6 +30040,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "202": content: @@ -30326,6 +30319,7 @@ paths: format: int64 type: integer type: object + required: true responses: "200": content: @@ -30414,6 +30408,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -30424,7 +30419,6 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts - nullable: true properties: firstEvent: description: A blockchain specific string, such @@ -30454,6 +30448,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -30531,7 +30526,6 @@ paths: items: description: Array of verifiers (blockchain keys) owned by this identity - nullable: true properties: type: description: The type of the verifier @@ -30555,7 +30549,6 @@ paths: description: The blockchain plugins on this namespace items: description: The blockchain plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30569,7 +30562,6 @@ paths: description: The data exchange plugins on this namespace items: description: The data exchange plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30583,7 +30575,6 @@ paths: description: The database plugins on this namespace items: description: The database plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30597,7 +30588,6 @@ paths: description: The event plugins on this namespace items: description: The event plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30611,7 +30601,6 @@ paths: description: The identity plugins on this namespace items: description: The identity plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30625,7 +30614,6 @@ paths: description: The shared storage plugins on this namespace items: description: The shared storage plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30639,7 +30627,6 @@ paths: description: The token plugins on this namespace items: description: The token plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -30685,7 +30672,6 @@ paths: description: An array of currently active batch processors items: description: An array of currently active batch processors - nullable: true properties: dispatcher: description: The type of dispatcher for this processor @@ -30825,6 +30811,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -30839,7 +30826,6 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts - nullable: true properties: firstEvent: description: A blockchain specific string, such as a @@ -30868,6 +30854,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -31009,7 +30996,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: Creation time of the subscription @@ -31580,6 +31566,7 @@ paths: (WebSockets, Webhooks, JMS, NATS etc.) type: string type: object + required: true responses: "201": content: @@ -32149,6 +32136,7 @@ paths: (WebSockets, Webhooks, JMS, NATS etc.) type: string type: object + required: true responses: "200": content: @@ -32915,7 +32903,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -33072,7 +33059,6 @@ paths: application/json: schema: items: - nullable: true properties: key: description: The blockchain signing identity this balance applies @@ -33161,7 +33147,6 @@ paths: application/json: schema: items: - nullable: true properties: pool: description: The UUID the token pool this balance entry applies @@ -33310,7 +33295,6 @@ paths: application/json: schema: items: - nullable: true properties: active: description: Indicates if this approval is currently active @@ -33481,7 +33465,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -33506,6 +33489,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -33628,6 +33612,7 @@ paths: nullable: true type: string type: object + required: true responses: "200": content: @@ -33929,7 +33914,6 @@ paths: application/json: schema: items: - nullable: true properties: balance: description: The numeric balance. For non-fungible tokens will @@ -34052,7 +34036,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -34077,6 +34060,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -34205,6 +34189,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -34441,7 +34426,6 @@ paths: application/json: schema: items: - nullable: true properties: name: description: The name of the token connector, as configured @@ -34529,7 +34513,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -34554,6 +34537,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -34682,6 +34666,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -35037,7 +35022,6 @@ paths: application/json: schema: items: - nullable: true properties: active: description: Indicates whether the pool has been successfully @@ -35111,6 +35095,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -35260,6 +35245,7 @@ paths: - nonfungible type: string type: object + required: true responses: "200": content: @@ -35337,6 +35323,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -35461,6 +35448,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -35648,6 +35636,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -35740,6 +35729,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -35817,6 +35807,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -35941,6 +35932,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -36142,7 +36134,6 @@ paths: application/json: schema: items: - nullable: true properties: amount: description: The amount for the transfer. For non-fungible tokens @@ -36321,7 +36312,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -36346,6 +36336,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -36474,6 +36465,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -36902,7 +36894,6 @@ paths: application/json: schema: items: - nullable: true properties: blockchainIds: description: The blockchain transaction ID, in the format specific @@ -37133,7 +37124,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID assigned to the event by FireFly @@ -37239,7 +37229,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the operation was created @@ -37357,7 +37346,6 @@ paths: items: description: A set of records describing the activities within the transaction known by the local FireFly node - nullable: true properties: error: description: If an error occurred related to the detail @@ -37490,7 +37478,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time this verifier was created on this node @@ -37640,6 +37627,7 @@ paths: Fabric MSP identifier type: string type: object + required: true responses: "200": content: @@ -37687,6 +37675,7 @@ paths: - terminate type: string type: object + required: true responses: "202": content: @@ -37747,7 +37736,6 @@ paths: description: See https://www.w3.org/TR/did-core/#did-document-properties items: description: See https://www.w3.org/TR/did-core/#did-document-properties - nullable: true properties: blockchainAcountId: description: For blockchains like Ethereum that represent @@ -37901,7 +37889,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -37985,7 +37972,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -38121,7 +38107,6 @@ paths: description: The verifiers, such as blockchain signing keys, that have been bound to this identity and can be used to prove data orignates from that identity - nullable: true properties: type: description: The type of the verifier @@ -38255,7 +38240,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -38466,6 +38450,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "200": content: @@ -38745,7 +38730,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The creation time of the identity @@ -38881,6 +38865,7 @@ paths: description: The type of the identity type: string type: object + required: true responses: "200": content: @@ -39176,6 +39161,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "200": content: @@ -39557,7 +39543,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the operation was created @@ -39774,6 +39759,7 @@ paths: schema: additionalProperties: {} type: object + required: true responses: "202": content: @@ -40038,6 +40024,7 @@ paths: format: int64 type: integer type: object + required: true responses: "200": content: @@ -40119,6 +40106,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -40129,7 +40117,6 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts - nullable: true properties: firstEvent: description: A blockchain specific string, such @@ -40159,6 +40146,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -40236,7 +40224,6 @@ paths: items: description: Array of verifiers (blockchain keys) owned by this identity - nullable: true properties: type: description: The type of the verifier @@ -40260,7 +40247,6 @@ paths: description: The blockchain plugins on this namespace items: description: The blockchain plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40274,7 +40260,6 @@ paths: description: The data exchange plugins on this namespace items: description: The data exchange plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40288,7 +40273,6 @@ paths: description: The database plugins on this namespace items: description: The database plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40302,7 +40286,6 @@ paths: description: The event plugins on this namespace items: description: The event plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40316,7 +40299,6 @@ paths: description: The identity plugins on this namespace items: description: The identity plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40330,7 +40312,6 @@ paths: description: The shared storage plugins on this namespace items: description: The shared storage plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40344,7 +40325,6 @@ paths: description: The token plugins on this namespace items: description: The token plugins on this namespace - nullable: true properties: name: description: The name of the plugin @@ -40383,7 +40363,6 @@ paths: description: An array of currently active batch processors items: description: An array of currently active batch processors - nullable: true properties: dispatcher: description: The type of dispatcher for this processor @@ -40516,6 +40495,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -40530,7 +40510,6 @@ paths: description: Previously-terminated FireFly smart contracts items: description: Previously-terminated FireFly smart contracts - nullable: true properties: firstEvent: description: A blockchain specific string, such as a @@ -40559,6 +40538,7 @@ paths: type: integer type: object location: + additionalProperties: true description: A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel @@ -40693,7 +40673,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: Creation time of the subscription @@ -41257,6 +41236,7 @@ paths: (WebSockets, Webhooks, JMS, NATS etc.) type: string type: object + required: true responses: "201": content: @@ -41819,6 +41799,7 @@ paths: (WebSockets, Webhooks, JMS, NATS etc.) type: string type: object + required: true responses: "200": content: @@ -42564,7 +42545,6 @@ paths: application/json: schema: items: - nullable: true properties: correlator: description: For message events, this is the 'header.cid' field @@ -42714,7 +42694,6 @@ paths: application/json: schema: items: - nullable: true properties: key: description: The blockchain signing identity this balance applies @@ -42796,7 +42775,6 @@ paths: application/json: schema: items: - nullable: true properties: pool: description: The UUID the token pool this balance entry applies @@ -42938,7 +42916,6 @@ paths: application/json: schema: items: - nullable: true properties: active: description: Indicates if this approval is currently active @@ -43102,7 +43079,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -43127,6 +43103,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -43249,6 +43226,7 @@ paths: nullable: true type: string type: object + required: true responses: "200": content: @@ -43543,7 +43521,6 @@ paths: application/json: schema: items: - nullable: true properties: balance: description: The numeric balance. For non-fungible tokens will @@ -43659,7 +43636,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -43684,6 +43660,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -43808,6 +43785,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -44037,7 +44015,6 @@ paths: application/json: schema: items: - nullable: true properties: name: description: The name of the token connector, as configured @@ -44114,7 +44091,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -44139,6 +44115,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -44267,6 +44244,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -44615,7 +44593,6 @@ paths: application/json: schema: items: - nullable: true properties: active: description: Indicates whether the pool has been successfully @@ -44689,6 +44666,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -44831,6 +44809,7 @@ paths: - nonfungible type: string type: object + required: true responses: "200": content: @@ -44908,6 +44887,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -45032,6 +45012,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -45205,6 +45186,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -45290,6 +45272,7 @@ paths: to the multiparty network, which may differ from the local name type: string type: object + required: true responses: "200": content: @@ -45367,6 +45350,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -45491,6 +45475,7 @@ paths: nullable: true type: string methods: + additionalProperties: true description: The method definitions resolved by the token connector to be used by each token operation nullable: true @@ -45685,7 +45670,6 @@ paths: application/json: schema: items: - nullable: true properties: amount: description: The amount for the transfer. For non-fungible tokens @@ -45857,7 +45841,6 @@ paths: in the message, that will be turned into data attachments. For output when fetchdata is used on API calls, includes the in-line data payloads of all data attachments - nullable: true properties: datatype: description: The optional datatype to use for validation @@ -45882,6 +45865,7 @@ paths: data type: string value: + additionalProperties: true description: The in-line value for the data. Can be any JSON type - object, array, string, number or boolean nullable: true @@ -46010,6 +45994,7 @@ paths: description: The URI of the token this transfer applies to type: string type: object + required: true responses: "200": content: @@ -46424,7 +46409,6 @@ paths: application/json: schema: items: - nullable: true properties: blockchainIds: description: The blockchain transaction ID, in the format specific @@ -46641,7 +46625,6 @@ paths: application/json: schema: items: - nullable: true properties: id: description: The UUID assigned to the event by FireFly @@ -46740,7 +46723,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time the operation was created @@ -46851,7 +46833,6 @@ paths: items: description: A set of records describing the activities within the transaction known by the local FireFly node - nullable: true properties: error: description: If an error occurred related to the detail @@ -46977,7 +46958,6 @@ paths: application/json: schema: items: - nullable: true properties: created: description: The time this verifier was created on this node @@ -47113,6 +47093,7 @@ paths: Fabric MSP identifier type: string type: object + required: true responses: "200": content: @@ -47159,7 +47140,6 @@ paths: description: List of currently active websocket client connections items: description: List of currently active websocket client connections - nullable: true properties: id: description: The unique ID assigned to this client connection @@ -47174,7 +47154,6 @@ paths: items: description: List of subscriptions currently started by this client - nullable: true properties: ephemeral: description: Indicates whether the subscription is From 78d54295d16bf3cff0bbdcd39870d76242689004 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Thu, 15 May 2025 22:58:58 -0400 Subject: [PATCH 59/67] fix: bump more package versions in the base docker image Signed-off-by: Simon Gellis --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f6205ea18e..b40018aaee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,8 +74,8 @@ FROM $BASE_TAG ARG UI_TAG ARG UI_RELEASE RUN apk add --update --no-cache \ - sqlite=3.48.0-r1 \ - postgresql16-client=16.8-r0 \ + sqlite=3.48.0-r2 \ + postgresql16-client=16.9-r0 \ curl=8.12.1-r1 \ jq=1.7.1-r0 WORKDIR /firefly From 85f7faf9125c339c3c4b4e21f2cb08b3393f8ca4 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 19 May 2025 12:17:13 -0400 Subject: [PATCH 60/67] Update to the newest firefly-cardano image Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/custom_contracts/cardano.md | 2 +- manifest.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc-site/docs/tutorials/custom_contracts/cardano.md b/doc-site/docs/tutorials/custom_contracts/cardano.md index 2f13e96ae7..22f4d8a8cc 100644 --- a/doc-site/docs/tutorials/custom_contracts/cardano.md +++ b/doc-site/docs/tutorials/custom_contracts/cardano.md @@ -121,7 +121,7 @@ edition = "2021" [dependencies] # The version of firefly-balius should match the version of firefly-cardano which you are using. -firefly-balius = { git = "https://github.com/hyperledger/firefly-cardano", rev = "0.4.1" } +firefly-balius = { git = "https://github.com/hyperledger/firefly-cardano", rev = "0.4.2" } pallas-addresses = "0.32" serde = { version = "1", features = ["derive"] } diff --git a/manifest.json b/manifest.json index 2e981b9536..f2b16b24a9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { "cardanoconnect": { "image": "ghcr.io/hyperledger/firefly-cardanoconnect", - "tag": "v0.4.1", - "sha": "78b1008bd62892f6eda197b5047d94e61621d0f06b299422ff8ed9b34ee5ce50" + "tag": "v0.4.2", + "sha": "4f877755dd9130653cfee3f6ddc950e4908e45080627c9f106a12c52cd6ca8c1" }, "cardanosigner": { "image": "ghcr.io/hyperledger/firefly-cardanosigner", - "tag": "v0.4.1", - "sha": "d0b76613ccc70ff63e68b137766eb009d589489631cee6aabf2b45e33a1ca5d3" + "tag": "v0.4.2", + "sha": "9a859ce0020851e7a5474085fbfb34b0a027feeeae38455613bbfdfb33a75ddc" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", From 2e452a0ddc52d03ecd7471889ede0462d7138579 Mon Sep 17 00:00:00 2001 From: pullmerge Date: Wed, 21 May 2025 15:24:24 +0800 Subject: [PATCH 61/67] refactor: use slices.Contains to simplify code Signed-off-by: pullmerge --- internal/reference/reference.go | 23 ++++++----------------- internal/spievents/websockets.go | 25 ++++--------------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/internal/reference/reference.go b/internal/reference/reference.go index 1befee9cd3..8ef397e61f 100644 --- a/internal/reference/reference.go +++ b/internal/reference/reference.go @@ -24,6 +24,7 @@ import ( "os" "path/filepath" "reflect" + "slices" "strings" "github.com/hyperledger/firefly-common/pkg/fftypes" @@ -892,17 +893,11 @@ func writeStructFields(ctx context.Context, t reflect.Type, rootPageNames, simpl fieldInRootPages := false fieldInSimpleTypes := false - for _, rootPageName := range rootPageNames { - if strings.ToLower(fieldType.Name()) == rootPageName { - fieldInRootPages = true - break - } + if slices.Contains(rootPageNames, strings.ToLower(fieldType.Name())) { + fieldInRootPages = true } - for _, simpleTypeName := range simpleTypeNames { - if strings.ToLower(fieldType.Name()) == simpleTypeName { - fieldInSimpleTypes = true - break - } + if slices.Contains(simpleTypeNames, strings.ToLower(fieldType.Name())) { + fieldInSimpleTypes = true } link := "" @@ -920,13 +915,7 @@ func writeStructFields(ctx context.Context, t reflect.Type, rootPageNames, simpl fireflyType = fmt.Sprintf("[%s](%s)", fireflyType, link) // Generate the table for the sub type - tableAlreadyGenerated := false - for _, tableName := range generatedTableNames { - if strings.ToLower(fieldType.Name()) == tableName { - tableAlreadyGenerated = true - break - } - } + tableAlreadyGenerated := slices.Contains(generatedTableNames, strings.ToLower(fieldType.Name())) if isStruct && !tableAlreadyGenerated && !fieldInRootPages && !fieldInSimpleTypes { subFieldBuff.WriteString(fmt.Sprintf("## %s\n\n", fieldType.Name())) subFieldMarkdown, newTableNames, _ := generateObjectReferenceMarkdown(ctx, false, nil, fieldType, rootPageNames, simpleTypeNames, generatedTableNames, outputPath) diff --git a/internal/spievents/websockets.go b/internal/spievents/websockets.go index c78b5630c4..ac6fd272c2 100644 --- a/internal/spievents/websockets.go +++ b/internal/spievents/websockets.go @@ -20,6 +20,7 @@ import ( "context" "encoding/json" "io" + "slices" "sync" "time" @@ -66,36 +67,18 @@ func newWebSocket(ae *adminEventManager, wsConn *websocket.Conn) *webSocket { } func (wc *webSocket) eventMatches(changeEvent *core.ChangeEvent) bool { - collectionMatches := false - for _, c := range wc.collections { - if c == changeEvent.Collection { - collectionMatches = true - break - } - } + collectionMatches := slices.Contains(wc.collections, changeEvent.Collection) if !collectionMatches { return false } if len(wc.filter.Namespaces) > 0 { - namespaceMatches := false - for _, ns := range wc.filter.Namespaces { - if ns == changeEvent.Namespace { - namespaceMatches = true - break - } - } + namespaceMatches := slices.Contains(wc.filter.Namespaces, changeEvent.Namespace) if !namespaceMatches { return false } } if len(wc.filter.Types) > 0 { - typeMatches := false - for _, t := range wc.filter.Types { - if t == changeEvent.Type { - typeMatches = true - break - } - } + typeMatches := slices.Contains(wc.filter.Types, changeEvent.Type) if !typeMatches { return false } From b0eebe664f0bfffb6b620b5199c030c1be007651 Mon Sep 17 00:00:00 2001 From: alexey semenyuk Date: Sun, 1 Jun 2025 18:45:41 +0500 Subject: [PATCH 62/67] Add Cardano connector to README.md Signed-off-by: alexey semenyuk --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2b58d5a697..de4d8f5d8e 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Other repositories you might be interested in containing those microservice comp - Private/permissioned: Hyperledger Besu / Quorum - Hyperledger Fabric connector - - Tezos connector - +- Cardano connector - - Corda connector starter: - CorDapp specific customization is required @@ -249,10 +250,10 @@ Plugins: Each plugin comprises a Go shim, plus a remote agent microservice runti │ │ interface │ * Standardized operations, and custom on-chain coupling │ └─────┬─────────┘ │ │ - │ ├─────────────────────┬───────────────────┬-───────────────────┐ - │ ┌─────┴─────────┐ ┌───────┴───────┐ ┌───────┴────────┐ ┌───────┴────────┐ - │ │ ethereum │ │ fabric │ │ corda/cordapps │ │ tezos │ - │ └─────┬─────────┘ └───────────────┘ └────────────────┘ └────────────────┘ + │ ├─────────────────────┬───────────────────┬-───────────────────┬-───────────────────┐ + │ ┌─────┴─────────┐ ┌───────┴───────┐ ┌───────┴────────┐ ┌───────┴────────┐ ┌───────┴────────┐ + │ │ ethereum │ │ fabric │ │ corda/cordapps │ │ tezos │ │ cardano │ + │ └─────┬─────────┘ └───────────────┘ └────────────────┘ └────────────────┘ └────────────────┘ │ [REST/WebSockets] │ ┌─────┴────────────────────┐ ┌────────────────────────┐ ┌─ │ │ transaction manager [Tm] ├───┤ Connector API [ffcapi] ├───┤ Simple framework for building blockchain connectors From 8fc8dbaf2f64ac90a34b911b500468ecafb6d317 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 2 Jul 2025 16:08:58 -0400 Subject: [PATCH 63/67] docs: mention Blockfrost RYO in docs Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/chains/cardano.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc-site/docs/tutorials/chains/cardano.md b/doc-site/docs/tutorials/chains/cardano.md index 1e2ccb5fa3..0431a5d229 100644 --- a/doc-site/docs/tutorials/chains/cardano.md +++ b/doc-site/docs/tutorials/chains/cardano.md @@ -46,6 +46,20 @@ ff init cardano dev \ --blockfrost-key previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` +### Option 3: Use Blockfrost RYO + +You can run a Blockfrost API provider for free on your own infrastructure. This is called Blockfrost Run-Your-Own or Blockfrost RYO. See [the service's GitHub page](https://github.com/blockfrost/blockfrost-backend-ryo) for more information on this. + +The example below uses firefly-cli to + - Create a new Cardano-based stack named `dev` + - Connect to a Blockfrost RYO instance running at http://localhost:3000 + +```sh +ff init cardano dev \ + --network preview \ + --blockfrost-base-url http://localhost:3000 +``` + ## Start the stack Now you should be able to start your stack by running: From 4bac503b3e2f1f43621577dc28e572fa6d9fa100 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Wed, 2 Jul 2025 16:59:21 -0400 Subject: [PATCH 64/67] docs: link to custom contract page from chain page Signed-off-by: Simon Gellis --- doc-site/docs/tutorials/chains/cardano.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc-site/docs/tutorials/chains/cardano.md b/doc-site/docs/tutorials/chains/cardano.md index 0431a5d229..e16b02706b 100644 --- a/doc-site/docs/tutorials/chains/cardano.md +++ b/doc-site/docs/tutorials/chains/cardano.md @@ -98,3 +98,7 @@ The response will look like ``` If you're developing against a testnet such as preview, you can receive funds from the [testnet faucet](https://docs.cardano.org/cardano-testnets/tools/faucet). Pass the `address` from that response to the faucet. + +## Next steps: Develop a contract + +Now that you have a stack running, you're ready to start developing contracts for it. See the [Cardano custom contract guide](../custom_contracts/cardano.md) for more information. \ No newline at end of file From ab147be45be8f1e9ffa37af4d8d37f43da33a393 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Thu, 3 Jul 2025 15:41:52 +0100 Subject: [PATCH 65/67] Update FireFly Common for release - Pick up OpenAPI fixes Signed-off-by: Enrique Lacal --- doc-site/docs/reference/config.md | 12 + doc-site/docs/swagger/swagger.yaml | 1277 +++++++++++------- go.mod | 2 + go.sum | 2 - internal/apiserver/route_put_contract_api.go | 2 +- 5 files changed, 792 insertions(+), 503 deletions(-) diff --git a/doc-site/docs/reference/config.md b/doc-site/docs/reference/config.md index e38fc9fb71..be00252d34 100644 --- a/doc-site/docs/reference/config.md +++ b/doc-site/docs/reference/config.md @@ -675,6 +675,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -704,6 +705,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` @@ -831,6 +833,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -860,6 +863,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` @@ -982,6 +986,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -1011,6 +1016,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` @@ -1136,6 +1142,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -1165,6 +1172,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` @@ -1276,6 +1284,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -1305,6 +1314,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` @@ -1510,6 +1520,7 @@ title: Configuration Reference |count|The maximum number of times to retry|`int`|`5` |enabled|Enables retries|`boolean`|`false` |errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`` +|factor|The retry backoff factor|`float32`|`2` |initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms` |maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` @@ -1539,6 +1550,7 @@ title: Configuration Reference |Key|Description|Type|Default Value| |---|-----------|----|-------------| +|backgroundConnect|When true the connection is established in the background with infinite reconnect (makes initialConnectAttempts redundant when set)|`boolean`|`false` |connectionTimeout|The amount of time to wait while establishing a connection (or auto-reconnection)|[`time.Duration`](https://pkg.go.dev/time#Duration)|`45s` |heartbeatInterval|The amount of time to wait between heartbeat signals on the WebSocket connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s` |initialConnectAttempts|The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing|`int`|`5` diff --git a/doc-site/docs/swagger/swagger.yaml b/doc-site/docs/swagger/swagger.yaml index 0dfda6c637..d4e4e5ee79 100644 --- a/doc-site/docs/swagger/swagger.yaml +++ b/doc-site/docs/swagger/swagger.yaml @@ -488,218 +488,6 @@ paths: description: "" tags: - Default Namespace - put: - description: The ID of the contract API - operationId: putContractAPI - parameters: - - description: The name of the contract API - in: path - name: id - required: true - schema: - example: id - type: string - - description: When true the HTTP request blocks until the message is confirmed - in: query - name: confirm - schema: - example: "true" - type: string - - description: Server-side request timeout (milliseconds, or set a custom suffix - like 10s) - in: header - name: Request-Timeout - schema: - default: 2m0s - type: string - requestBody: - content: - application/json: - schema: - properties: - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of a - smart contract, this field can include a blockchain specific contract - identifier. For example an Ethereum contract address, or a Fabric - chaincode name and channel - nullable: true - type: object - name: - description: The name that is used in the URL to access the API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - type: object - required: true - responses: - "200": - content: - application/json: - schema: - properties: - id: - description: The UUID of the contract API - format: uuid - nullable: true - type: string - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of - a smart contract, this field can include a blockchain specific - contract identifier. For example an Ethereum contract address, - or a Fabric chaincode name and channel - nullable: true - type: object - message: - description: The UUID of the broadcast message that was used to - publish this API to the network - format: uuid - nullable: true - type: string - name: - description: The name that is used in the URL to access the API - type: string - namespace: - description: The namespace of the contract API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - published: - description: Indicates if the API is published to other members - of the multiparty network - type: boolean - urls: - description: The URLs to use to access the API - properties: - api: - description: The URL to use to invoke the API - type: string - openapi: - description: The URL to download the OpenAPI v3 (Swagger) - description for the API generated in JSON or YAML format - type: string - ui: - description: The URL to use in a web browser to access the - SwaggerUI explorer/exerciser for the API - type: string - type: object - type: object - description: Success - "202": - content: - application/json: - schema: - properties: - id: - description: The UUID of the contract API - format: uuid - nullable: true - type: string - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of - a smart contract, this field can include a blockchain specific - contract identifier. For example an Ethereum contract address, - or a Fabric chaincode name and channel - nullable: true - type: object - message: - description: The UUID of the broadcast message that was used to - publish this API to the network - format: uuid - nullable: true - type: string - name: - description: The name that is used in the URL to access the API - type: string - namespace: - description: The namespace of the contract API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - published: - description: Indicates if the API is published to other members - of the multiparty network - type: boolean - urls: - description: The URLs to use to access the API - properties: - api: - description: The URL to use to invoke the API - type: string - openapi: - description: The URL to download the OpenAPI v3 (Swagger) - description for the API generated in JSON or YAML format - type: string - ui: - description: The URL to use in a web browser to access the - SwaggerUI explorer/exerciser for the API - type: string - type: object - type: object - description: Success - default: - description: "" - tags: - - Default Namespace /apis/{apiName}/interface: get: description: Gets a contract interface for a contract API @@ -2605,6 +2393,219 @@ paths: description: "" tags: - Default Namespace + /apis/{id}: + put: + description: The ID of the contract API + operationId: putContractAPI + parameters: + - description: The ID of the contract API + in: path + name: id + required: true + schema: + example: id + type: string + - description: When true the HTTP request blocks until the message is confirmed + in: query + name: confirm + schema: + example: "true" + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + requestBody: + content: + application/json: + schema: + properties: + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of a + smart contract, this field can include a blockchain specific contract + identifier. For example an Ethereum contract address, or a Fabric + chaincode name and channel + nullable: true + type: object + name: + description: The name that is used in the URL to access the API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + type: object + required: true + responses: + "200": + content: + application/json: + schema: + properties: + id: + description: The UUID of the contract API + format: uuid + nullable: true + type: string + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of + a smart contract, this field can include a blockchain specific + contract identifier. For example an Ethereum contract address, + or a Fabric chaincode name and channel + nullable: true + type: object + message: + description: The UUID of the broadcast message that was used to + publish this API to the network + format: uuid + nullable: true + type: string + name: + description: The name that is used in the URL to access the API + type: string + namespace: + description: The namespace of the contract API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + published: + description: Indicates if the API is published to other members + of the multiparty network + type: boolean + urls: + description: The URLs to use to access the API + properties: + api: + description: The URL to use to invoke the API + type: string + openapi: + description: The URL to download the OpenAPI v3 (Swagger) + description for the API generated in JSON or YAML format + type: string + ui: + description: The URL to use in a web browser to access the + SwaggerUI explorer/exerciser for the API + type: string + type: object + type: object + description: Success + "202": + content: + application/json: + schema: + properties: + id: + description: The UUID of the contract API + format: uuid + nullable: true + type: string + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of + a smart contract, this field can include a blockchain specific + contract identifier. For example an Ethereum contract address, + or a Fabric chaincode name and channel + nullable: true + type: object + message: + description: The UUID of the broadcast message that was used to + publish this API to the network + format: uuid + nullable: true + type: string + name: + description: The name that is used in the URL to access the API + type: string + namespace: + description: The namespace of the contract API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + published: + description: Indicates if the API is published to other members + of the multiparty network + type: boolean + urls: + description: The URLs to use to access the API + properties: + api: + description: The URL to use to invoke the API + type: string + openapi: + description: The URL to download the OpenAPI v3 (Swagger) + description for the API generated in JSON or YAML format + type: string + ui: + description: The URL to use in a web browser to access the + SwaggerUI explorer/exerciser for the API + type: string + type: object + type: object + description: Success + default: + description: "" + tags: + - Default Namespace /batches: get: description: Gets a list of message batches @@ -10230,7 +10231,117 @@ paths: type: string type: object description: Success - "202": + "202": + content: + application/json: + schema: + properties: + created: + description: The creation time of the identity + format: date-time + nullable: true + type: string + description: + description: A description of the identity. Part of the updatable + profile information of an identity + type: string + did: + description: The DID of the identity. Unique across namespaces + within a FireFly network + type: string + id: + description: The UUID of the identity + format: uuid + nullable: true + type: string + messages: + description: References to the broadcast messages that established + this identity and proved ownership of the associated verifiers + (keys) + properties: + claim: + description: The UUID of claim message + format: uuid + nullable: true + type: string + update: + description: The UUID of the most recently applied update + message. Unset if no updates have been confirmed + format: uuid + nullable: true + type: string + verification: + description: The UUID of claim message. Unset for root organization + identities + format: uuid + nullable: true + type: string + type: object + name: + description: The name of the identity. The name must be unique + within the type and namespace + type: string + namespace: + description: The namespace of the identity. Organization and node + identities are always defined in the ff_system namespace + type: string + parent: + description: The UUID of the parent identity. Unset for root organization + identities + format: uuid + nullable: true + type: string + profile: + additionalProperties: + description: A set of metadata for the identity. Part of the + updatable profile information of an identity + description: A set of metadata for the identity. Part of the updatable + profile information of an identity + type: object + type: + description: The type of the identity + enum: + - org + - node + - custom + type: string + updated: + description: The last update time of the identity profile + format: date-time + nullable: true + type: string + type: object + description: Success + default: + description: "" + tags: + - Default Namespace + /identities/{did}: + get: + description: Gets an identity by its DID + operationId: getIdentityByDID + parameters: + - description: The identity DID + in: path + name: did + required: true + schema: + type: string + - description: When set, the API will return the verifier for this identity + in: query + name: fetchverifiers + schema: + example: "true" + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + responses: + "200": content: application/json: schema: @@ -10309,13 +10420,37 @@ paths: format: date-time nullable: true type: string + verifiers: + description: The verifiers, such as blockchain signing keys, that + have been bound to this identity and can be used to prove data + orignates from that identity + items: + description: The verifiers, such as blockchain signing keys, + that have been bound to this identity and can be used to prove + data orignates from that identity + properties: + type: + description: The type of the verifier + enum: + - cardano_address + - ethereum_address + - tezos_address + - fabric_msp_id + - dx_peer_id + type: string + value: + description: The verifier string, such as an Ethereum address, + or Fabric MSP identifier + type: string + type: object + type: array type: object description: Success default: description: "" tags: - Default Namespace - /identities/{did}: + /identities/{iid}: get: description: Gets an identity by its ID operationId: getIdentityByID @@ -13705,290 +13840,7 @@ paths: type: object type: object description: Success - "202": - content: - application/json: - schema: - properties: - id: - description: The UUID of the contract API - format: uuid - nullable: true - type: string - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of - a smart contract, this field can include a blockchain specific - contract identifier. For example an Ethereum contract address, - or a Fabric chaincode name and channel - nullable: true - type: object - message: - description: The UUID of the broadcast message that was used to - publish this API to the network - format: uuid - nullable: true - type: string - name: - description: The name that is used in the URL to access the API - type: string - namespace: - description: The namespace of the contract API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - published: - description: Indicates if the API is published to other members - of the multiparty network - type: boolean - urls: - description: The URLs to use to access the API - properties: - api: - description: The URL to use to invoke the API - type: string - openapi: - description: The URL to download the OpenAPI v3 (Swagger) - description for the API generated in JSON or YAML format - type: string - ui: - description: The URL to use in a web browser to access the - SwaggerUI explorer/exerciser for the API - type: string - type: object - type: object - description: Success - default: - description: "" - tags: - - Non-Default Namespace - /namespaces/{ns}/apis/{apiName}: - delete: - description: Delete a contract API - operationId: deleteContractAPINamespace - parameters: - - description: The name of the contract API - in: path - name: apiName - required: true - schema: - type: string - - description: The namespace which scopes this request - in: path - name: ns - required: true - schema: - example: default - type: string - - description: Server-side request timeout (milliseconds, or set a custom suffix - like 10s) - in: header - name: Request-Timeout - schema: - default: 2m0s - type: string - responses: - "204": - content: - application/json: {} - description: Success - default: - description: "" - tags: - - Non-Default Namespace - get: - description: Gets information about a contract API, including the URLs for the - OpenAPI Spec and Swagger UI for the API - operationId: getContractAPIByNameNamespace - parameters: - - description: The name of the contract API - in: path - name: apiName - required: true - schema: - type: string - - description: The namespace which scopes this request - in: path - name: ns - required: true - schema: - example: default - type: string - - description: Server-side request timeout (milliseconds, or set a custom suffix - like 10s) - in: header - name: Request-Timeout - schema: - default: 2m0s - type: string - responses: - "200": - content: - application/json: - schema: - properties: - id: - description: The UUID of the contract API - format: uuid - nullable: true - type: string - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of - a smart contract, this field can include a blockchain specific - contract identifier. For example an Ethereum contract address, - or a Fabric chaincode name and channel - nullable: true - type: object - message: - description: The UUID of the broadcast message that was used to - publish this API to the network - format: uuid - nullable: true - type: string - name: - description: The name that is used in the URL to access the API - type: string - namespace: - description: The namespace of the contract API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - published: - description: Indicates if the API is published to other members - of the multiparty network - type: boolean - urls: - description: The URLs to use to access the API - properties: - api: - description: The URL to use to invoke the API - type: string - openapi: - description: The URL to download the OpenAPI v3 (Swagger) - description for the API generated in JSON or YAML format - type: string - ui: - description: The URL to use in a web browser to access the - SwaggerUI explorer/exerciser for the API - type: string - type: object - type: object - description: Success - default: - description: "" - tags: - - Non-Default Namespace - put: - description: The ID of the contract API - operationId: putContractAPINamespace - parameters: - - description: The name of the contract API - in: path - name: id - required: true - schema: - example: id - type: string - - description: The namespace which scopes this request - in: path - name: ns - required: true - schema: - example: default - type: string - - description: When true the HTTP request blocks until the message is confirmed - in: query - name: confirm - schema: - example: "true" - type: string - - description: Server-side request timeout (milliseconds, or set a custom suffix - like 10s) - in: header - name: Request-Timeout - schema: - default: 2m0s - type: string - requestBody: - content: - application/json: - schema: - properties: - interface: - description: Reference to the FireFly Interface definition associated - with the contract API - nullable: true - properties: - id: - description: The UUID of the FireFly interface - format: uuid - nullable: true - type: string - name: - description: The name of the FireFly interface - type: string - version: - description: The version of the FireFly interface - type: string - type: object - location: - additionalProperties: true - description: If this API is tied to an individual instance of a - smart contract, this field can include a blockchain specific contract - identifier. For example an Ethereum contract address, or a Fabric - chaincode name and channel - nullable: true - type: object - name: - description: The name that is used in the URL to access the API - type: string - networkName: - description: The published name of the API within the multiparty - network - type: string - type: object - required: true - responses: - "200": + "202": content: application/json: schema: @@ -14060,7 +13912,71 @@ paths: type: object type: object description: Success - "202": + default: + description: "" + tags: + - Non-Default Namespace + /namespaces/{ns}/apis/{apiName}: + delete: + description: Delete a contract API + operationId: deleteContractAPINamespace + parameters: + - description: The name of the contract API + in: path + name: apiName + required: true + schema: + type: string + - description: The namespace which scopes this request + in: path + name: ns + required: true + schema: + example: default + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + responses: + "204": + content: + application/json: {} + description: Success + default: + description: "" + tags: + - Non-Default Namespace + get: + description: Gets information about a contract API, including the URLs for the + OpenAPI Spec and Swagger UI for the API + operationId: getContractAPIByNameNamespace + parameters: + - description: The name of the contract API + in: path + name: apiName + required: true + schema: + type: string + - description: The namespace which scopes this request + in: path + name: ns + required: true + schema: + example: default + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + responses: + "200": content: application/json: schema: @@ -16553,7 +16469,227 @@ paths: content: application/json: schema: - additionalProperties: {} + additionalProperties: {} + type: object + description: Success + default: + description: "" + tags: + - Non-Default Namespace + /namespaces/{ns}/apis/{id}: + put: + description: The ID of the contract API + operationId: putContractAPINamespace + parameters: + - description: The ID of the contract API + in: path + name: id + required: true + schema: + example: id + type: string + - description: The namespace which scopes this request + in: path + name: ns + required: true + schema: + example: default + type: string + - description: When true the HTTP request blocks until the message is confirmed + in: query + name: confirm + schema: + example: "true" + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + requestBody: + content: + application/json: + schema: + properties: + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of a + smart contract, this field can include a blockchain specific contract + identifier. For example an Ethereum contract address, or a Fabric + chaincode name and channel + nullable: true + type: object + name: + description: The name that is used in the URL to access the API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + type: object + required: true + responses: + "200": + content: + application/json: + schema: + properties: + id: + description: The UUID of the contract API + format: uuid + nullable: true + type: string + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of + a smart contract, this field can include a blockchain specific + contract identifier. For example an Ethereum contract address, + or a Fabric chaincode name and channel + nullable: true + type: object + message: + description: The UUID of the broadcast message that was used to + publish this API to the network + format: uuid + nullable: true + type: string + name: + description: The name that is used in the URL to access the API + type: string + namespace: + description: The namespace of the contract API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + published: + description: Indicates if the API is published to other members + of the multiparty network + type: boolean + urls: + description: The URLs to use to access the API + properties: + api: + description: The URL to use to invoke the API + type: string + openapi: + description: The URL to download the OpenAPI v3 (Swagger) + description for the API generated in JSON or YAML format + type: string + ui: + description: The URL to use in a web browser to access the + SwaggerUI explorer/exerciser for the API + type: string + type: object + type: object + description: Success + "202": + content: + application/json: + schema: + properties: + id: + description: The UUID of the contract API + format: uuid + nullable: true + type: string + interface: + description: Reference to the FireFly Interface definition associated + with the contract API + nullable: true + properties: + id: + description: The UUID of the FireFly interface + format: uuid + nullable: true + type: string + name: + description: The name of the FireFly interface + type: string + version: + description: The version of the FireFly interface + type: string + type: object + location: + additionalProperties: true + description: If this API is tied to an individual instance of + a smart contract, this field can include a blockchain specific + contract identifier. For example an Ethereum contract address, + or a Fabric chaincode name and channel + nullable: true + type: object + message: + description: The UUID of the broadcast message that was used to + publish this API to the network + format: uuid + nullable: true + type: string + name: + description: The name that is used in the URL to access the API + type: string + namespace: + description: The namespace of the contract API + type: string + networkName: + description: The published name of the API within the multiparty + network + type: string + published: + description: Indicates if the API is published to other members + of the multiparty network + type: boolean + urls: + description: The URLs to use to access the API + properties: + api: + description: The URL to use to invoke the API + type: string + openapi: + description: The URL to download the OpenAPI v3 (Swagger) + description for the API generated in JSON or YAML format + type: string + ui: + description: The URL to use in a web browser to access the + SwaggerUI explorer/exerciser for the API + type: string + type: object type: object description: Success default: @@ -24706,6 +24842,147 @@ paths: tags: - Non-Default Namespace /namespaces/{ns}/identities/{did}: + get: + description: Gets an identity by its DID + operationId: getIdentityByDIDNamespace + parameters: + - description: The identity DID + in: path + name: did + required: true + schema: + type: string + - description: The namespace which scopes this request + in: path + name: ns + required: true + schema: + example: default + type: string + - description: When set, the API will return the verifier for this identity + in: query + name: fetchverifiers + schema: + example: "true" + type: string + - description: Server-side request timeout (milliseconds, or set a custom suffix + like 10s) + in: header + name: Request-Timeout + schema: + default: 2m0s + type: string + responses: + "200": + content: + application/json: + schema: + properties: + created: + description: The creation time of the identity + format: date-time + nullable: true + type: string + description: + description: A description of the identity. Part of the updatable + profile information of an identity + type: string + did: + description: The DID of the identity. Unique across namespaces + within a FireFly network + type: string + id: + description: The UUID of the identity + format: uuid + nullable: true + type: string + messages: + description: References to the broadcast messages that established + this identity and proved ownership of the associated verifiers + (keys) + properties: + claim: + description: The UUID of claim message + format: uuid + nullable: true + type: string + update: + description: The UUID of the most recently applied update + message. Unset if no updates have been confirmed + format: uuid + nullable: true + type: string + verification: + description: The UUID of claim message. Unset for root organization + identities + format: uuid + nullable: true + type: string + type: object + name: + description: The name of the identity. The name must be unique + within the type and namespace + type: string + namespace: + description: The namespace of the identity. Organization and node + identities are always defined in the ff_system namespace + type: string + parent: + description: The UUID of the parent identity. Unset for root organization + identities + format: uuid + nullable: true + type: string + profile: + additionalProperties: + description: A set of metadata for the identity. Part of the + updatable profile information of an identity + description: A set of metadata for the identity. Part of the updatable + profile information of an identity + type: object + type: + description: The type of the identity + enum: + - org + - node + - custom + type: string + updated: + description: The last update time of the identity profile + format: date-time + nullable: true + type: string + verifiers: + description: The verifiers, such as blockchain signing keys, that + have been bound to this identity and can be used to prove data + orignates from that identity + items: + description: The verifiers, such as blockchain signing keys, + that have been bound to this identity and can be used to prove + data orignates from that identity + properties: + type: + description: The type of the verifier + enum: + - cardano_address + - ethereum_address + - tezos_address + - fabric_msp_id + - dx_peer_id + type: string + value: + description: The verifier string, such as an Ethereum address, + or Fabric MSP identifier + type: string + type: object + type: array + type: object + description: Success + default: + description: "" + tags: + - Non-Default Namespace + /namespaces/{ns}/identities/{iid}: get: description: Gets an identity by its ID operationId: getIdentityByIDNamespace diff --git a/go.mod b/go.mod index 5545d86b71..5bf4f122da 100644 --- a/go.mod +++ b/go.mod @@ -97,3 +97,5 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/hyperledger/firefly-common v1.5.4 => ../firefly-common diff --git a/go.sum b/go.sum index 744decdf6d..f44441670a 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,6 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hyperledger/firefly-common v1.5.4 h1:UFnN+4tzGIqHnAPh1Q9zw9sKrxwlgG7R1QFP2AIxg8g= -github.com/hyperledger/firefly-common v1.5.4/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= diff --git a/internal/apiserver/route_put_contract_api.go b/internal/apiserver/route_put_contract_api.go index 818c5e0fe3..7cbd0b5f72 100644 --- a/internal/apiserver/route_put_contract_api.go +++ b/internal/apiserver/route_put_contract_api.go @@ -32,7 +32,7 @@ var putContractAPI = &ffapi.Route{ Path: "apis/{id}", Method: http.MethodPut, PathParams: []*ffapi.PathParam{ - {Name: "id", Example: "id", Description: coremsgs.APIParamsContractAPIName}, + {Name: "id", Example: "id", Description: coremsgs.APIParamsContractAPIID}, }, QueryParams: []*ffapi.QueryParam{ {Name: "confirm", Description: coremsgs.APIConfirmMsgQueryParam, IsBool: true, Example: "true"}, From 4aa405d5623080348e6aa65010d1aabd2e444d28 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Thu, 3 Jul 2025 16:30:09 +0100 Subject: [PATCH 66/67] Upgrade to FireFly Common v1.5.6 Signed-off-by: Enrique Lacal --- go.mod | 4 +--- go.sum | 2 ++ go.work.sum | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5bf4f122da..85f206c4fd 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang-migrate/migrate/v4 v4.17.0 github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.1 - github.com/hyperledger/firefly-common v1.5.4 + github.com/hyperledger/firefly-common v1.5.6 github.com/hyperledger/firefly-signer v1.1.21 github.com/jarcoal/httpmock v1.2.0 github.com/lib/pq v1.10.9 @@ -97,5 +97,3 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/hyperledger/firefly-common v1.5.4 => ../firefly-common diff --git a/go.sum b/go.sum index f44441670a..ed564671d9 100644 --- a/go.sum +++ b/go.sum @@ -77,6 +77,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hyperledger/firefly-common v1.5.6 h1:z1QsMSkyQ6t6deNhMI68OZV3QidutOE3zU3buqC5M5o= +github.com/hyperledger/firefly-common v1.5.6/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-signer v1.1.21 h1:r7cTOw6e/6AtiXLf84wZy6Z7zppzlc191HokW2hv4N4= github.com/hyperledger/firefly-signer v1.1.21/go.mod h1:axrlSQeKrd124UdHF5L3MkTjb5DeTcbJxJNCZ3JmcWM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= diff --git a/go.work.sum b/go.work.sum index dcaf859dba..dad68a1e10 100644 --- a/go.work.sum +++ b/go.work.sum @@ -361,6 +361,8 @@ github.com/hyperledger/firefly-common v1.5.3 h1:ujiDT4eI/QxP1E0ahlJALDn0EsI8wk2M github.com/hyperledger/firefly-common v1.5.3/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/hyperledger/firefly-common v1.5.4 h1:UFnN+4tzGIqHnAPh1Q9zw9sKrxwlgG7R1QFP2AIxg8g= github.com/hyperledger/firefly-common v1.5.4/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= +github.com/hyperledger/firefly-common v1.5.6 h1:z1QsMSkyQ6t6deNhMI68OZV3QidutOE3zU3buqC5M5o= +github.com/hyperledger/firefly-common v1.5.6/go.mod h1:1Xawm5PUhxT7k+CL/Kr3i1LE3cTTzoQwZMLimvlW8rs= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= From d8be85843c6c9f39ea6713a493fd1a17adbb15fc Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Mon, 7 Jul 2025 17:38:50 +0100 Subject: [PATCH 67/67] Update manifest for v1.4.0-rc.1 Signed-off-by: Enrique Lacal --- manifest.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/manifest.json b/manifest.json index f2b16b24a9..d4dc2c8f14 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { "cardanoconnect": { "image": "ghcr.io/hyperledger/firefly-cardanoconnect", - "tag": "v0.4.2", - "sha": "4f877755dd9130653cfee3f6ddc950e4908e45080627c9f106a12c52cd6ca8c1" + "tag": "0.5.0", + "sha": "f80b3a43960fc9d7a6f7c9af42bf2390fb6d5751fbcc49f43197e8d4d2f2a601" }, "cardanosigner": { "image": "ghcr.io/hyperledger/firefly-cardanosigner", - "tag": "v0.4.2", - "sha": "9a859ce0020851e7a5474085fbfb34b0a027feeeae38455613bbfdfb33a75ddc" + "tag": "0.5.0", + "sha": "5af17007c13cb5325f0ae5295ff37d29f7fcd811b3d12d15d5e67cfae0d9a336" }, "ethconnect": { "image": "ghcr.io/hyperledger/firefly-ethconnect", @@ -16,38 +16,38 @@ }, "evmconnect": { "image": "ghcr.io/hyperledger/firefly-evmconnect", - "tag": "v1.3.20", - "sha": "514ee0e0d3f6054e1f2c46a474c968f18725af5edd4dc6dac85dc104004c1272" + "tag": "v1.4.0", + "sha": "5af81620813b087d4e4fd2efbede7f27383c783d93d9c0cb142de700db0f7177" }, "fabconnect": { "image": "ghcr.io/hyperledger/firefly-fabconnect", - "tag": "v0.9.22", - "sha": "1984166545d476b9f8ea8eb04120fed406beb936cb95c97a728bbf4585860523" + "tag": "v0.9.23", + "sha": "a52dd8c60802562a3752015480af590b7f350fc165297c62a077394d7c49557c" }, "tezosconnect": { "image": "ghcr.io/hyperledger/firefly-tezosconnect", - "tag": "v0.2.8", - "sha": "895c0a22b64fbe42ecaf3e017b40b71c8911c4c7032728c778723cbef987b5de" + "tag": "v0.2.9", + "sha": "cc77e88032ae4afc33c419b58f5b042bc18ad1a193ee9d364455b9cbabd85cd9" }, "dataexchange-https": { "image": "ghcr.io/hyperledger/firefly-dataexchange-https", - "tag": "v1.3.1", - "sha": "5688fd57c52588f55230800e2a13743626da6ce4b40eb7ce3dd4578494418479" + "tag": "v1.3.2", + "sha": "6b6a8df8845cd19d06ea2af0f58028bcd9d480a42bdc9cfe374e01346d89791a" }, "tokens-erc1155": { "image": "ghcr.io/hyperledger/firefly-tokens-erc1155", - "tag": "v1.3.4", - "sha": "700d1d0d461b55641ea21e4028456e904a6f652798335ad0e067d7e6ab1438f1" + "tag": "v1.3.6", + "sha": "7a5c31cbfa29f17182dd09e360638e5df1123b485151d8a5fccd50e7a4179e87" }, "tokens-erc20-erc721": { "image": "ghcr.io/hyperledger/firefly-tokens-erc20-erc721", - "tag": "v1.3.4", - "sha": "d93b55daf9a4404a3d26996cb2dffcc3660b3ef3cbe3b0be5bab03a8f745d952" + "tag": "v1.3.6", + "sha": "29daced3498a24191aa354fd204860492a4089335fb99cfb258bba685446ea1f" }, "signer": { "image": "ghcr.io/hyperledger/firefly-signer", - "tag": "v1.1.20", - "sha": "270f3749f8fa4326de08890d667651a80ff3dfe86c05ad5387671ad0d5b17fe9" + "tag": "v1.1.22", + "sha": "00e7aaac049f3e3f80644cea3394e4efa4180a195fa2f71d2e2ca57f8e6f2ec9" }, "build": { "firefly-builder": { @@ -65,10 +65,10 @@ } }, "ui": { - "tag": "v1.3.1", - "release": "v1.3.1" + "tag": "v1.3.2", + "release": "v1.3.2" }, "cli": { - "tag": "v1.3.3" + "tag": "v1.4.0-rc.1" } }