├── .ruby-version ├── doc-site ├── docs │ ├── versions.json │ ├── reference │ │ └── types │ │ │ ├── _includes │ │ │ ├── wserror_description.md │ │ │ ├── uuid_description.md │ │ │ ├── ffi_description.md │ │ │ ├── jsonobject_description.md │ │ │ ├── jsonany_description.md │ │ │ ├── operationwithdetail_description.md │ │ │ ├── namespace_description.md │ │ │ ├── fftime_description.md │ │ │ ├── nextpin_description.md │ │ │ ├── wsstart_description.md │ │ │ └── datatype_description.md │ │ │ ├── simpletypes.md │ │ │ └── wserror.md │ ├── stylesheets │ │ └── extra.css │ ├── assets │ │ ├── favicon.ico │ │ ├── project-icon.png │ │ └── project-logo.png │ ├── images │ │ ├── actions.png │ │ ├── ff_start.gif │ │ ├── ping_pong.jpg │ │ ├── releases.png │ │ ├── settings.png │ │ ├── add_network.png │ │ ├── firefly_cli.png │ │ ├── send_tokens.png │ │ ├── create_release.png │ │ ├── docker_memory.png │ │ ├── draft_release.png │ │ ├── firefly_core.png │ │ ├── firefly_node.png │ │ ├── gateway_mode.png │ │ ├── import_tokens.png │ │ ├── launch_config.png │ │ ├── multi_protocol.png │ │ ├── account_address.png │ │ ├── contract_address.png │ │ ├── firefly_explorer.png │ │ ├── intro_to_firefly.png │ │ ├── multiparty_mode.png │ │ ├── network_details.png │ │ ├── new_message_view.png │ │ ├── tokens_received.png │ │ ├── define_a_datatype.png │ │ ├── firefly_event_bus.jpg │ │ ├── firefly_event_model.jpg │ │ ├── metamask │ │ │ ├── settings.png │ │ │ ├── add_network.png │ │ │ ├── send_tokens.png │ │ │ ├── account_address.png │ │ │ ├── import_tokens.png │ │ │ ├── network_details.png │ │ │ ├── tokens_received.png │ │ │ ├── contract_address.png │ │ │ ├── nft_token_balance.png │ │ │ └── nft_contract_address.png │ │ ├── multiparty_system1.png │ │ ├── nft_token_balance.png │ │ ├── problem_statement.png │ │ ├── websocket_example.png │ │ ├── blockchain-sub-status.png │ │ ├── firefly_message_types.png │ │ ├── nft_contract_address.png │ │ ├── asset_transfer_swagger.png │ │ ├── firefly_intro_overview.png │ │ ├── gateway_multiparty_mode.png │ │ ├── getting-started-overview.png │ │ ├── simple_storage_swagger.png │ │ ├── understanding_firefly1.png │ │ ├── firefly_data_privacy_model.jpg │ │ ├── hyperledger_firefly_social.png │ │ ├── internal_event_sequencing.jpg │ │ ├── message_broadcast_initial.png │ │ ├── message_private_broadcast.png │ │ ├── sandbox │ │ │ ├── sandbox_broadcast.png │ │ │ ├── sandbox_token_pool.png │ │ │ ├── sandbox_api_swagger.png │ │ │ ├── sandbox_contracts_api.png │ │ │ ├── sandbox_broadcast_result.png │ │ │ └── sandbox_token_transfer_result.png │ │ ├── firefly-getting-started-steps.png │ │ ├── firefly_architecture_overview.jpg │ │ ├── firefly_data_transport_layers.png │ │ ├── firefly_orchestration_engine.png │ │ ├── firefly_plugin_architecture.jpg │ │ ├── firefly_transaction_manager.jpg │ │ ├── idempotency_keys_architecture.jpg │ │ ├── event_driven_programming_model.jpg │ │ ├── firefly_functionality_overview.png │ │ ├── message_broadcast_sample_result.png │ │ ├── operations_by_transaction_type.jpg │ │ ├── firefly_event_subscription_model.jpg │ │ ├── firefly_transactions_explorer_view.png │ │ ├── multiparty_business_process_flow.jpg │ │ ├── firefly_first_successful_transaction.png │ │ ├── firefly_functionality_overview_apps.png │ │ ├── firefly_functionality_overview_flows.png │ │ ├── firefly_functionality_overview_tools.png │ │ ├── firefly_blockchain_connector_framework.png │ │ ├── firefly_connector_toolkit_event_streams.jpg │ │ ├── firefly_functionality_overview_security.png │ │ ├── firefly_functionality_overview_connectivity.png │ │ ├── firefly_functionality_overview_digital_assets.png │ │ ├── hyperledger-firefly-namespaces-example-with-org.png │ │ └── firefly_functionality_overview_orchestration_engine.png │ ├── tutorials │ │ ├── chains │ │ │ └── images │ │ │ │ ├── bsc_scan.png │ │ │ │ ├── moonscan.png │ │ │ │ ├── near_scan.png │ │ │ │ ├── bsc_faucet.png │ │ │ │ ├── near_account.png │ │ │ │ ├── near_faucet.png │ │ │ │ ├── tezos_faucet.png │ │ │ │ ├── xdc_explorer.png │ │ │ │ ├── xdc_faucet.png │ │ │ │ ├── arbitrum_scan.png │ │ │ │ ├── optimism_scan.png │ │ │ │ ├── polygon_faucet.png │ │ │ │ ├── tezos_explorer.png │ │ │ │ ├── zksync_faucet.png │ │ │ │ ├── arbitrum_faucet.png │ │ │ │ ├── avalanche_faucet.png │ │ │ │ ├── moonbase_faucet.png │ │ │ │ ├── near_account_name.png │ │ │ │ ├── near_fund_account.png │ │ │ │ ├── optimism_faucet.png │ │ │ │ ├── polygonscan_matic.png │ │ │ │ ├── zksync_explorer.png │ │ │ │ ├── near_account_lookup.png │ │ │ │ ├── near_wallet_send_funds.png │ │ │ │ ├── avalanche_snowtrace_scan.png │ │ │ │ └── near_navigate_to_wallet.png │ │ └── custom_contracts │ │ │ └── images │ │ │ ├── simple_storage_swagger.png │ │ │ ├── tezos_contract_deployment.png │ │ │ ├── tezos_contract_deployment2.png │ │ │ └── tezos_contract_deployment3.png │ ├── troubleshooting │ │ └── index.md │ └── overview │ │ └── key_components │ │ └── index.md ├── .gitignore ├── requirements.txt ├── .github │ └── ISSUE_TEMPLATE │ │ └── config.yml └── overrides │ └── main.html ├── test ├── e2e │ └── .gitignore ├── _includes │ ├── thing1_description.md │ └── badjson_description.md └── data │ ├── contracts │ ├── reverter │ │ └── reverter.sol │ └── assetcreator │ │ └── assetCreator.go │ └── config │ └── firefly.core.yaml ├── .gitattributes ├── db └── migrations │ ├── postgres │ ├── 000109_fix_tokentransfer_index.down.sql │ ├── 000064_allow_null_data.down.sql │ ├── 000097_alter_tokentransfer_allow_null_signer.down.sql │ ├── 000049_create_ffi_table.down.sql │ ├── 000100_allow_null_listener_location.down.sql │ ├── 000012_create_pins_table.down.sql │ ├── 000013_create_orgs_table.down.sql │ ├── 000014_create_nodes_table.down.sql │ ├── 000022_create_blobs_table.down.sql │ ├── 000059_create_pins_batch_index.down.sql │ ├── 000001_create_messages_table.down.sql │ ├── 000002_create_data_table.down.sql │ ├── 000004_create_batches_table.down.sql │ ├── 000007_create_offsets_table.down.sql │ ├── 000011_create_events_table.down.sql │ ├── 000015_create_config_table.down.sql │ ├── 000016_create_groups_table.down.sql │ ├── 000017_create_members_table.down.sql │ ├── 000018_create_nonces_table.down.sql │ ├── 000019_create_nextpins_table.down.sql │ ├── 000032_create_tokenaccount_table.down.sql │ ├── 000048_remove_token_uri_index.up.sql │ ├── 000050_create_ffi_methods_table.down.sql │ ├── 000051_create_ffi_events_table.down.sql │ ├── 000061_add_event_tx.down.sql │ ├── 000061_add_event_tx.up.sql │ ├── 000103_create_ffi_errors_table.down.sql │ ├── 000006_create_datatypes_table.down.sql │ ├── 000008_create_operations_table.down.sql │ ├── 000009_create_namespaces_table.down.sql │ ├── 000025_create_tokenpool_table.down.sql │ ├── 000046_add_batch_node.down.sql │ ├── 000046_add_batch_node.up.sql │ ├── 000052_create_contractapis_table.down.sql │ ├── 000058_remove_tokenpool_key.up.sql │ ├── 000108_create_contractapis_id_index.down.sql │ ├── 000005_create_transactions_table.down.sql │ ├── 000010_create_subscriptions_table.down.sql │ ├── 000031_create_tokentransfer_table.down.sql │ ├── 000037_add_message_topic_tag_index.down.sql │ ├── 000041_drop_operations_member.up.sql │ ├── 000044_add_tokenpool_state.down.sql │ ├── 000059_create_pins_batch_index.up.sql │ ├── 000062_create_tokenapproval_table.down.sql │ ├── 000072_add_tokenpool_info.down.sql │ ├── 000072_add_tokenpool_info.up.sql │ ├── 000094_allow_local_definitions.down.sql │ ├── 000003_create_message_data_join_table.down.sql │ ├── 000029_add_tokenpool_created.down.sql │ ├── 000036_add_tokenpool_standard.down.sql │ ├── 000069_add_operation_retry.down.sql │ ├── 000069_add_operation_retry.up.sql │ ├── 000077_add_transactions_id_index.down.sql │ ├── 000085_add_tokenpool_decimals.down.sql │ ├── 000086_alter_contractapis.down.sql │ ├── 000035_add_tokenaccount_updated.down.sql │ ├── 000054_create_blockchainevents_table.down.sql │ ├── 000064_allow_null_data.up.sql │ ├── 000075_add_pins_batch_hash.down.sql │ ├── 000098_alter_data_public_ref.down.sql │ ├── 000034_rename_tokenaccount_key.up.sql │ ├── 000036_add_tokenpool_standard.up.sql │ ├── 000041_drop_operations_member.down.sql │ ├── 000045_add_tokentransfer_messageid.down.sql │ ├── 000053_create_contractsubscriptions_table.down.sql │ ├── 000071_rename_batch_payload_column.down.sql │ ├── 000073_add_contractlisteners_options.down.sql │ ├── 000073_add_contractlisteners_options.up.sql │ ├── 000076_add_tokentransfer_message_index.down.sql │ ├── 000082_add_blockchainevent_protocolid_index.down.sql │ ├── 000114_add_message_reject_reason.down.sql │ ├── 000034_rename_tokenaccount_key.down.sql │ ├── 000042_rename_tokenaccount_to_tokenbalance.up.sql │ ├── 000071_rename_batch_payload_column.up.sql │ ├── 000075_add_pins_batch_hash.up.sql │ ├── 000085_add_tokenpool_decimals.up.sql │ ├── 000086_alter_contractapis.up.sql │ ├── 000107_add_blob_path.down.sql │ ├── 000116_tx_type_not_null.down.sql │ ├── 000042_rename_tokenaccount_to_tokenbalance.down.sql │ ├── 000090_add_namespace_fireflycontracts.down.sql │ ├── 000090_add_namespace_fireflycontracts.up.sql │ ├── 000114_add_message_reject_reason.up.sql │ ├── 000057_add_tokentransfer_blockchainevent.down.sql │ ├── 000057_add_tokentransfer_blockchainevent.up.sql │ ├── 000066_rename_contractsubscriptions_table.down.sql │ ├── 000066_rename_contractsubscriptions_table.up.sql │ ├── 000037_add_message_topic_tag_index.up.sql │ ├── 000067_rename_blockchain_event.down.sql │ ├── 000067_rename_blockchain_event.up.sql │ ├── 000093_add_ffi_details.down.sql │ ├── 000100_allow_null_listener_location.up.sql │ ├── 000029_add_tokenpool_created.up.sql │ ├── 000048_remove_token_uri_index.down.sql │ ├── 000060_remove_operation_backendid.up.sql │ ├── 000065_pin_signer_event_correlator.down.sql │ ├── 000076_add_tokentransfer_message_index.up.sql │ ├── 000083_rename_contractlistener_protocolid.down.sql │ ├── 000083_rename_contractlistener_protocolid.up.sql │ ├── 000093_add_ffi_details.up.sql │ ├── 000097_alter_tokentransfer_allow_null_signer.up.sql │ ├── 000058_remove_tokenpool_key.down.sql │ ├── 000098_alter_data_public_ref.up.sql │ ├── 000027_add_operations_input.down.sql │ ├── 000027_add_operations_input.up.sql │ ├── 000038_add_token_namespace_fields.down.sql │ ├── 000080_add_contractlistener_signature.down.sql │ ├── 000117_update_contractlisteners_add_filters_column.down.sql │ ├── 000021_create_data_blob.down.sql │ ├── 000087_fix_tokenapproval_index.up.sql │ ├── 000112_add_ffi_networkname.down.sql │ ├── 000084_add_blockchainevent_txblockchainid.down.sql │ ├── 000087_fix_tokenapproval_index.down.sql │ ├── 000030_create_key_fields.down.sql │ ├── 000060_remove_operation_backendid.down.sql │ ├── 000065_pin_signer_event_correlator.up.sql │ ├── 000092_add_pin_namespace.down.sql │ ├── 000116_tx_type_not_null.up.sql │ ├── 000074_add_event_and_listener_topic.down.sql │ ├── 000039_drop_messages_pending.up.sql │ ├── 000044_add_tokenpool_state.up.sql │ ├── 000080_add_contractlistener_signature.up.sql │ ├── 000104_add_tokenpool_interface.down.sql │ ├── 000106_add_message_transactions.down.sql │ ├── 000113_add_contract_api_networkname.down.sql │ ├── 000035_add_tokenaccount_updated.up.sql │ ├── 000102_alter_tokenapproval_add_message.down.sql │ ├── 000039_drop_messages_pending.down.sql │ ├── 000084_add_blockchainevent_txblockchainid.up.sql │ ├── 000079_add_messages_data_newindexes.down.sql │ ├── 000104_add_tokenpool_interface.up.sql │ ├── 000079_add_messages_data_newindexes.up.sql │ ├── 000107_add_blob_path.up.sql │ ├── 000108_create_contractapis_id_index.up.sql │ ├── 000115_rename_tokenpool_state.up.sql │ ├── 000110_add_tokenpool_networkname.down.sql │ ├── 000115_rename_tokenpool_state.down.sql │ ├── 000021_create_data_blob.up.sql │ ├── 000068_rename_blockchainevents_subscription_column.down.sql │ ├── 000091_add_namespace_to_identity_indexes.down.sql │ ├── 000117_update_contractlisteners_add_filters_column.up.sql │ ├── 000102_alter_tokenapproval_add_message.up.sql │ ├── 000099_fix_blockchainevent_protocolid_index.down.sql │ ├── 000101_add_idempotency_keys.down.sql │ ├── 000105_add_namespace_and_data_id_to_blobs.down.sql │ ├── 000068_rename_blockchainevents_subscription_column.up.sql │ ├── 000091_add_namespace_to_identity_indexes.up.sql │ ├── 000033_add_token_connector_fields.down.sql │ ├── 000020_create_messages_pending.down.sql │ ├── 000045_add_tokentransfer_messageid.up.sql │ ├── 000055_add_blobs_size_and_name.down.sql │ ├── 000028_add_tokenpool_fields.down.sql │ ├── 000082_add_blockchainevent_protocolid_index.up.sql │ ├── 000092_add_pin_namespace.up.sql │ ├── 000047_add_token_uri_fields.down.sql │ ├── 000088_fix_token_protocolid_indexes.down.sql │ ├── 000078_add_nonce_author.up.sql │ ├── 000109_fix_tokentransfer_index.up.sql │ ├── 000106_add_message_transactions.up.sql │ ├── 000070_add_subscriptions_filters.down.sql │ ├── 000077_add_transactions_id_index.up.sql │ ├── 000003_create_message_data_join_table.up.sql │ ├── 000015_create_config_table.up.sql │ ├── 000111_adjust_token_indexes.up.sql │ ├── 000022_create_blobs_table.up.sql │ ├── 000078_add_nonce_author.down.sql │ ├── 000101_add_idempotency_keys.up.sql │ ├── 000112_add_ffi_networkname.up.sql │ ├── 000017_create_members_table.up.sql │ ├── 000019_create_nextpins_table.up.sql │ ├── 000028_add_tokenpool_fields.up.sql │ ├── 000040_add_messages_state.down.sql │ ├── 000047_add_token_uri_fields.up.sql │ ├── 000016_create_groups_table.up.sql │ ├── 000111_adjust_token_indexes.down.sql │ ├── 000018_create_nonces_table.up.sql │ ├── 000113_add_contract_api_networkname.up.sql │ ├── 000011_create_events_table.up.sql │ ├── 000074_add_event_and_listener_topic.up.sql │ ├── 000052_create_contractapis_table.up.sql │ ├── 000007_create_offsets_table.up.sql │ ├── 000081_rename_tokens_protocolid.down.sql │ ├── 000032_create_tokenaccount_table.up.sql │ ├── 000009_create_namespaces_table.up.sql │ ├── 000040_add_messages_state.up.sql │ ├── 000030_create_key_fields.up.sql │ ├── 000070_add_subscriptions_filters.up.sql │ ├── 000023_alter_subscriptions_offsets.up.sql │ ├── 000012_create_pins_table.up.sql │ ├── 000049_create_ffi_table.up.sql │ ├── 000110_add_tokenpool_networkname.up.sql │ ├── 000099_fix_blockchainevent_protocolid_index.up.sql │ ├── 000089_fix_tokenapproval_poolid_type.up.sql │ ├── 000095_change_namespace_fields.down.sql │ ├── 000038_add_token_namespace_fields.up.sql │ ├── 000051_create_ffi_events_table.up.sql │ ├── 000089_fix_tokenapproval_poolid_type.down.sql │ ├── 000103_create_ffi_errors_table.up.sql │ ├── 000023_alter_subscriptions_offsets.down.sql │ ├── 000056_refactor_transactions_columns.up.sql │ ├── 000020_create_messages_pending.up.sql │ ├── 000050_create_ffi_methods_table.up.sql │ ├── 000088_fix_token_protocolid_indexes.up.sql │ ├── 000013_create_orgs_table.up.sql │ ├── 000014_create_nodes_table.up.sql │ ├── 000055_add_blobs_size_and_name.up.sql │ ├── 000056_refactor_transactions_columns.down.sql │ └── 000006_create_datatypes_table.up.sql │ └── sqlite │ ├── 000049_create_ffi_table.down.sql │ ├── 000109_fix_tokentransfer_index.down.sql │ ├── 000002_create_data_table.down.sql │ ├── 000032_create_tokenaccount_table.down.sql │ ├── 000059_create_pins_batch_index.down.sql │ ├── 000001_create_messages_table.down.sql │ ├── 000012_create_pins_table.down.sql │ ├── 000013_create_orgs_table.down.sql │ ├── 000014_create_nodes_table.down.sql │ ├── 000022_create_blobs_table.down.sql │ ├── 000048_remove_token_uri_index.up.sql │ ├── 000061_add_event_tx.down.sql │ ├── 000061_add_event_tx.up.sql │ ├── 000064_allow_null_data.down.sql │ ├── 000004_create_batches_table.down.sql │ ├── 000007_create_offsets_table.down.sql │ ├── 000011_create_events_table.down.sql │ ├── 000015_create_config_table.down.sql │ ├── 000016_create_groups_table.down.sql │ ├── 000017_create_members_table.down.sql │ ├── 000018_create_nonces_table.down.sql │ ├── 000019_create_nextpins_table.down.sql │ ├── 000025_create_tokenpool_table.down.sql │ ├── 000046_add_batch_node.down.sql │ ├── 000046_add_batch_node.up.sql │ ├── 000050_create_ffi_methods_table.down.sql │ ├── 000051_create_ffi_events_table.down.sql │ ├── 000058_remove_tokenpool_key.up.sql │ ├── 000077_add_transactions_id_index.down.sql │ ├── 000103_create_ffi_errors_table.down.sql │ ├── 000108_create_contractapis_id_index.down.sql │ ├── 000006_create_datatypes_table.down.sql │ ├── 000008_create_operations_table.down.sql │ ├── 000009_create_namespaces_table.down.sql │ ├── 000031_create_tokentransfer_table.down.sql │ ├── 000037_add_message_topic_tag_index.down.sql │ ├── 000041_drop_operations_member.up.sql │ ├── 000044_add_tokenpool_state.down.sql │ ├── 000052_create_contractapis_table.down.sql │ ├── 000062_create_tokenapproval_table.down.sql │ ├── 000072_add_tokenpool_info.down.sql │ ├── 000072_add_tokenpool_info.up.sql │ ├── 000075_add_pins_batch_hash.down.sql │ ├── 000098_alter_data_public_ref.down.sql │ ├── 000100_allow_null_listener_location.down.sql │ ├── 000005_create_transactions_table.down.sql │ ├── 000010_create_subscriptions_table.down.sql │ ├── 000029_add_tokenpool_created.down.sql │ ├── 000036_add_tokenpool_standard.down.sql │ ├── 000059_create_pins_batch_index.up.sql │ ├── 000069_add_operation_retry.down.sql │ ├── 000069_add_operation_retry.up.sql │ ├── 000076_add_tokentransfer_message_index.down.sql │ ├── 000085_add_tokenpool_decimals.down.sql │ ├── 000003_create_message_data_join_table.down.sql │ ├── 000035_add_tokenaccount_updated.down.sql │ ├── 000054_create_blockchainevents_table.down.sql │ ├── 000075_add_pins_batch_hash.up.sql │ ├── 000097_alter_tokentransfer_allow_null_signer.down.sql │ ├── 000034_rename_tokenaccount_key.up.sql │ ├── 000036_add_tokenpool_standard.up.sql │ ├── 000041_drop_operations_member.down.sql │ ├── 000045_add_tokentransfer_messageid.down.sql │ ├── 000073_add_contractlisteners_options.down.sql │ ├── 000073_add_contractlisteners_options.up.sql │ ├── 000082_add_blockchainevent_protocolid_index.down.sql │ ├── 000094_allow_local_definitions.down.sql │ ├── 000114_add_message_reject_reason.down.sql │ ├── 000034_rename_tokenaccount_key.down.sql │ ├── 000042_rename_tokenaccount_to_tokenbalance.up.sql │ ├── 000053_create_contractsubscriptions_table.down.sql │ ├── 000071_rename_batch_payload_column.down.sql │ ├── 000071_rename_batch_payload_column.up.sql │ ├── 000085_add_tokenpool_decimals.up.sql │ ├── 000042_rename_tokenaccount_to_tokenbalance.down.sql │ ├── 000090_add_namespace_fireflycontracts.down.sql │ ├── 000090_add_namespace_fireflycontracts.up.sql │ ├── 000107_add_blob_path.down.sql │ ├── 000114_add_message_reject_reason.up.sql │ ├── 000057_add_tokentransfer_blockchainevent.down.sql │ ├── 000057_add_tokentransfer_blockchainevent.up.sql │ ├── 000066_rename_contractsubscriptions_table.down.sql │ ├── 000066_rename_contractsubscriptions_table.up.sql │ ├── 000117_update_contractlisteners_add_filters_column.down.sql │ ├── 000037_add_message_topic_tag_index.up.sql │ ├── 000076_add_tokentransfer_message_index.up.sql │ ├── 000086_alter_contractapis.down.sql │ ├── 000086_alter_contractapis.up.sql │ ├── 000098_alter_data_public_ref.up.sql │ ├── 000067_rename_blockchain_event.down.sql │ ├── 000067_rename_blockchain_event.up.sql │ ├── 000029_add_tokenpool_created.up.sql │ ├── 000048_remove_token_uri_index.down.sql │ ├── 000060_remove_operation_backendid.up.sql │ ├── 000065_pin_signer_event_correlator.down.sql │ ├── 000083_rename_contractlistener_protocolid.down.sql │ ├── 000083_rename_contractlistener_protocolid.up.sql │ ├── 000093_add_ffi_details.down.sql │ ├── 000058_remove_tokenpool_key.down.sql │ ├── 000093_add_ffi_details.up.sql │ ├── 000035_add_tokenaccount_updated.up.sql │ ├── 000044_add_tokenpool_state.up.sql │ ├── 000027_add_operations_input.down.sql │ ├── 000027_add_operations_input.up.sql │ ├── 000038_add_token_namespace_fields.down.sql │ ├── 000080_add_contractlistener_signature.down.sql │ ├── 000087_fix_tokenapproval_index.up.sql │ ├── 000112_add_ffi_networkname.down.sql │ ├── 000084_add_blockchainevent_txblockchainid.down.sql │ ├── 000087_fix_tokenapproval_index.down.sql │ ├── 000030_create_key_fields.down.sql │ ├── 000060_remove_operation_backendid.down.sql │ ├── 000065_pin_signer_event_correlator.up.sql │ ├── 000092_add_pin_namespace.down.sql │ ├── 000097_alter_tokentransfer_allow_null_signer.up.sql │ ├── 000107_add_blob_path.up.sql │ ├── 000074_add_event_and_listener_topic.down.sql │ ├── 000039_drop_messages_pending.up.sql │ ├── 000080_add_contractlistener_signature.up.sql │ ├── 000102_alter_tokenapproval_add_message.down.sql │ ├── 000104_add_tokenpool_interface.down.sql │ ├── 000106_add_message_transactions.down.sql │ ├── 000113_add_contract_api_networkname.down.sql │ ├── 000117_update_contractlisteners_add_filters_column.up.sql │ ├── 000079_add_messages_data_newindexes.down.sql │ ├── 000039_drop_messages_pending.down.sql │ ├── 000064_allow_null_data.up.sql │ ├── 000084_add_blockchainevent_txblockchainid.up.sql │ ├── 000079_add_messages_data_newindexes.up.sql │ ├── 000104_add_tokenpool_interface.up.sql │ ├── 000108_create_contractapis_id_index.up.sql │ ├── 000115_rename_tokenpool_state.up.sql │ ├── 000110_add_tokenpool_networkname.down.sql │ ├── 000092_add_pin_namespace.up.sql │ ├── 000102_alter_tokenapproval_add_message.up.sql │ ├── 000115_rename_tokenpool_state.down.sql │ ├── 000101_add_idempotency_keys.down.sql │ ├── 000091_add_namespace_to_identity_indexes.down.sql │ ├── 000040_add_messages_state.down.sql │ ├── 000105_add_namespace_and_data_id_to_blobs.down.sql │ ├── 000068_rename_blockchainevents_subscription_column.up.sql │ ├── 000099_fix_blockchainevent_protocolid_index.down.sql │ ├── 000045_add_tokentransfer_messageid.up.sql │ ├── 000068_rename_blockchainevents_subscription_column.down.sql │ ├── 000091_add_namespace_to_identity_indexes.up.sql │ ├── 000033_add_token_connector_fields.down.sql │ ├── 000055_add_blobs_size_and_name.down.sql │ ├── 000047_add_token_uri_fields.down.sql │ ├── 000100_allow_null_listener_location.up.sql │ ├── 000116_tx_type_not_null.down.sql │ ├── 000028_add_tokenpool_fields.down.sql │ ├── 000074_add_event_and_listener_topic.up.sql │ ├── 000078_add_nonce_author.up.sql │ ├── 000082_add_blockchainevent_protocolid_index.up.sql │ ├── 000088_fix_token_protocolid_indexes.down.sql │ ├── 000030_create_key_fields.up.sql │ ├── 000070_add_subscriptions_filters.down.sql │ ├── 000109_fix_tokentransfer_index.up.sql │ ├── 000106_add_message_transactions.up.sql │ ├── 000077_add_transactions_id_index.up.sql │ ├── 000078_add_nonce_author.down.sql │ ├── 000003_create_message_data_join_table.up.sql │ ├── 000111_adjust_token_indexes.up.sql │ ├── 000015_create_config_table.up.sql │ ├── 000028_add_tokenpool_fields.up.sql │ ├── 000101_add_idempotency_keys.up.sql │ ├── 000112_add_ffi_networkname.up.sql │ ├── 000047_add_token_uri_fields.up.sql │ ├── 000022_create_blobs_table.up.sql │ ├── 000116_tx_type_not_null.up.sql │ ├── 000019_create_nextpins_table.up.sql │ ├── 000017_create_members_table.up.sql │ ├── 000111_adjust_token_indexes.down.sql │ ├── 000016_create_groups_table.up.sql │ ├── 000040_add_messages_state.up.sql │ ├── 000113_add_contract_api_networkname.up.sql │ ├── 000018_create_nonces_table.up.sql │ ├── 000055_add_blobs_size_and_name.up.sql │ ├── 000081_rename_tokens_protocolid.down.sql │ ├── 000011_create_events_table.up.sql │ ├── 000032_create_tokenaccount_table.up.sql │ ├── 000007_create_offsets_table.up.sql │ ├── 000070_add_subscriptions_filters.up.sql │ ├── 000023_alter_subscriptions_offsets.up.sql │ ├── 000009_create_namespaces_table.up.sql │ ├── 000052_create_contractapis_table.up.sql │ ├── 000110_add_tokenpool_networkname.up.sql │ ├── 000099_fix_blockchainevent_protocolid_index.up.sql │ ├── 000012_create_pins_table.up.sql │ ├── 000049_create_ffi_table.up.sql │ ├── 000089_fix_tokenapproval_poolid_type.up.sql │ ├── 000038_add_token_namespace_fields.up.sql │ ├── 000095_change_namespace_fields.down.sql │ ├── 000023_alter_subscriptions_offsets.down.sql │ ├── 000089_fix_tokenapproval_poolid_type.down.sql │ ├── 000056_refactor_transactions_columns.up.sql │ ├── 000051_create_ffi_events_table.up.sql │ ├── 000103_create_ffi_errors_table.up.sql │ ├── 000088_fix_token_protocolid_indexes.up.sql │ ├── 000050_create_ffi_methods_table.up.sql │ ├── 000013_create_orgs_table.up.sql │ ├── 000014_create_nodes_table.up.sql │ ├── 000056_refactor_transactions_columns.down.sql │ ├── 000095_change_namespace_fields.up.sql │ ├── 000033_add_token_connector_fields.up.sql │ ├── 000006_create_datatypes_table.up.sql │ ├── 000004_create_batches_table.up.sql │ └── 000005_create_transactions_table.up.sql ├── smart_contracts ├── fabric │ ├── firefly-go │ │ ├── .gitignore │ │ └── firefly.go │ └── custompin-sample │ │ ├── .gitignore │ │ └── custompin.go ├── ethereum │ ├── custompin_sample │ │ ├── .gitignore │ │ ├── package.json │ │ ├── tsconfig.json │ │ └── hardhat.config.ts │ └── solidity_firefly │ │ ├── .gitignore │ │ ├── package.json │ │ ├── tsconfig.json │ │ ├── contracts │ │ └── IBatchPin.sol │ │ └── hardhat.config.ts └── corda │ └── cordapp_kat │ ├── settings.gradle │ ├── .gitignore │ ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties │ ├── kat-flows │ └── gradle │ │ └── wrapper │ │ └── gradle-wrapper.properties │ └── kat-contracts │ └── gradle │ └── wrapper │ └── gradle-wrapper.properties ├── CODEOWNERS ├── images ├── firefly_cli.png ├── firefly_sandbox.png ├── firefly_explorer.png ├── multi_party_systems.png ├── hyperledger_firefly_logo.png └── event_driven_programming_model.png ├── resources ├── ff-logo-16.png └── ff-logo-32.png ├── CHANGELOG.md ├── .editorconfig ├── go.work ├── codecov.yml ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ └── solidity.yml ├── .dockerignore ├── .gitignore ├── CODE_OF_CONDUCT.md └── CONTRIBUTING.md /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.2 2 | -------------------------------------------------------------------------------- /doc-site/docs/versions.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/e2e/.gitignore: -------------------------------------------------------------------------------- 1 | containerlogs -------------------------------------------------------------------------------- /doc-site/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | venv 3 | -------------------------------------------------------------------------------- /test/_includes/thing1_description.md: -------------------------------------------------------------------------------- 1 | A troublesome thing -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/wserror_description.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.go licensefile=.githooks/license-maintainer/LICENSE-go -------------------------------------------------------------------------------- /db/migrations/postgres/000109_fix_tokentransfer_index.down.sql: -------------------------------------------------------------------------------- 1 | -- no down migration -------------------------------------------------------------------------------- /db/migrations/sqlite/000049_create_ffi_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS ffi; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000109_fix_tokentransfer_index.down.sql: -------------------------------------------------------------------------------- 1 | -- no down migration -------------------------------------------------------------------------------- /db/migrations/sqlite/000002_create_data_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS data; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000032_create_tokenaccount_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE tokenaccount; -------------------------------------------------------------------------------- /db/migrations/sqlite/000059_create_pins_batch_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX pins_batch; 2 | -------------------------------------------------------------------------------- /smart_contracts/fabric/firefly-go/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | vendor 3 | chaincode-go 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000064_allow_null_data.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration for this one 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000001_create_messages_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS messages; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000012_create_pins_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS pins; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000013_create_orgs_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS orgs; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000014_create_nodes_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS nodes; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000022_create_blobs_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS blobs; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000048_remove_token_uri_index.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenbalance_uri; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000061_add_event_tx.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE events DROP COLUMN tx_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000061_add_event_tx.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE events ADD COLUMN tx_id UUID; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000064_allow_null_data.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration for this one 2 | -------------------------------------------------------------------------------- /test/_includes/badjson_description.md: -------------------------------------------------------------------------------- 1 | Test include file for markdown reference doc generator -------------------------------------------------------------------------------- /db/migrations/postgres/000097_alter_tokentransfer_allow_null_signer.down.sql: -------------------------------------------------------------------------------- 1 | -- No action in down -------------------------------------------------------------------------------- /db/migrations/sqlite/000004_create_batches_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS batches; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000007_create_offsets_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS offsets; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000011_create_events_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS events; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000015_create_config_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS config; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000016_create_groups_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS groups; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000017_create_members_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS members; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000018_create_nonces_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS nonces; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000019_create_nextpins_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS nextpins; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000025_create_tokenpool_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS tokenpool; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000046_add_batch_node.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches DROP COLUMN node_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000046_add_batch_node.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches ADD COLUMN node_id UUID; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000050_create_ffi_methods_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS ffimethods; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000051_create_ffi_events_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS ffievents; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000058_remove_tokenpool_key.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN key; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000077_add_transactions_id_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX transactions_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000103_create_ffi_errors_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS ffierrors; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000108_create_contractapis_id_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX contractapis_id; 2 | -------------------------------------------------------------------------------- /doc-site/docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --md-primary-fg-color: #472EE0; 3 | } -------------------------------------------------------------------------------- /smart_contracts/fabric/custompin-sample/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | vendor 3 | custompin_sample 4 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: Apache-2.0 2 | 3 | * @hyperledger/firefly-core-maintainers 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000049_create_ffi_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS ffi; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000006_create_datatypes_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS datatypes; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000008_create_operations_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS operations; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000009_create_namespaces_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS namespaces; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000031_create_tokentransfer_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS tokentransfer; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000037_add_message_topic_tag_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX messages_topics_tag; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000041_drop_operations_member.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations DROP COLUMN member; -------------------------------------------------------------------------------- /db/migrations/sqlite/000044_add_tokenpool_state.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN state; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000052_create_contractapis_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS contractapis; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000062_create_tokenapproval_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS tokenapproval; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000072_add_tokenpool_info.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN info; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000072_add_tokenpool_info.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN info TEXT; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000075_add_pins_batch_hash.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pins DROP COLUMN batch_hash; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000098_alter_data_public_ref.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE data DROP COLUMN public; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000100_allow_null_listener_location.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration for this one 2 | -------------------------------------------------------------------------------- /images/firefly_cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/firefly_cli.png -------------------------------------------------------------------------------- /resources/ff-logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/resources/ff-logo-16.png -------------------------------------------------------------------------------- /resources/ff-logo-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/resources/ff-logo-32.png -------------------------------------------------------------------------------- /db/migrations/postgres/000100_allow_null_listener_location.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration for this one 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000005_create_transactions_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS transactions; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000010_create_subscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS subscriptions; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000029_add_tokenpool_created.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN created; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000036_add_tokenpool_standard.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN standard; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000059_create_pins_batch_index.up.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX pins_batch ON pins(batch_id); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000069_add_operation_retry.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations DROP COLUMN retry_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000069_add_operation_retry.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations ADD COLUMN retry_id UUID; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000076_add_tokentransfer_message_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_messageid; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000085_add_tokenpool_decimals.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN decimals; 2 | -------------------------------------------------------------------------------- /images/firefly_sandbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/firefly_sandbox.png -------------------------------------------------------------------------------- /db/migrations/postgres/000012_create_pins_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS pins; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000013_create_orgs_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS orgs; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000014_create_nodes_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS nodes; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000022_create_blobs_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS blobs; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000059_create_pins_batch_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX pins_batch; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000003_create_message_data_join_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS messages_data; 2 | 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000035_add_tokenaccount_updated.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount DROP COLUMN updated; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000054_create_blockchainevents_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS blockchainevents; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000075_add_pins_batch_hash.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pins ADD COLUMN batch_hash VARCHAR(64); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000097_alter_tokentransfer_allow_null_signer.down.sql: -------------------------------------------------------------------------------- 1 | -- This is not implemented for SQLite -------------------------------------------------------------------------------- /doc-site/requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs-material 2 | mkdocs-literate-nav 3 | mkdocs-include-markdown-plugin 4 | mike 5 | -------------------------------------------------------------------------------- /images/firefly_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/firefly_explorer.png -------------------------------------------------------------------------------- /smart_contracts/ethereum/custompin_sample/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | typechain-types 5 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/solidity_firefly/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | typechain-types 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000001_create_messages_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS messages; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000002_create_data_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS data; 3 | COMMIT; 4 | 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000004_create_batches_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS batches; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000007_create_offsets_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS offsets; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000011_create_events_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS events; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000015_create_config_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS config; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000016_create_groups_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS groups; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000017_create_members_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS members; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000018_create_nonces_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS nonces; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000019_create_nextpins_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS nextpins; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000032_create_tokenaccount_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE tokenaccount; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000048_remove_token_uri_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenbalance_uri; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000050_create_ffi_methods_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS ffimethods; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000051_create_ffi_events_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS ffievents; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000061_add_event_tx.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE events DROP COLUMN tx_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000061_add_event_tx.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE events ADD COLUMN tx_id UUID; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000103_create_ffi_errors_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS ffierrors; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000034_rename_tokenaccount_key.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount RENAME COLUMN identity TO key; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000036_add_tokenpool_standard.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN standard VARCHAR(64); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000041_drop_operations_member.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations ADD COLUMN member VARCHAR(1024); -------------------------------------------------------------------------------- /db/migrations/sqlite/000045_add_tokentransfer_messageid.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokentransfer DROP COLUMN message_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000073_add_contractlisteners_options.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners DROP COLUMN options; -------------------------------------------------------------------------------- /db/migrations/sqlite/000073_add_contractlisteners_options.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners ADD COLUMN options TEXT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000082_add_blockchainevent_protocolid_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_protocolid; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000094_allow_local_definitions.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration (can't add back NOT NULL constraint) -------------------------------------------------------------------------------- /db/migrations/sqlite/000114_add_message_reject_reason.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages DROP COLUMN reject_reason; 2 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/uuid_description.md: -------------------------------------------------------------------------------- 1 | IDs are generated as UUID V4 globally unique identifiers -------------------------------------------------------------------------------- /images/multi_party_systems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/multi_party_systems.png -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | See [Hyperledger FireFly Releases](https://github.com/hyperledger/firefly/releases) 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000006_create_datatypes_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS datatypes; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000008_create_operations_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS operations; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000009_create_namespaces_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS namespaces; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000025_create_tokenpool_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS tokenpool; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000046_add_batch_node.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE batches DROP COLUMN node_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000046_add_batch_node.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE batches ADD COLUMN node_id UUID; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000052_create_contractapis_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS contractapis; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000058_remove_tokenpool_key.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN key; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000108_create_contractapis_id_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX contractapis_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000034_rename_tokenaccount_key.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount RENAME COLUMN key TO identity; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000042_rename_tokenaccount_to_tokenbalance.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount RENAME TO tokenbalance; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000053_create_contractsubscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS contractsubscriptions; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000071_rename_batch_payload_column.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches RENAME COLUMN manifest TO payload; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000071_rename_batch_payload_column.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches RENAME COLUMN payload TO manifest; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000085_add_tokenpool_decimals.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN decimals INTEGER DEFAULT 0; 2 | -------------------------------------------------------------------------------- /doc-site/docs/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/assets/favicon.ico -------------------------------------------------------------------------------- /doc-site/docs/images/actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/actions.png -------------------------------------------------------------------------------- /doc-site/docs/images/ff_start.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/ff_start.gif -------------------------------------------------------------------------------- /doc-site/docs/images/ping_pong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/ping_pong.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/releases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/releases.png -------------------------------------------------------------------------------- /doc-site/docs/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/settings.png -------------------------------------------------------------------------------- /db/migrations/postgres/000005_create_transactions_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS transactions; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000010_create_subscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS subscriptions; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000031_create_tokentransfer_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS tokentransfer; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000037_add_message_topic_tag_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX messages_topics_tag; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000041_drop_operations_member.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations DROP COLUMN member; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000044_add_tokenpool_state.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN state; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000059_create_pins_batch_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE INDEX pins_batch ON pins(batch_id); 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000062_create_tokenapproval_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS tokenapproval; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000072_add_tokenpool_info.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN info; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000072_add_tokenpool_info.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN info TEXT; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000094_allow_local_definitions.down.sql: -------------------------------------------------------------------------------- 1 | -- No down migration (can't add back NOT NULL constraint) 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000042_rename_tokenaccount_to_tokenbalance.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenbalance RENAME TO tokenaccount; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000090_add_namespace_fireflycontracts.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE namespaces DROP COLUMN firefly_contracts; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000090_add_namespace_fireflycontracts.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE namespaces ADD COLUMN firefly_contracts TEXT; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000107_add_blob_path.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX data_blob_path; 2 | ALTER TABLE data DROP COLUMN blob_path; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000114_add_message_reject_reason.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN reject_reason TEXT DEFAULT ''; 2 | -------------------------------------------------------------------------------- /doc-site/docs/images/add_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/add_network.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_cli.png -------------------------------------------------------------------------------- /doc-site/docs/images/send_tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/send_tokens.png -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/ffi_description.md: -------------------------------------------------------------------------------- 1 | See [FireFly Interface Format](../firefly_interface_format.md) 2 | -------------------------------------------------------------------------------- /images/hyperledger_firefly_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/hyperledger_firefly_logo.png -------------------------------------------------------------------------------- /db/migrations/postgres/000003_create_message_data_join_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS messages_data; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000029_add_tokenpool_created.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN created; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000036_add_tokenpool_standard.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN standard; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000069_add_operation_retry.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations DROP COLUMN retry_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000069_add_operation_retry.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations ADD COLUMN retry_id UUID; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000077_add_transactions_id_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX transactions_id; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000085_add_tokenpool_decimals.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN decimals; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000086_alter_contractapis.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractapis DROP COLUMN message_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000057_add_tokentransfer_blockchainevent.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokentransfer DROP COLUMN blockchain_event; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000057_add_tokentransfer_blockchainevent.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokentransfer ADD COLUMN blockchain_event UUID; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000066_rename_contractsubscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners RENAME TO contractsubscriptions; -------------------------------------------------------------------------------- /db/migrations/sqlite/000066_rename_contractsubscriptions_table.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractsubscriptions RENAME TO contractlisteners; -------------------------------------------------------------------------------- /db/migrations/sqlite/000117_update_contractlisteners_add_filters_column.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners DROP COLUMN filters; -------------------------------------------------------------------------------- /doc-site/docs/assets/project-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/assets/project-icon.png -------------------------------------------------------------------------------- /doc-site/docs/assets/project-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/assets/project-logo.png -------------------------------------------------------------------------------- /doc-site/docs/images/create_release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/create_release.png -------------------------------------------------------------------------------- /doc-site/docs/images/docker_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/docker_memory.png -------------------------------------------------------------------------------- /doc-site/docs/images/draft_release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/draft_release.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_core.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_node.png -------------------------------------------------------------------------------- /doc-site/docs/images/gateway_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/gateway_mode.png -------------------------------------------------------------------------------- /doc-site/docs/images/import_tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/import_tokens.png -------------------------------------------------------------------------------- /doc-site/docs/images/launch_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/launch_config.png -------------------------------------------------------------------------------- /doc-site/docs/images/multi_protocol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/multi_protocol.png -------------------------------------------------------------------------------- /db/migrations/postgres/000035_add_tokenaccount_updated.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount DROP COLUMN updated; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000054_create_blockchainevents_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS blockchainevents; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000064_allow_null_data.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE data ALTER COLUMN value DROP NOT NULL; 4 | 5 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000075_add_pins_batch_hash.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE pins DROP COLUMN batch_hash; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000098_alter_data_public_ref.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE data DROP COLUMN public; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000037_add_message_topic_tag_index.up.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX messages_topics_tag ON messages(namespace,topics,tag); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000076_add_tokentransfer_message_index.up.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX tokentransfer_messageid ON tokentransfer(message_id); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000086_alter_contractapis.down.sql: -------------------------------------------------------------------------------- 1 | -- SQLite doesn't need any change here because it already had the correct columns -------------------------------------------------------------------------------- /db/migrations/sqlite/000086_alter_contractapis.up.sql: -------------------------------------------------------------------------------- 1 | -- SQLite doesn't need any change here because it already had the correct columns -------------------------------------------------------------------------------- /db/migrations/sqlite/000098_alter_data_public_ref.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE data ADD COLUMN public VARCHAR(1024); 2 | UPDATE data SET public = ''; -------------------------------------------------------------------------------- /doc-site/docs/images/account_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/account_address.png -------------------------------------------------------------------------------- /doc-site/docs/images/contract_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/contract_address.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_explorer.png -------------------------------------------------------------------------------- /doc-site/docs/images/intro_to_firefly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/intro_to_firefly.png -------------------------------------------------------------------------------- /doc-site/docs/images/multiparty_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/multiparty_mode.png -------------------------------------------------------------------------------- /doc-site/docs/images/network_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/network_details.png -------------------------------------------------------------------------------- /doc-site/docs/images/new_message_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/new_message_view.png -------------------------------------------------------------------------------- /doc-site/docs/images/tokens_received.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/tokens_received.png -------------------------------------------------------------------------------- /images/event_driven_programming_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/images/event_driven_programming_model.png -------------------------------------------------------------------------------- /db/migrations/postgres/000034_rename_tokenaccount_key.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount RENAME COLUMN identity TO key; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000036_add_tokenpool_standard.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN standard VARCHAR(64); 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000041_drop_operations_member.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations ADD COLUMN member VARCHAR(1024); 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000045_add_tokentransfer_messageid.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokentransfer DROP COLUMN message_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000053_create_contractsubscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS contractsubscriptions; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000071_rename_batch_payload_column.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE batches RENAME COLUMN manifest TO payload; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000073_add_contractlisteners_options.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners DROP COLUMN options; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000073_add_contractlisteners_options.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners ADD COLUMN options TEXT; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000076_add_tokentransfer_message_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX tokentransfer_messageid; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000082_add_blockchainevent_protocolid_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX blockchainevents_protocolid; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000114_add_message_reject_reason.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages DROP COLUMN reject_reason; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000067_rename_blockchain_event.down.sql: -------------------------------------------------------------------------------- 1 | UPDATE events SET etype='bockchain_event' WHERE etype='bockchain_event_received'; -------------------------------------------------------------------------------- /db/migrations/sqlite/000067_rename_blockchain_event.up.sql: -------------------------------------------------------------------------------- 1 | UPDATE events SET etype='bockchain_event_received' WHERE etype='bockchain_event'; -------------------------------------------------------------------------------- /doc-site/docs/images/define_a_datatype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/define_a_datatype.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_event_bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_event_bus.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_event_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_event_model.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/settings.png -------------------------------------------------------------------------------- /doc-site/docs/images/multiparty_system1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/multiparty_system1.png -------------------------------------------------------------------------------- /doc-site/docs/images/nft_token_balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/nft_token_balance.png -------------------------------------------------------------------------------- /doc-site/docs/images/problem_statement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/problem_statement.png -------------------------------------------------------------------------------- /doc-site/docs/images/websocket_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/websocket_example.png -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/jsonobject_description.md: -------------------------------------------------------------------------------- 1 | Any JSON Object. Must be an object, rather than an array or a simple type. -------------------------------------------------------------------------------- /db/migrations/postgres/000034_rename_tokenaccount_key.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount RENAME COLUMN key TO identity; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000042_rename_tokenaccount_to_tokenbalance.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount RENAME TO tokenbalance; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000071_rename_batch_payload_column.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE batches RENAME COLUMN payload TO manifest; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000075_add_pins_batch_hash.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE pins ADD COLUMN batch_hash VARCHAR(64); 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000085_add_tokenpool_decimals.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN decimals INTEGER DEFAULT 0; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000086_alter_contractapis.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractapis ADD COLUMN message_id UUID NOT NULL; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000107_add_blob_path.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX data_blob_path; 3 | ALTER TABLE data DROP COLUMN blob_path; 4 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000116_tx_type_not_null.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ALTER COLUMN tx_parent_type DROP NOT NULL; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000029_add_tokenpool_created.up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM tokenpool; 2 | ALTER TABLE tokenpool ADD COLUMN created BIGINT NOT NULL; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000048_remove_token_uri_index.down.sql: -------------------------------------------------------------------------------- 1 | CREATE UNIQUE INDEX tokenbalance_uri ON tokenbalance(namespace,key,pool_id,uri); 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000060_remove_operation_backendid.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX operations_backend; 2 | ALTER TABLE operations DROP COLUMN backend_id; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000065_pin_signer_event_correlator.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pins DROP COLUMN signer; 2 | ALTER TABLE events DROP COLUMN cid; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000083_rename_contractlistener_protocolid.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners RENAME COLUMN backend_id TO protocol_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000083_rename_contractlistener_protocolid.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners RENAME COLUMN protocol_id TO backend_id; 2 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000093_add_ffi_details.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE ffimethods DROP COLUMN details; 2 | ALTER TABLE ffievents DROP COLUMN details; 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/blockchain-sub-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/blockchain-sub-status.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_message_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_message_types.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/add_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/add_network.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/send_tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/send_tokens.png -------------------------------------------------------------------------------- /doc-site/docs/images/nft_contract_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/nft_contract_address.png -------------------------------------------------------------------------------- /smart_contracts/corda/cordapp_kat/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'kaleido-corda-kat' 2 | include 'kat-contracts' 3 | include 'kat-flows' 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000042_rename_tokenaccount_to_tokenbalance.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenbalance RENAME TO tokenaccount; 3 | COMMIT: 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000090_add_namespace_fireflycontracts.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE namespaces DROP COLUMN firefly_contracts; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000090_add_namespace_fireflycontracts.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE namespaces ADD COLUMN firefly_contracts TEXT; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000114_add_message_reject_reason.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ADD COLUMN reject_reason TEXT DEFAULT ''; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000058_remove_tokenpool_key.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN "key" VARCHAR(1024); 2 | UPDATE tokenpool SET "key" = ''; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000093_add_ffi_details.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE ffimethods ADD COLUMN details TEXT; 2 | ALTER TABLE ffievents ADD COLUMN details TEXT; 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/asset_transfer_swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/asset_transfer_swagger.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_intro_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_intro_overview.png -------------------------------------------------------------------------------- /doc-site/docs/images/gateway_multiparty_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/gateway_multiparty_mode.png -------------------------------------------------------------------------------- /doc-site/docs/images/getting-started-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/getting-started-overview.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/account_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/account_address.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/import_tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/import_tokens.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/network_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/network_details.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/tokens_received.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/tokens_received.png -------------------------------------------------------------------------------- /doc-site/docs/images/simple_storage_swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/simple_storage_swagger.png -------------------------------------------------------------------------------- /doc-site/docs/images/understanding_firefly1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/understanding_firefly1.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{yaml,yml,json}] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 2 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000057_add_tokentransfer_blockchainevent.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokentransfer DROP COLUMN blockchain_event; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000057_add_tokentransfer_blockchainevent.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokentransfer ADD COLUMN blockchain_event UUID; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000066_rename_contractsubscriptions_table.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners RENAME TO contractsubscriptions; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000066_rename_contractsubscriptions_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractsubscriptions RENAME TO contractlisteners; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000035_add_tokenaccount_updated.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount ADD COLUMN updated BIGINT; 2 | UPDATE tokenaccount SET updated = 0; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000044_add_tokenpool_state.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN state VARCHAR(64); 2 | UPDATE tokenpool SET state="confirmed"; 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_data_privacy_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_data_privacy_model.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/hyperledger_firefly_social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/hyperledger_firefly_social.png -------------------------------------------------------------------------------- /doc-site/docs/images/internal_event_sequencing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/internal_event_sequencing.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/message_broadcast_initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/message_broadcast_initial.png -------------------------------------------------------------------------------- /doc-site/docs/images/message_private_broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/message_private_broadcast.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/contract_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/contract_address.png -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/nft_token_balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/nft_token_balance.png -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_broadcast.png -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_token_pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_token_pool.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/bsc_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/bsc_scan.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/moonscan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/moonscan.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_scan.png -------------------------------------------------------------------------------- /db/migrations/postgres/000037_add_message_topic_tag_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE INDEX messages_topics_tag ON messages(namespace,topics,tag); 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000027_add_operations_input.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations RENAME COLUMN output TO info; 2 | ALTER TABLE operations DROP COLUMN input; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000027_add_operations_input.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations RENAME COLUMN info TO output; 2 | ALTER TABLE operations ADD COLUMN input TEXT; 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly-getting-started-steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly-getting-started-steps.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_architecture_overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_architecture_overview.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_data_transport_layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_data_transport_layers.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_orchestration_engine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_orchestration_engine.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_plugin_architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_plugin_architecture.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_transaction_manager.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_transaction_manager.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/idempotency_keys_architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/idempotency_keys_architecture.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/metamask/nft_contract_address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/metamask/nft_contract_address.png -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_api_swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_api_swagger.png -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_contracts_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_contracts_api.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/bsc_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/bsc_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_account.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/tezos_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/tezos_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/xdc_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/xdc_explorer.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/xdc_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/xdc_faucet.png -------------------------------------------------------------------------------- /db/migrations/postgres/000067_rename_blockchain_event.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | UPDATE events SET etype='bockchain_event' WHERE etype='bockchain_event_received'; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000067_rename_blockchain_event.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | UPDATE events SET etype='bockchain_event_received' WHERE etype='bockchain_event'; 3 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000093_add_ffi_details.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE ffimethods DROP COLUMN details; 3 | ALTER TABLE ffievents DROP COLUMN details; 4 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000100_allow_null_listener_location.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE contractlisteners ALTER COLUMN location DROP NOT NULL; 4 | 5 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000038_add_token_namespace_fields.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount DROP COLUMN namespace; 2 | ALTER TABLE tokentransfer DROP COLUMN namespace; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000080_add_contractlistener_signature.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX contractlisteners_signature; 2 | ALTER TABLE contractlisteners DROP COLUMN signature; 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/event_driven_programming_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/event_driven_programming_model.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview.png -------------------------------------------------------------------------------- /doc-site/docs/images/message_broadcast_sample_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/message_broadcast_sample_result.png -------------------------------------------------------------------------------- /doc-site/docs/images/operations_by_transaction_type.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/operations_by_transaction_type.jpg -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/arbitrum_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/arbitrum_scan.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/optimism_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/optimism_scan.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/polygon_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/polygon_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/tezos_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/tezos_explorer.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/zksync_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/zksync_faucet.png -------------------------------------------------------------------------------- /db/migrations/postgres/000029_add_tokenpool_created.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DELETE FROM tokenpool; 3 | ALTER TABLE tokenpool ADD COLUMN created BIGINT NOT NULL; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000048_remove_token_uri_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE UNIQUE INDEX tokenbalance_uri ON tokenbalance(namespace,key,pool_id,uri); 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000060_remove_operation_backendid.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX operations_backend; 3 | ALTER TABLE operations DROP COLUMN backend_id; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000065_pin_signer_event_correlator.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE pins DROP COLUMN signer; 3 | ALTER TABLE events DROP COLUMN cid; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000076_add_tokentransfer_message_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | CREATE INDEX tokentransfer_messageid ON tokentransfer(message_id); 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000083_rename_contractlistener_protocolid.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners RENAME COLUMN backend_id TO protocol_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000083_rename_contractlistener_protocolid.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners RENAME COLUMN protocol_id TO backend_id; 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000093_add_ffi_details.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE ffimethods ADD COLUMN details TEXT; 3 | ALTER TABLE ffievents ADD COLUMN details TEXT; 4 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000097_alter_tokentransfer_allow_null_signer.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE tokentransfer ALTER COLUMN key DROP NOT NULL; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000087_fix_tokenapproval_index.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_subject; 2 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_event_subscription_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_event_subscription_model.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_transactions_explorer_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_transactions_explorer_view.png -------------------------------------------------------------------------------- /doc-site/docs/images/multiparty_business_process_flow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/multiparty_business_process_flow.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_broadcast_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_broadcast_result.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/arbitrum_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/arbitrum_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/avalanche_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/avalanche_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/moonbase_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/moonbase_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_account_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_account_name.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_fund_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_fund_account.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/optimism_faucet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/optimism_faucet.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/polygonscan_matic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/polygonscan_matic.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/zksync_explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/zksync_explorer.png -------------------------------------------------------------------------------- /db/migrations/postgres/000058_remove_tokenpool_key.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN "key" VARCHAR(1024); 3 | UPDATE tokenpool SET "key" = ''; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000098_alter_data_public_ref.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE data ADD COLUMN public VARCHAR(1024); 4 | UPDATE data SET public = ''; 5 | 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000112_add_ffi_networkname.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX ffi_networkname; 2 | ALTER TABLE ffi DROP COLUMN published; 3 | ALTER TABLE ffi DROP COLUMN network_name; 4 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_first_successful_transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_first_successful_transaction.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_apps.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_flows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_flows.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_tools.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_account_lookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_account_lookup.png -------------------------------------------------------------------------------- /go.work: -------------------------------------------------------------------------------- 1 | go 1.23.0 2 | 3 | toolchain go1.23.4 4 | 5 | use ( 6 | . 7 | ./smart_contracts/fabric/custompin-sample 8 | ./smart_contracts/fabric/firefly-go 9 | ) 10 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000084_add_blockchainevent_txblockchainid.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_txblockchainid; 2 | ALTER TABLE blockchainevents DROP COLUMN tx_blockchain_id; 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000087_fix_tokenapproval_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_subject; 2 | CREATE UNIQUE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 3 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_blockchain_connector_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_blockchain_connector_framework.png -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_connector_toolkit_event_streams.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_connector_toolkit_event_streams.jpg -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_security.png -------------------------------------------------------------------------------- /doc-site/docs/images/sandbox/sandbox_token_transfer_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/sandbox/sandbox_token_transfer_result.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_wallet_send_funds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_wallet_send_funds.png -------------------------------------------------------------------------------- /db/migrations/postgres/000027_add_operations_input.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations RENAME COLUMN output TO info; 3 | ALTER TABLE operations DROP COLUMN input; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000027_add_operations_input.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations RENAME COLUMN info TO output; 3 | ALTER TABLE operations ADD COLUMN input TEXT; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000030_create_key_fields.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches DROP COLUMN "key"; 2 | ALTER TABLE messages DROP COLUMN "key"; 3 | ALTER TABLE tokenpool DROP COLUMN "key"; 4 | -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/avalanche_snowtrace_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/avalanche_snowtrace_scan.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/chains/images/near_navigate_to_wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/chains/images/near_navigate_to_wallet.png -------------------------------------------------------------------------------- /db/migrations/postgres/000038_add_token_namespace_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount DROP COLUMN namespace; 3 | ALTER TABLE tokentransfer DROP COLUMN namespace; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000080_add_contractlistener_signature.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX contractlisteners_signature; 3 | ALTER TABLE contractlisteners DROP COLUMN signature; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000117_update_contractlisteners_add_filters_column.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners DROP COLUMN filters; 3 | -- no down for the VARCHAR change 4 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000060_remove_operation_backendid.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE operations ADD COLUMN backend_id VARCHAR(256); 2 | CREATE INDEX operations_backend ON operations(backend_id); 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000065_pin_signer_event_correlator.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pins ADD COLUMN signer TEXT; 2 | UPDATE pins SET signer = ''; 3 | 4 | ALTER TABLE events ADD COLUMN cid UUID; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000092_add_pin_namespace.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX pins_pin; 2 | CREATE UNIQUE INDEX pins_pin ON pins(hash, batch_id, idx); 3 | 4 | ALTER TABLE pins DROP COLUMN namespace; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000097_alter_tokentransfer_allow_null_signer.up.sql: -------------------------------------------------------------------------------- 1 | -- SQLite does not allow removal of a NOT NULL constraint, so the CREATE TABLE has been altered for new databases only. -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_connectivity.png -------------------------------------------------------------------------------- /db/migrations/postgres/000021_create_data_blob.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE data DROP COLUMN blob_hash; 3 | ALTER TABLE data DROP COLUMN blob_public; 4 | DROP INDEX data_blobs; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000087_fix_tokenapproval_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenapproval_subject; 3 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000107_add_blob_path.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE data ADD COLUMN blob_path VARCHAR(1024); 2 | CREATE INDEX data_blob_path ON data (blob_path); 3 | UPDATE data SET blob_path = ''; 4 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_digital_assets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_digital_assets.png -------------------------------------------------------------------------------- /db/migrations/postgres/000112_add_ffi_networkname.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX ffi_networkname; 3 | ALTER TABLE ffi DROP COLUMN published; 4 | ALTER TABLE ffi DROP COLUMN network_name; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000074_add_event_and_listener_topic.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX events_topic; 2 | 3 | ALTER TABLE events DROP COLUMN topic; 4 | ALTER TABLE contractlisteners DROP COLUMN topic; 5 | 6 | -------------------------------------------------------------------------------- /doc-site/docs/images/hyperledger-firefly-namespaces-example-with-org.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/hyperledger-firefly-namespaces-example-with-org.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/custom_contracts/images/simple_storage_swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/custom_contracts/images/simple_storage_swagger.png -------------------------------------------------------------------------------- /db/migrations/postgres/000084_add_blockchainevent_txblockchainid.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX blockchainevents_txblockchainid; 3 | ALTER TABLE blockchainevents DROP COLUMN tx_blockchain_id; 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000087_fix_tokenapproval_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenapproval_subject; 3 | CREATE UNIQUE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /doc-site/docs/images/firefly_functionality_overview_orchestration_engine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/images/firefly_functionality_overview_orchestration_engine.png -------------------------------------------------------------------------------- /db/migrations/postgres/000030_create_key_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE batches DROP COLUMN "key"; 3 | ALTER TABLE messages DROP COLUMN "key"; 4 | ALTER TABLE tokenpool DROP COLUMN "key"; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000039_drop_messages_pending.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX messages_sortorder; 2 | CREATE INDEX messages_sortorder ON messages(confirmed, created); 3 | 4 | ALTER TABLE messages DROP COLUMN pending; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000080_add_contractlistener_signature.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners ADD COLUMN signature VARCHAR(1024); 2 | CREATE INDEX contractlisteners_signature ON contractlisteners(signature); 3 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000102_alter_tokenapproval_add_message.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_messageid; 2 | ALTER TABLE tokenapproval DROP COLUMN message_id; 3 | ALTER TABLE tokenapproval DROP COLUMN message_hash; -------------------------------------------------------------------------------- /db/migrations/sqlite/000104_add_tokenpool_interface.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool DROP COLUMN interface; 2 | ALTER TABLE tokenpool DROP COLUMN interface_format; 3 | ALTER TABLE tokenpool DROP COLUMN methods; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000106_add_message_transactions.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages DROP COLUMN tx_id; 2 | ALTER TABLE messages DROP COLUMN tx_parent_type; 3 | ALTER TABLE messages DROP COLUMN tx_parent_id; 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000113_add_contract_api_networkname.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX contractapis_networkname; 2 | ALTER TABLE contractapis DROP COLUMN published; 3 | ALTER TABLE contractapis DROP COLUMN network_name; 4 | -------------------------------------------------------------------------------- /doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment2.png -------------------------------------------------------------------------------- /doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger/firefly/HEAD/doc-site/docs/tutorials/custom_contracts/images/tezos_contract_deployment3.png -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | threshold: 0.1% 6 | patch: 7 | default: 8 | threshold: 0.1% 9 | ignore: 10 | - "mocks/**/*.go" 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000060_remove_operation_backendid.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE operations ADD COLUMN backend_id VARCHAR(256); 3 | CREATE INDEX operations_backend ON operations(backend_id); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000065_pin_signer_event_correlator.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE pins ADD COLUMN signer TEXT; 3 | UPDATE pins SET signer = ''; 4 | 5 | ALTER TABLE events ADD COLUMN cid UUID; 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000092_add_pin_namespace.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX pins_pin; 3 | CREATE UNIQUE INDEX pins_pin ON pins(hash, batch_id, idx); 4 | 5 | ALTER TABLE pins DROP COLUMN namespace; 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000117_update_contractlisteners_add_filters_column.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners ADD COLUMN filters TEXT; 2 | -- in SQLITE VARCHAR is equivalent to TEXT so no migration for signature length -------------------------------------------------------------------------------- /db/migrations/postgres/000116_tx_type_not_null.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | UPDATE messages SET tx_parent_type = '' 3 | WHERE tx_parent_type IS NULL; 4 | ALTER TABLE messages ALTER COLUMN tx_parent_type SET NOT NULL; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000079_add_messages_data_newindexes.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX messages_data_message; 2 | DROP INDEX messages_data_data; 3 | 4 | CREATE UNIQUE INDEX messages_data_idx ON messages_data(message_id, data_id); 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Support Request 4 | url: https://discord.gg/hyperledger 5 | about: Support request or question relating to Hyperledger Firefly 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000074_add_event_and_listener_topic.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX events_topic; 4 | 5 | ALTER TABLE events DROP COLUMN topic; 6 | ALTER TABLE contractlisteners DROP COLUMN topic; 7 | 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000039_drop_messages_pending.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN pending SMALLINT; 2 | 3 | DROP INDEX messages_sortorder; 4 | CREATE INDEX messages_sortorder ON messages(pending, confirmed, created); 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000064_allow_null_data.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE data RENAME COLUMN value TO value_old; 2 | ALTER TABLE data ADD COLUMN value TEXT; 3 | UPDATE data SET value = value_old; 4 | ALTER TABLE data DROP COLUMN value_old; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000084_add_blockchainevent_txblockchainid.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE blockchainevents ADD COLUMN tx_blockchain_id VARCHAR(1024); 2 | CREATE INDEX blockchainevents_txblockchainid ON blockchainevents(tx_blockchain_id); 3 | -------------------------------------------------------------------------------- /db/migrations/postgres/000039_drop_messages_pending.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX messages_sortorder; 3 | CREATE INDEX messages_sortorder ON messages(confirmed, created); 4 | 5 | ALTER TABLE messages DROP COLUMN pending; 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000044_add_tokenpool_state.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN state VARCHAR(64); 3 | UPDATE tokenpool SET state='confirmed'; 4 | ALTER TABLE tokenpool ALTER COLUMN state SET NOT NULL; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000080_add_contractlistener_signature.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners ADD COLUMN signature VARCHAR(1024); 3 | CREATE INDEX contractlisteners_signature ON contractlisteners(signature); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000104_add_tokenpool_interface.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool DROP COLUMN interface; 3 | ALTER TABLE tokenpool DROP COLUMN interface_format; 4 | ALTER TABLE tokenpool DROP COLUMN methods; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000106_add_message_transactions.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages DROP COLUMN tx_id; 3 | ALTER TABLE messages DROP COLUMN tx_parent_type; 4 | ALTER TABLE messages DROP COLUMN tx_parent_id; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000113_add_contract_api_networkname.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX contractapis_networkname; 3 | ALTER TABLE contractapis DROP COLUMN published; 4 | ALTER TABLE contractapis DROP COLUMN network_name; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000079_add_messages_data_newindexes.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX messages_data_idx; 2 | 3 | CREATE INDEX messages_data_message ON messages_data(message_id); 4 | CREATE INDEX messages_data_data ON messages_data(data_id); 5 | -------------------------------------------------------------------------------- /doc-site/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Support Request 4 | url: https://discord.gg/hyperledger 5 | about: Support request or question relating to Hyperledger Docs -------------------------------------------------------------------------------- /test/data/contracts/reverter/reverter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Apache-2.0 2 | 3 | pragma solidity >=0.6.0 <0.9.0; 4 | 5 | contract Reverter { 6 | function goBang() pure public { 7 | revert("Bang!"); 8 | } 9 | } -------------------------------------------------------------------------------- /db/migrations/sqlite/000104_add_tokenpool_interface.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN interface UUID; 2 | ALTER TABLE tokenpool ADD COLUMN interface_format VARCHAR(64) DEFAULT ''; 3 | ALTER TABLE tokenpool ADD COLUMN methods TEXT; 4 | -------------------------------------------------------------------------------- /doc-site/docs/troubleshooting/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Troubleshooting 3 | --- 4 | 5 | This section includes troubleshooting tips for identifying issues with a running FireFly node, and for gathering useful data before opening an issue. 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000035_add_tokenaccount_updated.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount ADD COLUMN updated BIGINT; 3 | UPDATE tokenaccount SET updated = 0; 4 | ALTER TABLE tokenaccount ALTER COLUMN updated SET NOT NULL; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000108_create_contractapis_id_index.up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM contractapis WHERE seq NOT IN ( 2 | SELECT MAX(seq) FROM contractapis GROUP BY namespace, id); 3 | CREATE UNIQUE INDEX contractapis_id ON contractapis(namespace,id); 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000115_rename_tokenpool_state.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN active BOOLEAN; 2 | UPDATE tokenpool SET active = (CASE WHEN state = 'confirmed' THEN true ELSE false END); 3 | ALTER TABLE tokenpool DROP COLUMN state; 4 | -------------------------------------------------------------------------------- /db/migrations/postgres/000102_alter_tokenapproval_add_message.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX tokenapproval_messageid; 4 | ALTER TABLE tokenapproval DROP COLUMN message_id; 5 | ALTER TABLE tokenapproval DROP COLUMN message_hash; 6 | 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000110_add_tokenpool_networkname.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenpool_networkname; 2 | ALTER TABLE tokenpool DROP COLUMN published; 3 | ALTER TABLE tokenpool DROP COLUMN network_name; 4 | ALTER TABLE tokenpool DROP COLUMN plugin_data; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000039_drop_messages_pending.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ADD COLUMN pending SMALLINT; 3 | 4 | DROP INDEX messages_sortorder; 5 | CREATE INDEX messages_sortorder ON messages(pending, confirmed, created); 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000084_add_blockchainevent_txblockchainid.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE blockchainevents ADD COLUMN tx_blockchain_id VARCHAR(1024); 3 | CREATE INDEX blockchainevents_txblockchainid ON blockchainevents(tx_blockchain_id); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000092_add_pin_namespace.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE pins ADD COLUMN namespace VARCHAR(64); 2 | UPDATE pins SET namespace = "ff_system"; 3 | 4 | DROP INDEX pins_pin; 5 | CREATE UNIQUE INDEX pins_pin ON pins(namespace, hash, batch_id, idx); 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000102_alter_tokenapproval_add_message.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenapproval ADD COLUMN message_id UUID; 2 | ALTER TABLE tokenapproval ADD COLUMN message_hash CHAR(64); 3 | CREATE INDEX tokenapproval_messageid ON tokenapproval(message_id); -------------------------------------------------------------------------------- /db/migrations/sqlite/000115_rename_tokenpool_state.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN state VARCHAR(64); 2 | UPDATE tokenpool SET state = (CASE WHEN active = true THEN 'confirmed' ELSE 'pending' END); 3 | ALTER TABLE tokenpool DROP COLUMN active; 4 | -------------------------------------------------------------------------------- /doc-site/overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block outdated %} 4 | You're not viewing the latest version. 5 | 6 | Click here to go to latest. 7 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /smart_contracts/corda/cordapp_kat/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore Gradle project-specific cache directory 2 | .gradle 3 | 4 | # Ignore Gradle build output directory 5 | build 6 | .classpath 7 | .project 8 | .settings/ 9 | .vscode/ 10 | .idea/ 11 | bin/ 12 | -------------------------------------------------------------------------------- /db/migrations/postgres/000079_add_messages_data_newindexes.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX messages_data_message; 4 | DROP INDEX messages_data_data; 5 | 6 | CREATE UNIQUE INDEX messages_data_idx ON messages_data(message_id, data_id); 7 | 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000101_add_idempotency_keys.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX transactions_idempotency_keys; 2 | DROP INDEX messages_idempotency_keys; 3 | 4 | ALTER TABLE transactions DROP COLUMN idempotency_key; 5 | ALTER TABLE messages DROP COLUMN idempotency_key; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000104_add_tokenpool_interface.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN interface UUID; 3 | ALTER TABLE tokenpool ADD COLUMN interface_format VARCHAR(64) DEFAULT ''; 4 | ALTER TABLE tokenpool ADD COLUMN methods TEXT; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000091_add_namespace_to_identity_indexes.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX identities_did; 2 | CREATE UNIQUE INDEX identities_did ON identities(did); 3 | 4 | DROP INDEX verifiers_value; 5 | CREATE UNIQUE INDEX verifiers_value ON verifiers(vtype, value); 6 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/jsonany_description.md: -------------------------------------------------------------------------------- 1 | Any JSON type. An `object`, `array`, `string`, `number`, `boolean` or `null`. 2 | 3 | FireFly stores object data with the same field order as was provided on the input, 4 | but with any whitespace removed. -------------------------------------------------------------------------------- /db/migrations/postgres/000079_add_messages_data_newindexes.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX messages_data_idx; 4 | 5 | CREATE INDEX messages_data_message ON messages_data(message_id); 6 | CREATE INDEX messages_data_data ON messages_data(data_id); 7 | 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/postgres/000107_add_blob_path.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE data ADD COLUMN blob_path VARCHAR(1024); 3 | CREATE INDEX data_blob_path ON data (blob_path); 4 | UPDATE data SET blob_path = ''; 5 | ALTER TABLE data ALTER COLUMN blob_path SET NOT NULL; 6 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000108_create_contractapis_id_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DELETE FROM contractapis WHERE seq NOT IN ( 3 | SELECT MAX(seq) FROM contractapis GROUP BY namespace, id); 4 | CREATE UNIQUE INDEX contractapis_id ON contractapis(namespace,id); 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000115_rename_tokenpool_state.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN active BOOLEAN; 3 | UPDATE tokenpool SET active = (CASE WHEN state = 'confirmed' THEN true ELSE false END); 4 | ALTER TABLE tokenpool DROP COLUMN state; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000040_add_messages_state.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN local BOOLEAN; 2 | ALTER TABLE messages ADD COLUMN rejected BOOLEAN; 3 | UPDATE messages SET rejected=true WHERE state="rejected"; 4 | 5 | ALTER TABLE messages DROP COLUMN state; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000105_add_namespace_and_data_id_to_blobs.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blobs_namespace_data_id; 2 | DROP INDEX blobs_payload_ref; 3 | ALTER TABLE blobs DROP COLUMN namespace; 4 | ALTER TABLE blobs DROP COLUMN data_id; 5 | CREATE INDEX blob_hash ON blobs(hash); -------------------------------------------------------------------------------- /db/migrations/postgres/000110_add_tokenpool_networkname.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenpool_networkname; 3 | ALTER TABLE tokenpool DROP COLUMN published; 4 | ALTER TABLE tokenpool DROP COLUMN network_name; 5 | ALTER TABLE tokenpool DROP COLUMN plugin_data; 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000115_rename_tokenpool_state.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN state VARCHAR(64); 3 | UPDATE tokenpool SET state = (CASE WHEN active = true THEN 'confirmed' ELSE 'pending' END); 4 | ALTER TABLE tokenpool DROP COLUMN active; 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000068_rename_blockchainevents_subscription_column.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_subscription_id; 2 | ALTER TABLE blockchainevents RENAME COLUMN subscription_id TO listener_id; 3 | CREATE INDEX blockchainevents_listener_id ON blockchainevents(listener_id); -------------------------------------------------------------------------------- /db/migrations/sqlite/000099_fix_blockchainevent_protocolid_index.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_protocolid; 2 | DROP INDEX blockchainevents_listener_protocolid; 3 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, listener_id, protocol_id); 4 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000045_add_tokentransfer_messageid.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokentransfer ADD COLUMN message_id UUID; 2 | 3 | UPDATE tokentransfer SET message_id = message.id 4 | FROM (SELECT hash, id FROM messages) AS message 5 | WHERE tokentransfer.message_hash = message.hash; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000068_rename_blockchainevents_subscription_column.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_listener_id; 2 | ALTER TABLE blockchainevents RENAME COLUMN listener_id TO subscription_id; 3 | CREATE INDEX blockchainevents_subscription_id ON blockchainevents(subscription_id); -------------------------------------------------------------------------------- /db/migrations/sqlite/000091_add_namespace_to_identity_indexes.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX identities_did; 2 | CREATE UNIQUE INDEX identities_did ON identities(namespace, did); 3 | 4 | DROP INDEX verifiers_value; 5 | CREATE UNIQUE INDEX verifiers_value ON verifiers(namespace, vtype, value); 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000021_create_data_blob.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE data DROP COLUMN blobstore; 4 | ALTER TABLE data ADD blob_hash CHAR(64); 5 | ALTER TABLE data ADD blob_public VARCHAR(1024); 6 | 7 | CREATE INDEX data_blobs ON data(blob_hash); 8 | 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/postgres/000068_rename_blockchainevents_subscription_column.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_listener_id; 2 | ALTER TABLE blockchainevents RENAME COLUMN listener_id TO subscription_id; 3 | CREATE INDEX blockchainevents_subscription_id ON blockchainevents(subscription_id); -------------------------------------------------------------------------------- /db/migrations/postgres/000091_add_namespace_to_identity_indexes.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX identities_did; 3 | CREATE UNIQUE INDEX identities_did ON identities(did); 4 | 5 | DROP INDEX verifiers_value; 6 | CREATE UNIQUE INDEX verifiers_value ON verifiers(vtype, value); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000117_update_contractlisteners_add_filters_column.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractlisteners ADD COLUMN filters TEXT; 3 | -- changing the length of varchar does not affect the index 4 | ALTER TABLE contractlisteners ALTER COLUMN signature TYPE VARCHAR; 5 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000102_alter_tokenapproval_add_message.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE tokenapproval ADD COLUMN message_id UUID; 4 | ALTER TABLE tokenapproval ADD COLUMN message_hash CHAR(64); 5 | CREATE INDEX tokenapproval_messageid ON tokenapproval(message_id); 6 | 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000033_add_token_connector_fields.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_protocolid; 2 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(protocol_id); 3 | 4 | ALTER TABLE tokenaccount DROP COLUMN connector; 5 | ALTER TABLE tokentransfer DROP COLUMN connector; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000099_fix_blockchainevent_protocolid_index.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX blockchainevents_protocolid; 3 | DROP INDEX blockchainevents_listener_protocolid; 4 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, listener_id, protocol_id); 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000101_add_idempotency_keys.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX transactions_idempotency_keys; 4 | DROP INDEX messages_idempotency_keys; 5 | 6 | ALTER TABLE transactions DROP COLUMN idempotency_key; 7 | ALTER TABLE messages DROP COLUMN idempotency_key; 8 | 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/postgres/000105_add_namespace_and_data_id_to_blobs.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX blobs_namespace_data_id; 4 | DROP INDEX blobs_payload_ref; 5 | ALTER TABLE blobs DROP COLUMN namespace; 6 | ALTER TABLE blobs DROP COLUMN data_id; 7 | CREATE INDEX blob_hash ON blobs(hash); 8 | 9 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000055_add_blobs_size_and_name.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX data_blob_name; 2 | DROP INDEX data_blob_size; 3 | 4 | ALTER TABLE blobs DROP COLUMN "size"; 5 | ALTER TABLE data DROP COLUMN "blob_name"; 6 | ALTER TABLE data DROP COLUMN "blob_size"; 7 | ALTER TABLE data DROP COLUMN "value_size"; 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000068_rename_blockchainevents_subscription_column.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX blockchainevents_subscription_id; 3 | ALTER TABLE blockchainevents RENAME COLUMN subscription_id TO listener_id; 4 | CREATE INDEX blockchainevents_listener_id ON blockchainevents(listener_id); 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000091_add_namespace_to_identity_indexes.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX identities_did; 3 | CREATE UNIQUE INDEX identities_did ON identities(namespace, did); 4 | 5 | DROP INDEX verifiers_value; 6 | CREATE UNIQUE INDEX verifiers_value ON verifiers(namespace, vtype, value); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000047_add_token_uri_fields.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenbalance_pool; 2 | DROP INDEX tokenbalance_uri; 3 | 4 | ALTER TABLE tokenbalance DROP COLUMN uri; 5 | ALTER TABLE tokentransfer DROP COLUMN uri; 6 | 7 | CREATE UNIQUE INDEX tokenbalance_pool ON tokenbalance(key,pool_id,token_index); 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000100_allow_null_listener_location.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractlisteners RENAME COLUMN location TO location_old; 2 | ALTER TABLE contractlisteners ADD COLUMN location TEXT; 3 | UPDATE contractlisteners SET location = location_old; 4 | ALTER TABLE contractlisteners DROP COLUMN location_old; -------------------------------------------------------------------------------- /db/migrations/sqlite/000116_tx_type_not_null.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages RENAME COLUMN tx_parent_type TO tx_parent_type_temp; 2 | ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64); 3 | UPDATE messages SET tx_parent_type = tx_parent_type_temp; 4 | ALTER TABLE messages DROP COLUMN tx_parent_type_temp; -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/operationwithdetail_description.md: -------------------------------------------------------------------------------- 1 | Operation with detail is an extension to operations that allow additional information to be encapsulated with an operation. An operation 2 | can be supplemented by a connector and that information will be returned in the `detail` field. -------------------------------------------------------------------------------- /db/migrations/sqlite/000028_add_tokenpool_fields.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenpool_protocolid; 2 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(protocol_id); 3 | 4 | ALTER TABLE tokenpool DROP COLUMN connector; 5 | ALTER TABLE tokenpool DROP COLUMN symbol; 6 | ALTER TABLE tokenpool DROP COLUMN message_id; 7 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000074_add_event_and_listener_topic.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE events ADD COLUMN topic VARCHAR(64); 2 | ALTER TABLE contractlisteners ADD COLUMN topic VARCHAR(64); 3 | 4 | UPDATE events SET topic = ''; 5 | UPDATE contractlisteners SET topic = ''; 6 | 7 | CREATE INDEX events_topic ON events(topic); 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000078_add_nonce_author.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX nonces_context; 2 | DROP INDEX nonces_group; 3 | 4 | ALTER TABLE nonces RENAME COLUMN "context" TO "hash"; 5 | ALTER TABLE nonces DROP COLUMN "group_hash"; 6 | ALTER TABLE nonces DROP COLUMN "topic"; 7 | 8 | CREATE INDEX nonces_hash ON nonces(hash); 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000082_add_blockchainevent_protocolid_index.up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM blockchainevents WHERE seq NOT IN (SELECT MIN(seq) FROM blockchainevents GROUP BY namespace, listener_id, protocol_id); 2 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, listener_id, protocol_id); 3 | -------------------------------------------------------------------------------- /db/migrations/postgres/000033_add_token_connector_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokentransfer_protocolid; 3 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(protocol_id); 4 | 5 | ALTER TABLE tokenaccount DROP COLUMN connector; 6 | ALTER TABLE tokentransfer DROP COLUMN connector; 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000088_fix_token_protocolid_indexes.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_protocolid; 2 | DROP INDEX tokenapproval_protocolid; 3 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(pool_id, protocol_id); 4 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000020_create_messages_pending.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX messages_sortorder; 3 | ALTER TABLE messages DROP COLUMN pending; 4 | ALTER TABLE messages DROP COLUMN rejected; 5 | CREATE INDEX messages_created ON messages(created); 6 | CREATE INDEX messages_confirmed ON messages(confirmed); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000045_add_tokentransfer_messageid.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE tokentransfer ADD COLUMN message_id UUID; 4 | 5 | UPDATE tokentransfer SET message_id = message.id 6 | FROM (SELECT hash, id FROM messages) AS message 7 | WHERE tokentransfer.message_hash = message.hash; 8 | 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /smart_contracts/corda/cordapp_kat/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 05 12:10:21 EST 2021 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000055_add_blobs_size_and_name.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX data_blob_name; 3 | DROP INDEX data_blob_size; 4 | 5 | ALTER TABLE blobs DROP COLUMN size; 6 | ALTER TABLE data DROP COLUMN blob_name; 7 | ALTER TABLE data DROP COLUMN blob_size; 8 | ALTER TABLE data DROP COLUMN value_size; 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/postgres/000028_add_tokenpool_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenpool_protocolid; 3 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(protocol_id); 4 | 5 | ALTER TABLE tokenpool DROP COLUMN connector; 6 | ALTER TABLE tokenpool DROP COLUMN symbol; 7 | ALTER TABLE tokenpool DROP COLUMN message_id; 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/postgres/000082_add_blockchainevent_protocolid_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DELETE FROM blockchainevents WHERE seq NOT IN (SELECT MIN(seq) FROM blockchainevents GROUP BY namespace, listener_id, protocol_id); 3 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, listener_id, protocol_id); 4 | COMMIT; 5 | -------------------------------------------------------------------------------- /db/migrations/postgres/000092_add_pin_namespace.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE pins ADD COLUMN namespace VARCHAR(64); 3 | UPDATE pins SET namespace = 'ff_system'; 4 | ALTER TABLE pins ALTER COLUMN namespace SET NOT NULL; 5 | 6 | DROP INDEX pins_pin; 7 | CREATE UNIQUE INDEX pins_pin ON pins(namespace, hash, batch_id, idx); 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000030_create_key_fields.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE batches ADD COLUMN "key" VARCHAR(1024); 2 | UPDATE batches SET "key" = ''; 3 | 4 | ALTER TABLE messages ADD COLUMN "key" VARCHAR(1024); 5 | UPDATE messages SET "key" = ''; 6 | 7 | ALTER TABLE tokenpool ADD COLUMN "key" VARCHAR(1024); 8 | UPDATE tokenpool SET "key" = ''; 9 | -------------------------------------------------------------------------------- /smart_contracts/corda/cordapp_kat/kat-flows/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 05 12:10:21 EST 2021 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000047_add_token_uri_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenbalance_pool; 3 | DROP INDEX tokenbalance_uri; 4 | 5 | ALTER TABLE tokenbalance DROP COLUMN uri; 6 | ALTER TABLE tokentransfer DROP COLUMN uri; 7 | 8 | CREATE UNIQUE INDEX tokenbalance_pool ON tokenbalance(key,pool_id,token_index); 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000070_add_subscriptions_filters.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE subscriptions DROP COLUMN filters; 2 | ALTER TABLE subscriptions ADD COLUMN filter_events text; 3 | ALTER TABLE subscriptions ADD COLUMN filter_topics text; 4 | ALTER TABLE subscriptions ADD COLUMN filter_tag text; 5 | ALTER TABLE subscriptions ADD COLUMN filter_group text; -------------------------------------------------------------------------------- /smart_contracts/corda/cordapp_kat/kat-contracts/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 05 12:10:21 EST 2021 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000088_fix_token_protocolid_indexes.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenapproval_protocolid; 4 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(pool_id, protocol_id); 5 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 6 | COMMIT; 7 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000109_fix_tokentransfer_index.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_protocolid; 2 | DROP INDEX tokenapproval_protocolid; 3 | 4 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, connector, protocol_id); 5 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, connector, protocol_id); 6 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/namespace_description.md: -------------------------------------------------------------------------------- 1 | A namespace is a logical isolation domain for different applications, or tenants, that share the 2 | FireFly node. 3 | 4 | > Significant evolution of the Hyperledger FireFly namespace construct, is proposed under 5 | > [FIR-12](https://github.com/hyperledger/firefly-fir/pull/12) 6 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/solidity_firefly/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@hyperledger/firefly-contracts", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "test": "hardhat test --network hardhat" 6 | }, 7 | "devDependencies": { 8 | "@nomicfoundation/hardhat-toolbox": "^5.0.0", 9 | "typescript": "^5.4.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000106_add_message_transactions.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN tx_id UUID; 2 | UPDATE messages SET tx_id = batches.tx_id 3 | FROM batches WHERE messages.batch_id = batches.id AND messages.tx_id IS NULL; 4 | ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64); 5 | ALTER TABLE messages ADD COLUMN tx_parent_id UUID; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000077_add_transactions_id_index.up.sql: -------------------------------------------------------------------------------- 1 | -- We created an invalid index in versions v0.14.1 and earlier - replace it if it exists here 2 | -- We use an IF EXISTS here, as we no longer create the invalid index for new environments 3 | DROP INDEX IF EXISTS transactions_id; 4 | 5 | CREATE UNIQUE INDEX transactions_id ON transactions(id); 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000078_add_nonce_author.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX nonces_hash; 2 | 3 | ALTER TABLE nonces RENAME COLUMN "hash" TO "context"; 4 | ALTER TABLE nonces ADD COLUMN group_hash CHAR(64); 5 | ALTER TABLE nonces ADD COLUMN topic VARCHAR(64); 6 | 7 | CREATE INDEX nonces_context ON nonces(context); 8 | CREATE INDEX nonces_group ON nonces(group_hash); 9 | -------------------------------------------------------------------------------- /db/migrations/postgres/000078_add_nonce_author.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX nonces_context; 4 | DROP INDEX nonces_group; 5 | 6 | ALTER TABLE nonces RENAME COLUMN "context" TO "hash"; 7 | ALTER TABLE nonces DROP COLUMN "group_hash"; 8 | ALTER TABLE nonces DROP COLUMN "topic"; 9 | 10 | CREATE INDEX nonces_hash ON nonces(hash); 11 | 12 | COMMIT; 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000003_create_message_data_join_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE messages_data ( 2 | seq SERIAL PRIMARY KEY, 3 | message_id UUID NOT NULL, 4 | data_id UUID NOT NULL, 5 | data_hash CHAR(64) NOT NULL, 6 | data_idx INT NOT NULL 7 | ); 8 | CREATE UNIQUE INDEX messages_data_idx ON messages_data(message_id, data_id); 9 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/coverage 3 | **/.nyc_output 4 | **/.git* 5 | **/.vscode 6 | /smart_contracts/ethereum/solidity_firefly/artifacts 7 | /smart_contracts/ethereum/solidity_firefly/build 8 | /smart_contracts/ethereum/solidity_firefly/cache 9 | /firefly 10 | /firefly-nocgo 11 | /docs/vendor 12 | /docs/_site 13 | coverage.txt 14 | codecov.yml 15 | -------------------------------------------------------------------------------- /db/migrations/postgres/000109_fix_tokentransfer_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenapproval_protocolid; 4 | 5 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, connector, protocol_id); 6 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, connector, protocol_id); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000111_adjust_token_indexes.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenpool_locator; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenapproval_protocolid; 4 | 5 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, pool_id, protocol_id); 6 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, pool_id, protocol_id); 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000106_add_message_transactions.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ADD COLUMN tx_id UUID; 3 | UPDATE messages SET tx_id = batches.tx_id 4 | FROM batches WHERE messages.batch_id = batches.id AND messages.tx_id IS NULL; 5 | ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64); 6 | ALTER TABLE messages ADD COLUMN tx_parent_id UUID; 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000015_create_config_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE config ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | config_key VARCHAR(512) NOT NULL, 4 | config_value TEXT NOT NULL 5 | ); 6 | CREATE UNIQUE INDEX config_sequence ON config(seq); 7 | CREATE UNIQUE INDEX config_config_key ON config(config_key); 8 | 9 | -------------------------------------------------------------------------------- /db/migrations/postgres/000070_add_subscriptions_filters.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE subscriptions DROP COLUMN filters; 3 | ALTER TABLE subscriptions INSERT COLUMN filter_events text; 4 | ALTER TABLE subscriptions INSERT COLUMN filter_topics text; 5 | ALTER TABLE subscriptions INSERT COLUMN filter_tag text; 6 | ALTER TABLE subscriptions INSERT COLUMN filter_group text; 7 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000028_add_tokenpool_fields.up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM tokenpool; 2 | ALTER TABLE tokenpool ADD COLUMN connector VARCHAR(64) NOT NULL; 3 | ALTER TABLE tokenpool ADD COLUMN symbol VARCHAR(64); 4 | ALTER TABLE tokenpool ADD COLUMN message_id UUID; 5 | 6 | DROP INDEX tokenpool_protocolid; 7 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(connector,protocol_id); 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000101_add_idempotency_keys.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE transactions ADD COLUMN idempotency_key VARCHAR(256); 2 | ALTER TABLE messages ADD COLUMN idempotency_key VARCHAR(256); 3 | 4 | CREATE UNIQUE INDEX transactions_idempotency_keys ON transactions (namespace, idempotency_key); 5 | CREATE UNIQUE INDEX messages_idempotency_keys ON messages (namespace, idempotency_key); 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000077_add_transactions_id_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | -- We created an invalid index in versions v0.14.1 and earlier - replace it if it exists here 4 | -- We use an IF EXISTS here, as we no longer create the invalid index for new environments 5 | DROP INDEX IF EXISTS transactions_id; 6 | CREATE UNIQUE INDEX transactions_id ON transactions(id); 7 | 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000112_add_ffi_networkname.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE ffi ADD COLUMN published BOOLEAN DEFAULT false; 2 | UPDATE ffi SET published = true WHERE message_id IS NOT NULL; 3 | ALTER TABLE ffi ADD COLUMN network_name VARCHAR(64); 4 | UPDATE ffi SET network_name = name WHERE message_id IS NOT NULL; 5 | CREATE UNIQUE INDEX ffi_networkname ON ffi(namespace,network_name,version); 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | smart_contracts/ethereum/solidity_firefly/node_modules 2 | smart_contracts/ethereum/solidity_firefly/build 3 | utils/kat-client/node_modules 4 | **/*.jar 5 | /firefly 6 | /firefly-nocgo 7 | coverage.txt 8 | **/debug.test 9 | .DS_Store 10 | frontend 11 | __debug* 12 | !deploy/charts/firefly 13 | containerlogs 14 | .vscode/*.log 15 | .idea/ 16 | doc-site/site 17 | *.iml 18 | -------------------------------------------------------------------------------- /db/migrations/postgres/000003_create_message_data_join_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE messages_data ( 3 | seq SERIAL PRIMARY KEY, 4 | message_id UUID NOT NULL, 5 | data_id UUID NOT NULL, 6 | data_hash CHAR(64) NOT NULL, 7 | data_idx INT NOT NULL 8 | ); 9 | CREATE UNIQUE INDEX messages_data_idx ON messages_data(message_id, data_id); 10 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000015_create_config_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE config ( 3 | seq SERIAL PRIMARY KEY, 4 | config_key VARCHAR(512) NOT NULL, 5 | config_value TEXT NOT NULL 6 | ); 7 | CREATE UNIQUE INDEX config_sequence ON config(seq); 8 | CREATE UNIQUE INDEX config_config_key ON config(config_key); 9 | 10 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000047_add_token_uri_fields.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenbalance_pool; 2 | 3 | ALTER TABLE tokenbalance ADD COLUMN uri VARCHAR(1024); 4 | ALTER TABLE tokentransfer ADD COLUMN uri VARCHAR(1024); 5 | 6 | CREATE UNIQUE INDEX tokenbalance_pool ON tokenbalance(namespace,key,pool_id,token_index); 7 | CREATE UNIQUE INDEX tokenbalance_uri ON tokenbalance(namespace,key,pool_id,uri); 8 | -------------------------------------------------------------------------------- /doc-site/docs/overview/key_components/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Key Features 3 | --- 4 | 5 | ![Hyperledger FireFly features](../../images/firefly_functionality_overview.png) 6 | 7 | Hyperledger FireFly provides a rich suite of features for building new applications, and connecting 8 | existing Web3 ecosystems to your business. In this section we introduce each core pillar of functionality. 9 | -------------------------------------------------------------------------------- /db/migrations/postgres/000111_adjust_token_indexes.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenpool_locator; 3 | DROP INDEX tokentransfer_protocolid; 4 | DROP INDEX tokenapproval_protocolid; 5 | 6 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, pool_id, protocol_id); 7 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, pool_id, protocol_id); 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000022_create_blobs_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE blobs ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | hash CHAR(64) NOT NULL, 4 | payload_ref VARCHAR(1024) NOT NULL, 5 | created BIGINT NOT NULL, 6 | peer VARCHAR(256) NOT NULL 7 | ); 8 | 9 | CREATE INDEX blobs_hash ON blobs(hash); 10 | 11 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000116_tx_type_not_null.up.sql: -------------------------------------------------------------------------------- 1 | UPDATE messages SET tx_parent_type = '' WHERE tx_parent_type IS NULL; 2 | ALTER TABLE messages RENAME COLUMN tx_parent_type TO tx_parent_type_temp; 3 | ALTER TABLE messages ADD COLUMN tx_parent_type VARCHAR(64) DEFAULT '' NOT NULL; 4 | UPDATE messages SET tx_parent_type = tx_parent_type_temp; 5 | ALTER TABLE messages DROP COLUMN tx_parent_type_temp; -------------------------------------------------------------------------------- /db/migrations/postgres/000022_create_blobs_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE blobs ( 3 | seq SERIAL PRIMARY KEY, 4 | hash CHAR(64) NOT NULL, 5 | payload_ref VARCHAR(1024) NOT NULL, 6 | created BIGINT NOT NULL, 7 | peer VARCHAR(256) NOT NULL 8 | ); 9 | 10 | CREATE INDEX blobs_hash ON blobs(hash); 11 | 12 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000078_add_nonce_author.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX nonces_hash; 4 | 5 | ALTER TABLE nonces RENAME COLUMN "hash" TO "context"; 6 | ALTER TABLE nonces ADD COLUMN group_hash CHAR(64); 7 | ALTER TABLE nonces ADD COLUMN topic VARCHAR(64); 8 | 9 | CREATE INDEX nonces_context ON nonces(context); 10 | CREATE INDEX nonces_group ON nonces(group_hash); 11 | 12 | COMMIT; 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000019_create_nextpins_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE nextpins ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | context CHAR(64) NOT NULL, 4 | identity VARCHAR(1024) NOT NULL, 5 | hash CHAR(64) NOT NULL, 6 | nonce BIGINT NOT NULL 7 | ); 8 | 9 | CREATE INDEX nextpins_hash ON nextpins(hash); 10 | 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000101_add_idempotency_keys.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE transactions ADD COLUMN idempotency_key VARCHAR(256); 4 | ALTER TABLE messages ADD COLUMN idempotency_key VARCHAR(256); 5 | 6 | CREATE UNIQUE INDEX transactions_idempotency_keys ON transactions (namespace, idempotency_key); 7 | CREATE UNIQUE INDEX messages_idempotency_keys ON messages (namespace, idempotency_key); 8 | 9 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000112_add_ffi_networkname.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE ffi ADD COLUMN published BOOLEAN DEFAULT false; 3 | UPDATE ffi SET published = true WHERE message_id IS NOT NULL; 4 | ALTER TABLE ffi ADD COLUMN network_name VARCHAR(64); 5 | UPDATE ffi SET network_name = name WHERE message_id IS NOT NULL; 6 | CREATE UNIQUE INDEX ffi_networkname ON ffi(namespace,network_name,version); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000017_create_members_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE members ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | group_hash CHAR(64) NOT NULL, 4 | idx INT NOT NULL, 5 | identity VARCHAR(1024) NOT NULL, 6 | node_id UUID NOT NULL 7 | ); 8 | 9 | CREATE INDEX members_group ON members(group_hash); 10 | 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000017_create_members_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE members ( 3 | seq SERIAL PRIMARY KEY, 4 | group_hash CHAR(64) NOT NULL, 5 | idx INT NOT NULL, 6 | identity VARCHAR(1024) NOT NULL, 7 | node_id UUID NOT NULL 8 | ); 9 | 10 | CREATE INDEX members_group ON members(group_hash); 11 | 12 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000019_create_nextpins_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE nextpins ( 3 | seq SERIAL PRIMARY KEY, 4 | context CHAR(64) NOT NULL, 5 | identity VARCHAR(1024) NOT NULL, 6 | hash CHAR(64) NOT NULL, 7 | nonce BIGINT NOT NULL 8 | ); 9 | 10 | CREATE INDEX nextpins_hash ON nextpins(hash); 11 | 12 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000028_add_tokenpool_fields.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DELETE FROM tokenpool; 3 | ALTER TABLE tokenpool ADD COLUMN connector VARCHAR(64) NOT NULL; 4 | ALTER TABLE tokenpool ADD COLUMN symbol VARCHAR(64); 5 | ALTER TABLE tokenpool ADD COLUMN message_id UUID; 6 | 7 | DROP INDEX tokenpool_protocolid; 8 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(connector,protocol_id); 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/postgres/000040_add_messages_state.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ADD COLUMN local BOOLEAN; 3 | ALTER TABLE messages ADD COLUMN rejected BOOLEAN; 4 | UPDATE messages SET rejected=true WHERE state="rejected"; 5 | 6 | ALTER TABLE messages DROP COLUMN state; 7 | ALTER TABLE messages ALTER COLUMN local SET NOT NULL; 8 | ALTER TABLE messages ALTER COLUMN rejected SET NOT NULL; 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000111_adjust_token_indexes.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_protocolid; 2 | DROP INDEX tokenapproval_protocolid; 3 | 4 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, connector, protocol_id); 5 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, connector, protocol_id); 6 | CREATE INDEX tokenpool_locator ON tokenpool(namespace, connector, locator); 7 | -------------------------------------------------------------------------------- /db/migrations/postgres/000047_add_token_uri_fields.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenbalance_pool; 3 | 4 | ALTER TABLE tokenbalance ADD COLUMN uri VARCHAR(1024); 5 | ALTER TABLE tokentransfer ADD COLUMN uri VARCHAR(1024); 6 | 7 | CREATE UNIQUE INDEX tokenbalance_pool ON tokenbalance(namespace,key,pool_id,token_index); 8 | CREATE UNIQUE INDEX tokenbalance_uri ON tokenbalance(namespace,key,pool_id,uri); 9 | COMMIT; 10 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000016_create_groups_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE groups ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | message_id UUID, 4 | name VARCHAR(64) NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | hash CHAR(64) NOT NULL, 7 | created BIGINT NOT NULL 8 | ); 9 | 10 | CREATE UNIQUE INDEX groups_hash ON groups(hash); 11 | 12 | -------------------------------------------------------------------------------- /db/migrations/postgres/000016_create_groups_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE groups ( 3 | seq SERIAL PRIMARY KEY, 4 | message_id UUID, 5 | name VARCHAR(64) NOT NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | hash CHAR(64) NOT NULL, 8 | created BIGINT NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX groups_hash ON groups(hash); 12 | 13 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000040_add_messages_state.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN state VARCHAR(64); 2 | UPDATE messages SET state="pending" WHERE confirmed IS NULL; 3 | UPDATE messages SET state="confirmed" WHERE confirmed IS NOT NULL AND rejected=false; 4 | UPDATE messages SET state="rejected" WHERE confirmed IS NOT NULL AND rejected=true; 5 | 6 | ALTER TABLE messages DROP COLUMN local; 7 | ALTER TABLE messages DROP COLUMN rejected; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000113_add_contract_api_networkname.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE contractapis ADD COLUMN published BOOLEAN DEFAULT false; 2 | UPDATE contractapis SET published = true WHERE message_id IS NOT NULL; 3 | ALTER TABLE contractapis ADD COLUMN network_name VARCHAR(64); 4 | UPDATE contractapis SET network_name = name WHERE message_id IS NOT NULL; 5 | CREATE UNIQUE INDEX contractapis_networkname ON contractapis(namespace,network_name); 6 | -------------------------------------------------------------------------------- /db/migrations/postgres/000111_adjust_token_indexes.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenapproval_protocolid; 4 | 5 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(namespace, connector, protocol_id); 6 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(namespace, connector, protocol_id); 7 | CREATE INDEX tokenpool_locator ON tokenpool(namespace, connector, locator); 8 | COMMIT; 9 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/custompin_sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample-custompin-contract", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "test": "hardhat test --network hardhat" 6 | }, 7 | "devDependencies": { 8 | "@nomicfoundation/hardhat-toolbox": "^5.0.0", 9 | "typescript": "^5.4.2" 10 | }, 11 | "dependencies": { 12 | "@hyperledger/firefly-contracts": "file:../solidity_firefly" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000018_create_nonces_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE nonces ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | context CHAR(64) NOT NULL, 4 | nonce BIGINT NOT NULL, 5 | group_hash CHAR(64) NOT NULL, 6 | topic VARCHAR(64) NOT NULL 7 | ); 8 | 9 | CREATE INDEX nonces_context ON nonces(context); 10 | CREATE INDEX nonces_group ON nonces(group_hash); 11 | 12 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/solidity_firefly/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "outDir": "dist", 8 | "declaration": true, 9 | "skipLibCheck": true 10 | }, 11 | "include": [ 12 | "./scripts", 13 | "./test", 14 | "./typechain-types" 15 | ], 16 | "files": [ 17 | "./hardhat.config.ts" 18 | ] 19 | } -------------------------------------------------------------------------------- /db/migrations/postgres/000018_create_nonces_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE nonces ( 3 | seq SERIAL PRIMARY KEY, 4 | context CHAR(64) NOT NULL, 5 | nonce BIGINT NOT NULL, 6 | group_hash CHAR(64) NOT NULL, 7 | topic VARCHAR(64) NOT NULL 8 | ); 9 | 10 | CREATE INDEX nonces_context ON nonces(context); 11 | CREATE INDEX nonces_group ON nonces(group_hash); 12 | 13 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000113_add_contract_api_networkname.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE contractapis ADD COLUMN published BOOLEAN DEFAULT false; 3 | UPDATE contractapis SET published = true WHERE message_id IS NOT NULL; 4 | ALTER TABLE contractapis ADD COLUMN network_name VARCHAR(64); 5 | UPDATE contractapis SET network_name = name WHERE message_id IS NOT NULL; 6 | CREATE UNIQUE INDEX contractapis_networkname ON contractapis(namespace,network_name); 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000055_add_blobs_size_and_name.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE blobs ADD size BIGINT; 2 | 3 | ALTER TABLE data ADD blob_name VARCHAR(1024); 4 | ALTER TABLE data ADD blob_size BIGINT; 5 | ALTER TABLE data ADD COLUMN value_size BIGINT; 6 | 7 | UPDATE blobs SET size = 0; 8 | UPDATE data SET blob_size = 0, blob_name = '', value_size = 0; 9 | 10 | CREATE INDEX data_blob_name ON data(blob_name); 11 | CREATE INDEX data_blob_size ON data(blob_size); 12 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000081_rename_tokens_protocolid.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_subject; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenpool_locator; 4 | 5 | ALTER TABLE tokenapproval DROP COLUMN subject; 6 | ALTER TABLE tokenpool RENAME COLUMN locator TO protocol_id; 7 | 8 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(connector, protocol_id); 9 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(connector, protocol_id); 10 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000011_create_events_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE events ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | etype VARCHAR(64) NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | ref UUID, 7 | created BIGINT NOT NULL 8 | ); 9 | 10 | CREATE UNIQUE INDEX events_id ON events(id); 11 | CREATE INDEX events_created ON events(created); 12 | 13 | -------------------------------------------------------------------------------- /db/migrations/postgres/000011_create_events_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE events ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | etype VARCHAR(64) NOT NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | ref UUID, 8 | created BIGINT NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX events_id ON events(id); 12 | CREATE INDEX events_created ON events(created); 13 | 14 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000074_add_event_and_listener_topic.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE events ADD COLUMN topic VARCHAR(64); 4 | ALTER TABLE contractlisteners ADD COLUMN topic VARCHAR(64); 5 | 6 | UPDATE events SET topic = ''; 7 | UPDATE contractlisteners SET topic = ''; 8 | 9 | ALTER TABLE events ALTER COLUMN topic SET NOT NULL; 10 | ALTER TABLE contractlisteners ALTER COLUMN topic SET NOT NULL; 11 | 12 | CREATE INDEX events_topic ON events(topic); 13 | 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000032_create_tokenaccount_table.up.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS tokenaccount; 2 | 3 | CREATE TABLE tokenaccount ( 4 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 5 | pool_protocol_id VARCHAR(1024) NOT NULL, 6 | token_index VARCHAR(1024), 7 | identity VARCHAR(1024) NOT NULL, 8 | balance VARCHAR(65) 9 | ); 10 | 11 | CREATE UNIQUE INDEX tokenaccount_pool ON tokenaccount(identity,pool_protocol_id,token_index); 12 | -------------------------------------------------------------------------------- /db/migrations/postgres/000052_create_contractapis_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE contractapis ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | interface_id UUID NOT NULL, 6 | location TEXT, 7 | name VARCHAR(64) NOT NULL, 8 | namespace VARCHAR(64) NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX contractapis_namespace_name ON contractapis(namespace,name); 12 | COMMIT; -------------------------------------------------------------------------------- /smart_contracts/ethereum/custompin_sample/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "outDir": "dist", 8 | "declaration": true, 9 | "skipLibCheck": true, 10 | "resolveJsonModule": true 11 | }, 12 | "include": [ 13 | "./scripts", 14 | "./test", 15 | "./typechain-types" 16 | ], 17 | "files": [ 18 | "./hardhat.config.ts" 19 | ] 20 | } -------------------------------------------------------------------------------- /db/migrations/sqlite/000007_create_offsets_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE offsets ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | otype VARCHAR(64) NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | name VARCHAR(64) NOT NULL, 7 | current BIGINT NOT NULL 8 | ); 9 | CREATE UNIQUE INDEX offsets_id ON offsets(id); 10 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,namespace,name); 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000007_create_offsets_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE offsets ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | otype VARCHAR(64) NOT NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | name VARCHAR(64) NOT NULL, 8 | current BIGINT NOT NULL 9 | ); 10 | CREATE UNIQUE INDEX offsets_id ON offsets(id); 11 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,namespace,name); 12 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000081_rename_tokens_protocolid.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenapproval_subject; 3 | DROP INDEX tokentransfer_protocolid; 4 | DROP INDEX tokenpool_locator; 5 | 6 | ALTER TABLE tokenapproval DROP COLUMN subject; 7 | ALTER TABLE tokenpool RENAME COLUMN locator TO protocol_id; 8 | 9 | CREATE UNIQUE INDEX tokenpool_protocolid ON tokenpool(connector, protocol_id); 10 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(connector, protocol_id); 11 | COMMIT; 12 | -------------------------------------------------------------------------------- /db/migrations/postgres/000032_create_tokenaccount_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP TABLE IF EXISTS tokenaccount; 3 | 4 | CREATE TABLE tokenaccount ( 5 | seq SERIAL PRIMARY KEY, 6 | pool_protocol_id VARCHAR(1024) NOT NULL, 7 | token_index VARCHAR(1024), 8 | identity VARCHAR(1024) NOT NULL, 9 | balance VARCHAR(65) 10 | ); 11 | 12 | CREATE UNIQUE INDEX tokenaccount_pool ON tokenaccount(identity,pool_protocol_id,token_index); 13 | 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000070_add_subscriptions_filters.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE subscriptions ADD COLUMN filters TEXT; 2 | UPDATE subscriptions SET filters='{"events":"' || filter_events || '","message":{"topics":"' || filter_topics || '","tag":"' || filter_tag || '","group":"' || filter_group || '"}}'; 3 | ALTER TABLE subscriptions DROP COLUMN filter_events; 4 | ALTER TABLE subscriptions DROP COLUMN filter_topics; 5 | ALTER TABLE subscriptions DROP COLUMN filter_tag; 6 | ALTER TABLE subscriptions DROP COLUMN filter_group; -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/fftime_description.md: -------------------------------------------------------------------------------- 1 | Times are serialized to JSON on the API in RFC 3339 / ISO 8601 nanosecond UTC time 2 | for example `2022-05-05T21:19:27.454767543Z`. 3 | 4 | Note that JavaScript can parse this format happily into millisecond time with `Date.parse()`. 5 | 6 | Times are persisted as a nanosecond resolution timestamps in the database. 7 | 8 | On input, and in queries, times can be parsed from RFC3339, or unix timestamps 9 | (second, millisecond or nanosecond resolution). -------------------------------------------------------------------------------- /db/migrations/sqlite/000023_alter_subscriptions_offsets.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE subscriptions ADD updated BIGINT; 2 | 3 | -- We change the primary key by which we access the data, so truncate the table 4 | -- Meaning offsets for subscriptions will be reset going up 5 | DELETE FROM offsets; 6 | 7 | DROP INDEX offsets_id; 8 | DROP INDEX offsets_unique; 9 | 10 | ALTER TABLE offsets DROP COLUMN namespace; 11 | ALTER TABLE offsets DROP COLUMN id; 12 | 13 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,name); 14 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000009_create_namespaces_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE namespaces ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | message_id UUID, 5 | name VARCHAR(64) NOT NULL, 6 | ntype VARCHAR(64) NOT NULL, 7 | description VARCHAR(4096), 8 | created BIGINT NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX namespaces_id ON operations(id); 12 | CREATE UNIQUE INDEX namespaces_name ON namespaces(name); 13 | 14 | -------------------------------------------------------------------------------- /db/migrations/postgres/000009_create_namespaces_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE namespaces ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | message_id UUID, 6 | name VARCHAR(64) NOT NULL, 7 | ntype VARCHAR(64) NOT NULL, 8 | description VARCHAR(4096), 9 | created BIGINT NOT NULL 10 | ); 11 | 12 | CREATE UNIQUE INDEX namespaces_id ON operations(id); 13 | CREATE UNIQUE INDEX namespaces_name ON namespaces(name); 14 | 15 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000040_add_messages_state.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages ADD COLUMN state VARCHAR(64); 3 | UPDATE messages SET state='pending' WHERE confirmed IS NULL; 4 | UPDATE messages SET state='confirmed' WHERE confirmed IS NOT NULL AND rejected=false; 5 | UPDATE messages SET state='rejected' WHERE confirmed IS NOT NULL AND rejected=true; 6 | 7 | ALTER TABLE messages DROP COLUMN local; 8 | ALTER TABLE messages DROP COLUMN rejected; 9 | ALTER TABLE messages ALTER COLUMN state SET NOT NULL; 10 | COMMIT; 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000030_create_key_fields.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE batches ADD "key" VARCHAR(1024); 4 | UPDATE batches SET "key" = ''; 5 | ALTER TABLE batches ALTER COLUMN "key" SET NOT NULL; 6 | 7 | ALTER TABLE messages ADD "key" VARCHAR(1024); 8 | UPDATE messages SET "key" = ''; 9 | ALTER TABLE messages ALTER COLUMN "key" SET NOT NULL; 10 | 11 | ALTER TABLE tokenpool ADD "key" VARCHAR(1024); 12 | UPDATE tokenpool SET "key" = ''; 13 | ALTER TABLE tokenpool ALTER COLUMN "key" SET NOT NULL; 14 | 15 | COMMIT; 16 | -------------------------------------------------------------------------------- /db/migrations/postgres/000070_add_subscriptions_filters.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE subscriptions ADD COLUMN filters TEXT; 3 | UPDATE subscriptions SET filters='{"events":"' || filter_events || '","message":{"topics":"' || filter_topics || '","tag":"' || filter_tag || '","group":"' || filter_group || '"}}'; 4 | ALTER TABLE subscriptions DROP COLUMN filter_events; 5 | ALTER TABLE subscriptions DROP COLUMN filter_topics; 6 | ALTER TABLE subscriptions DROP COLUMN filter_tag; 7 | ALTER TABLE subscriptions DROP COLUMN filter_group; 8 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000052_create_contractapis_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE contractapis ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | interface_id UUID NOT NULL, 5 | location TEXT, 6 | name VARCHAR(64) NOT NULL, 7 | namespace VARCHAR(64) NOT NULL, 8 | message_id UUID NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX contractapis_namespace_name ON contractapis(namespace,name); 12 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/simpletypes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Simple Types 3 | --- 4 | ## UUID 5 | 6 | {% include-markdown "./_includes/uuid_description.md" %} 7 | 8 | ## FFTime 9 | 10 | {% include-markdown "./_includes/fftime_description.md" %} 11 | 12 | ## FFBigInt 13 | 14 | {% include-markdown "./_includes/ffbigint_description.md" %} 15 | 16 | ## JSONAny 17 | 18 | {% include-markdown "./_includes/jsonany_description.md" %} 19 | 20 | ## JSONObject 21 | 22 | {% include-markdown "./_includes/jsonobject_description.md" %} 23 | 24 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000110_add_tokenpool_networkname.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenpool ADD COLUMN published BOOLEAN DEFAULT false; 2 | UPDATE tokenpool SET published = true WHERE message_id IS NOT NULL; 3 | 4 | ALTER TABLE tokenpool ADD COLUMN network_name VARCHAR(64); 5 | UPDATE tokenpool SET network_name = name WHERE message_id IS NOT NULL; 6 | 7 | ALTER TABLE tokenpool ADD COLUMN plugin_data TEXT; 8 | UPDATE tokenpool SET plugin_data = namespace; 9 | 10 | CREATE UNIQUE INDEX tokenpool_networkname ON tokenpool(namespace,network_name); 11 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/nextpin_description.md: -------------------------------------------------------------------------------- 1 | Next-pins are maintained by each member of a privacy group, in order to detect if a on-chain transaction with a 2 | given "pin" for a message represents the next message for any member of the privacy group. 3 | 4 | This allows every member to maintain a global order of transactions within a `topic` in a privacy group, without 5 | leaking the same hash between the messages that are communicated in that group. 6 | 7 | > See [Group](./group.md) for more information on privacy groups. 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000023_alter_subscriptions_offsets.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE subscriptions ADD updated BIGINT; 4 | 5 | -- We change the primary key by which we access the data, so truncate the table 6 | -- Meaning offsets for subscriptions will be reset going up 7 | DELETE FROM offsets; 8 | 9 | DROP INDEX offsets_id; 10 | DROP INDEX offsets_unique; 11 | 12 | ALTER TABLE offsets DROP COLUMN namespace; 13 | ALTER TABLE offsets DROP COLUMN id; 14 | 15 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,name); 16 | 17 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000099_fix_blockchainevent_protocolid_index.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX blockchainevents_protocolid; 2 | DELETE FROM blockchainevents WHERE listener_id IS NULL AND seq NOT IN ( 3 | SELECT MIN(seq) FROM blockchainevents WHERE listener_id IS NULL GROUP BY namespace, protocol_id); 4 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, protocol_id) WHERE listener_id IS NULL; 5 | CREATE UNIQUE INDEX blockchainevents_listener_protocolid ON blockchainevents(namespace, listener_id, protocol_id) WHERE listener_id IS NOT NULL; 6 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000012_create_pins_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE pins ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | masked BOOLEAN NOT NULL, 4 | hash CHAR(64) NOT NULL, 5 | batch_id UUID NOT NULL, 6 | idx BIGINT NOT NULL, 7 | dispatched BOOLEAN NOT NULL, 8 | created BIGINT NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX pins_pin ON pins(hash, batch_id, idx); 12 | CREATE INDEX pins_dispatched ON pins(dispatched); 13 | 14 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000049_create_ffi_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE ffi ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | namespace VARCHAR(64) NOT NULL, 5 | name VARCHAR(1024) NOT NULL, 6 | version VARCHAR(64) NOT NULL, 7 | description TEXT NOT NULL, 8 | message_id UUID NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX ffi_id ON ffi(id); 12 | CREATE UNIQUE INDEX ffi_name ON ffi(namespace,name,version); 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000089_fix_tokenapproval_poolid_type.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_protocolid; 2 | DROP INDEX tokenapproval_subject; 3 | 4 | ALTER TABLE tokenapproval RENAME COLUMN pool_id TO pool_id_old; 5 | ALTER TABLE tokenapproval ADD COLUMN pool_id UUID; 6 | UPDATE tokenapproval SET pool_id = CAST(pool_id_old AS UUID); 7 | ALTER TABLE tokenapproval DROP COLUMN pool_id_old; 8 | 9 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 10 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000012_create_pins_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE pins ( 3 | seq SERIAL PRIMARY KEY, 4 | masked BOOLEAN NOT NULL, 5 | hash CHAR(64) NOT NULL, 6 | batch_id UUID NOT NULL, 7 | idx BIGINT NOT NULL, 8 | dispatched BOOLEAN NOT NULL, 9 | created BIGINT NOT NULL 10 | ); 11 | 12 | CREATE UNIQUE INDEX pins_pin ON pins(hash, batch_id, idx); 13 | CREATE INDEX pins_dispatched ON pins(dispatched); 14 | 15 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000038_add_token_namespace_fields.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount ADD COLUMN namespace VARCHAR(64); 2 | ALTER TABLE tokentransfer ADD COLUMN namespace VARCHAR(64); 3 | 4 | UPDATE tokenaccount SET namespace = pool.namespace 5 | FROM (SELECT protocol_id, namespace FROM tokenpool) AS pool 6 | WHERE tokenaccount.pool_protocol_id = pool.protocol_id; 7 | 8 | UPDATE tokentransfer SET namespace = pool.namespace 9 | FROM (SELECT protocol_id, namespace FROM tokenpool) AS pool 10 | WHERE tokentransfer.pool_protocol_id = pool.protocol_id; 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000049_create_ffi_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE ffi ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | name VARCHAR(1024) NOT NULL, 7 | version VARCHAR(64) NOT NULL, 8 | description TEXT NOT NULL, 9 | message_id UUID NOT NULL 10 | ); 11 | 12 | CREATE UNIQUE INDEX ffi_id ON ffi(id); 13 | CREATE UNIQUE INDEX ffi_name ON ffi(namespace,name,version); 14 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000110_add_tokenpool_networkname.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenpool ADD COLUMN published BOOLEAN DEFAULT false; 3 | UPDATE tokenpool SET published = true WHERE message_id IS NOT NULL; 4 | 5 | ALTER TABLE tokenpool ADD COLUMN network_name VARCHAR(64); 6 | UPDATE tokenpool SET network_name = name WHERE message_id IS NOT NULL; 7 | 8 | ALTER TABLE tokenpool ADD COLUMN plugin_data TEXT; 9 | UPDATE tokenpool SET plugin_data = namespace; 10 | 11 | CREATE UNIQUE INDEX tokenpool_networkname ON tokenpool(namespace,network_name); 12 | COMMIT; 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000095_change_namespace_fields.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages DROP COLUMN namespace_local; 2 | ALTER TABLE groups DROP COLUMN namespace_local; 3 | 4 | ALTER TABLE namespaces ADD COLUMN id UUID; 5 | ALTER TABLE namespaces ADD COLUMN message_id UUID; 6 | ALTER TABLE namespaces ADD COLUMN ntype VARCHAR(64); 7 | ALTER TABLE namespaces DROP COLUMN remote_name; 8 | 9 | DROP INDEX transactions_id; 10 | CREATE UNIQUE INDEX transactions_id ON transactions(id); 11 | DROP INDEX operations_id; 12 | CREATE UNIQUE INDEX operations_id ON operations(id); 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000023_alter_subscriptions_offsets.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE subscriptions DROP COLUMN updated; 2 | 3 | -- We change the primary key by which we access the data, so truncate the table 4 | -- Meaning offsets for subscriptions will be reset going down 5 | DELETE FROM offsets; 6 | 7 | DROP INDEX offsets_unique; 8 | 9 | ALTER TABLE offsets ADD id UUID NOT NULL; 10 | ALTER TABLE offsets ADD namespace VARCHAR(64) NOT NULL; 11 | 12 | CREATE UNIQUE INDEX offsets_id ON offsets(id); 13 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,namespace,name); 14 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000089_fix_tokenapproval_poolid_type.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokenapproval_protocolid; 2 | DROP INDEX tokenapproval_subject; 3 | 4 | ALTER TABLE tokenapproval RENAME COLUMN pool_id TO pool_id_old; 5 | ALTER TABLE tokenapproval ADD COLUMN pool_id VARCHAR(1024); 6 | UPDATE tokenapproval SET pool_id = CAST(pool_id_old AS VARCHAR); 7 | ALTER TABLE tokenapproval DROP COLUMN pool_id_old; 8 | 9 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 10 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 11 | -------------------------------------------------------------------------------- /db/migrations/postgres/000099_fix_blockchainevent_protocolid_index.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX blockchainevents_protocolid; 3 | DELETE FROM blockchainevents WHERE listener_id IS NULL AND seq NOT IN ( 4 | SELECT MIN(seq) FROM blockchainevents WHERE listener_id IS NULL GROUP BY namespace, protocol_id); 5 | CREATE UNIQUE INDEX blockchainevents_protocolid ON blockchainevents(namespace, protocol_id) WHERE listener_id IS NULL; 6 | CREATE UNIQUE INDEX blockchainevents_listener_protocolid ON blockchainevents(namespace, listener_id, protocol_id) WHERE listener_id IS NOT NULL; 7 | COMMIT; 8 | -------------------------------------------------------------------------------- /db/migrations/postgres/000089_fix_tokenapproval_poolid_type.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenapproval_protocolid; 3 | DROP INDEX tokenapproval_subject; 4 | 5 | ALTER TABLE tokenapproval RENAME COLUMN pool_id TO pool_id_old; 6 | ALTER TABLE tokenapproval ADD COLUMN pool_id UUID; 7 | UPDATE tokenapproval SET pool_id = CAST(pool_id_old AS UUID); 8 | ALTER TABLE tokenapproval DROP COLUMN pool_id_old; 9 | 10 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 11 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 12 | COMMIT; 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000056_refactor_transactions_columns.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX transactions_protocol_id; 2 | DROP INDEX transactions_ref; 3 | 4 | ALTER TABLE transactions DROP COLUMN ref; 5 | ALTER TABLE transactions DROP COLUMN signer; 6 | ALTER TABLE transactions DROP COLUMN hash; 7 | ALTER TABLE transactions DROP COLUMN protocol_id; 8 | ALTER TABLE transactions DROP COLUMN info; 9 | ALTER TABLE transactions DROP COLUMN status; 10 | 11 | ALTER TABLE transactions ADD COLUMN blockchain_ids VARCHAR(1024); 12 | CREATE INDEX transactions_blockchain_ids ON transactions(blockchain_ids); 13 | -------------------------------------------------------------------------------- /db/migrations/postgres/000095_change_namespace_fields.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE messages DROP COLUMN namespace_local; 3 | ALTER TABLE groups DROP COLUMN namespace_local; 4 | 5 | ALTER TABLE namespaces ADD COLUMN id UUID; 6 | ALTER TABLE namespaces ADD COLUMN message_id UUID; 7 | ALTER TABLE namespaces ADD COLUMN ntype VARCHAR(64); 8 | ALTER TABLE namespaces DROP COLUMN remote_name; 9 | 10 | DROP INDEX transactions_id; 11 | CREATE UNIQUE INDEX transactions_id ON transactions(id); 12 | DROP INDEX operations_id; 13 | CREATE UNIQUE INDEX operations_id ON operations(id); 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000051_create_ffi_events_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE ffievents ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | interface_id UUID NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | name VARCHAR(1024) NOT NULL, 7 | pathname VARCHAR(1024) NOT NULL, 8 | description TEXT NOT NULL, 9 | params TEXT NOT NULL 10 | ); 11 | 12 | CREATE UNIQUE INDEX ffievents_pathname ON ffievents(interface_id,pathname); 13 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000103_create_ffi_errors_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE ffierrors ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | interface_id UUID NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | name VARCHAR(1024) NOT NULL, 7 | pathname VARCHAR(1024) NOT NULL, 8 | description TEXT NOT NULL, 9 | params TEXT NOT NULL 10 | ); 11 | 12 | CREATE UNIQUE INDEX ffierrors_pathname ON ffierrors(interface_id,pathname); 13 | -------------------------------------------------------------------------------- /test/data/config/firefly.core.yaml: -------------------------------------------------------------------------------- 1 | # Example YAML file for testing commandline startup 2 | debug: 3 | port: 0 4 | http: 5 | port: 0 6 | metrics: 7 | port: 0 8 | node: 9 | identity: 0x91d2b4381a4cd5c7c0f27565a7d4b829844c8635 10 | blockchain: 11 | type: utdbql 12 | utdbql: 13 | url: memory:// 14 | database: 15 | type: ql 16 | ql: 17 | url: memory:// 18 | sharedstorage: 19 | type: ipfs 20 | ipfs: 21 | api: 22 | url: http://localhost:8080 23 | gateway: 24 | url: http://localhost:8080 25 | tokens: 26 | - name: erc1155 27 | connector: https 28 | -------------------------------------------------------------------------------- /db/migrations/postgres/000038_add_token_namespace_fields.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE tokenaccount ADD COLUMN namespace VARCHAR(64); 3 | ALTER TABLE tokentransfer ADD COLUMN namespace VARCHAR(64); 4 | 5 | UPDATE tokenaccount SET namespace = pool.namespace 6 | FROM (SELECT protocol_id, namespace FROM tokenpool) AS pool 7 | WHERE tokenaccount.pool_protocol_id = pool.protocol_id; 8 | 9 | UPDATE tokentransfer SET namespace = pool.namespace 10 | FROM (SELECT protocol_id, namespace FROM tokenpool) AS pool 11 | WHERE tokentransfer.pool_protocol_id = pool.protocol_id; 12 | 13 | COMMIT; 14 | -------------------------------------------------------------------------------- /db/migrations/postgres/000051_create_ffi_events_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE ffievents ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | interface_id UUID NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | name VARCHAR(1024) NOT NULL, 8 | pathname VARCHAR(1024) NOT NULL, 9 | description TEXT NOT NULL, 10 | params TEXT NOT NULL 11 | ); 12 | 13 | CREATE UNIQUE INDEX ffievents_pathname ON ffievents(interface_id,pathname); 14 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000089_fix_tokenapproval_poolid_type.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokenapproval_protocolid; 3 | DROP INDEX tokenapproval_subject; 4 | 5 | ALTER TABLE tokenapproval RENAME COLUMN pool_id TO pool_id_old; 6 | ALTER TABLE tokenapproval ADD COLUMN pool_id VARCHAR(1024); 7 | UPDATE tokenapproval SET pool_id = CAST(pool_id_old AS VARCHAR); 8 | ALTER TABLE tokenapproval DROP COLUMN pool_id_old; 9 | 10 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(pool_id, protocol_id); 11 | CREATE INDEX tokenapproval_subject ON tokenapproval(pool_id, subject); 12 | COMMIT; 13 | -------------------------------------------------------------------------------- /db/migrations/postgres/000103_create_ffi_errors_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE ffierrors ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | interface_id UUID NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | name VARCHAR(1024) NOT NULL, 8 | pathname VARCHAR(1024) NOT NULL, 9 | description TEXT NOT NULL, 10 | params TEXT NOT NULL 11 | ); 12 | 13 | CREATE UNIQUE INDEX ffierrors_pathname ON ffierrors(interface_id,pathname); 14 | COMMIT; -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/wsstart_description.md: -------------------------------------------------------------------------------- 1 | The `start` payload is sent after an application connects to a WebSocket, to start 2 | delivery of events over that connection. 3 | 4 | The start command can refer to a subscription by name in order to reliably receive all matching 5 | events for that subscription, including those that were emitted when the application 6 | was disconnected. 7 | 8 | Alternatively the start command can request `"ephemeral": true` in order to dynamically create a new 9 | subscription that lasts only for the duration that the connection is active. 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct Guidelines 2 | 3 | Please review the Hyperledger [Code of 4 | Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct) 5 | before participating. It is important that we keep things civil. 6 | 7 | Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. 8 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/wserror.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: WSError 3 | --- 4 | {% include-markdown "./_includes/wserror_description.md" %} 5 | 6 | ### Example 7 | 8 | ```json 9 | { 10 | "type": "protocol_error", 11 | "error": "FF10175: Acknowledgment does not match an inflight event + subscription" 12 | } 13 | ``` 14 | 15 | ### Field Descriptions 16 | 17 | | Field Name | Description | Type | 18 | |------------|-------------|------| 19 | | `type` | WSAck.type | `FFEnum`:
`"start"`
`"ack"`
`"protocol_error"`
`"event_batch"` | 20 | | `error` | WSAck.error | `string` | 21 | 22 | -------------------------------------------------------------------------------- /db/migrations/postgres/000023_alter_subscriptions_offsets.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE subscriptions DROP COLUMN updated; 4 | 5 | -- We change the primary key by which we access the data, so truncate the table 6 | -- Meaning offsets for subscriptions will be reset going down 7 | DELETE FROM offsets; 8 | 9 | DROP INDEX offsets_unique; 10 | 11 | ALTER TABLE offsets ADD id UUID NOT NULL; 12 | ALTER TABLE offsets ADD namespace VARCHAR(64) NOT NULL; 13 | 14 | CREATE UNIQUE INDEX offsets_id ON offsets(id); 15 | CREATE UNIQUE INDEX offsets_unique ON offsets(otype,namespace,name); 16 | 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /db/migrations/postgres/000056_refactor_transactions_columns.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX transactions_protocol_id; 3 | DROP INDEX transactions_ref; 4 | 5 | ALTER TABLE transactions DROP COLUMN ref; 6 | ALTER TABLE transactions DROP COLUMN signer; 7 | ALTER TABLE transactions DROP COLUMN hash; 8 | ALTER TABLE transactions DROP COLUMN protocol_id; 9 | ALTER TABLE transactions DROP COLUMN info; 10 | ALTER TABLE transactions DROP COLUMN status; 11 | 12 | ALTER TABLE transactions ADD COLUMN blockchain_ids VARCHAR(1024); 13 | CREATE INDEX transactions_blockchain_ids ON transactions(blockchain_ids); 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /.github/workflows/solidity.yml: -------------------------------------------------------------------------------- 1 | name: Solidity Tests 2 | 3 | on: 4 | pull_request: 5 | branches: [main] 6 | 7 | permissions: 8 | contents: read 9 | packages: read 10 | 11 | jobs: 12 | solidity-test: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v5 16 | - name: Use Node.js 17 | uses: actions/setup-node@v2 18 | with: 19 | node-version: "20.x" 20 | - run: npm ci 21 | working-directory: ./smart_contracts/ethereum/solidity_firefly 22 | - run: npm run test 23 | working-directory: ./smart_contracts/ethereum/solidity_firefly 24 | -------------------------------------------------------------------------------- /db/migrations/postgres/000020_create_messages_pending.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | DROP INDEX messages_confirmed; 4 | DROP INDEX messages_created; 5 | 6 | ALTER TABLE messages ADD pending SMALLINT; 7 | UPDATE messages SET pending = 1 WHERE confirmed = 0; 8 | UPDATE messages SET pending = 0 WHERE confirmed != 0; 9 | ALTER TABLE messages ALTER COLUMN pending SET NOT NULL; 10 | 11 | ALTER TABLE messages ADD rejected BOOLEAN; 12 | UPDATE messages SET rejected = FALSE; 13 | ALTER TABLE messages ALTER COLUMN rejected SET NOT NULL; 14 | 15 | CREATE INDEX messages_sortorder ON messages(pending, confirmed, created); 16 | 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000088_fix_token_protocolid_indexes.up.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX tokentransfer_protocolid; 2 | DROP INDEX tokenapproval_protocolid; 3 | 4 | -- De-duplicate existing approvals by adding the pool seq number to the protocol_id 5 | UPDATE tokenapproval 6 | SET protocol_id = (protocol_id || '/' || pool.seq) 7 | FROM (SELECT seq, id FROM tokenpool) AS pool 8 | WHERE length(protocol_id) = 26 AND CAST(pool.id AS TEXT) = pool_id; 9 | 10 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(connector, protocol_id); 11 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(connector, protocol_id); 12 | -------------------------------------------------------------------------------- /smart_contracts/fabric/custompin-sample/custompin.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-License-Identifier: Apache-2.0 3 | */ 4 | 5 | package main 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/hyperledger/fabric-contract-api-go/contractapi" 11 | "github.com/hyperledger/firefly/custompin_sample/chaincode" 12 | ) 13 | 14 | func main() { 15 | assetChaincode, err := contractapi.NewChaincode(&chaincode.SmartContract{}) 16 | if err != nil { 17 | log.Panicf("Error creating custompin chaincode: %v", err) 18 | } 19 | 20 | if err := assetChaincode.Start(); err != nil { 21 | log.Panicf("Error starting custompin chaincode: %v", err) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000050_create_ffi_methods_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE ffimethods ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | interface_id UUID NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | name VARCHAR(1024) NOT NULL, 7 | pathname VARCHAR(1024) NOT NULL, 8 | description TEXT NOT NULL, 9 | params TEXT NOT NULL, 10 | returns TEXT NOT NULL 11 | ); 12 | 13 | CREATE UNIQUE INDEX ffimethods_pathname ON ffimethods(interface_id,pathname); 14 | -------------------------------------------------------------------------------- /smart_contracts/fabric/firefly-go/firefly.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-License-Identifier: Apache-2.0 3 | */ 4 | 5 | package main 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/hyperledger/fabric-contract-api-go/contractapi" 11 | "github.com/hyperledger/firefly/chaincode-go/chaincode" 12 | ) 13 | 14 | func main() { 15 | assetChaincode, err := contractapi.NewChaincode(&chaincode.SmartContract{}) 16 | if err != nil { 17 | log.Panicf("Error creating asset_transfer_basic chaincode: %v", err) 18 | } 19 | 20 | if err := assetChaincode.Start(); err != nil { 21 | log.Panicf("Error starting asset-transfer-basic chaincode: %v", err) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/data/contracts/assetcreator/assetCreator.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-License-Identifier: Apache-2.0 3 | */ 4 | 5 | package main 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/hyperledger/fabric-contract-api-go/contractapi" 11 | "github.com/hyperledger/firefly/test/data/assetcreator/chaincode" 12 | ) 13 | 14 | func main() { 15 | assetChaincode, err := contractapi.NewChaincode(&chaincode.SmartContract{}) 16 | if err != nil { 17 | log.Panicf("Error creating assetcreator chaincode: %v", err) 18 | } 19 | 20 | if err := assetChaincode.Start(); err != nil { 21 | log.Panicf("Error starting assetcreator chaincode: %v", err) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /db/migrations/postgres/000050_create_ffi_methods_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE ffimethods ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | interface_id UUID NOT NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | name VARCHAR(1024) NOT NULL, 8 | pathname VARCHAR(1024) NOT NULL, 9 | description TEXT NOT NULL, 10 | params TEXT NOT NULL, 11 | returns TEXT NOT NULL 12 | ); 13 | 14 | CREATE UNIQUE INDEX ffimethods_pathname ON ffimethods(interface_id,pathname); 15 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/postgres/000088_fix_token_protocolid_indexes.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | DROP INDEX tokentransfer_protocolid; 3 | DROP INDEX tokenapproval_protocolid; 4 | 5 | -- De-duplicate existing approvals by adding the pool seq number to the protocol_id 6 | UPDATE tokenapproval 7 | SET protocol_id = (protocol_id || '/' || pool.seq) 8 | FROM (SELECT seq, id FROM tokenpool) AS pool 9 | WHERE length(protocol_id) = 26 AND CAST(pool.id AS TEXT) = pool_id; 10 | 11 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(connector, protocol_id); 12 | CREATE UNIQUE INDEX tokenapproval_protocolid ON tokenapproval(connector, protocol_id); 13 | COMMIT; 14 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000013_create_orgs_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE orgs ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | message_id UUID NOT NULL, 5 | name VARCHAR(64) NOT NULL, 6 | parent VARCHAR(1024), 7 | identity VARCHAR(1024) NOT NULL, 8 | description VARCHAR(4096) NOT NULL, 9 | profile TEXT, 10 | created BIGINT NOT NULL 11 | ); 12 | 13 | CREATE UNIQUE INDEX orgs_id ON orgs(id); 14 | CREATE UNIQUE INDEX orgs_identity ON orgs(identity); 15 | CREATE UNIQUE INDEX orgs_name ON orgs(name); 16 | 17 | -------------------------------------------------------------------------------- /db/migrations/postgres/000013_create_orgs_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE orgs ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | message_id UUID NOT NULL, 6 | name VARCHAR(64) NOT NULL, 7 | parent VARCHAR(1024), 8 | identity VARCHAR(1024) NOT NULL, 9 | description VARCHAR(4096) NOT NULL, 10 | profile TEXT, 11 | created BIGINT NOT NULL 12 | ); 13 | 14 | CREATE UNIQUE INDEX orgs_id ON orgs(id); 15 | CREATE UNIQUE INDEX orgs_identity ON orgs(identity); 16 | CREATE UNIQUE INDEX orgs_name ON orgs(name); 17 | 18 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000014_create_nodes_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE nodes ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | message_id UUID NOT NULL, 5 | owner VARCHAR(1024) NOT NULL, 6 | name VARCHAR(64) NOT NULL, 7 | description VARCHAR(4096) NOT NULL, 8 | dx_peer VARCHAR(256), 9 | dx_endpoint TEXT, 10 | created BIGINT NOT NULL 11 | ); 12 | 13 | CREATE UNIQUE INDEX nodes_id ON nodes(id); 14 | CREATE UNIQUE INDEX nodes_owner ON nodes(owner,name); 15 | CREATE UNIQUE INDEX nodes_peer ON nodes(dx_peer); 16 | 17 | -------------------------------------------------------------------------------- /db/migrations/postgres/000014_create_nodes_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE nodes ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | message_id UUID NOT NULL, 6 | owner VARCHAR(1024) NOT NULL, 7 | name VARCHAR(64) NOT NULL, 8 | description VARCHAR(4096) NOT NULL, 9 | dx_peer VARCHAR(256), 10 | dx_endpoint TEXT, 11 | created BIGINT NOT NULL 12 | ); 13 | 14 | CREATE UNIQUE INDEX nodes_id ON nodes(id); 15 | CREATE UNIQUE INDEX nodes_owner ON nodes(owner,name); 16 | CREATE UNIQUE INDEX nodes_peer ON nodes(dx_peer); 17 | 18 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000056_refactor_transactions_columns.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE transactions ADD COLUMN ref UUID; 2 | ALTER TABLE transactions ADD COLUMN signer VARCHAR(1024); 3 | ALTER TABLE transactions ADD COLUMN hash CHAR(64); 4 | ALTER TABLE transactions ADD COLUMN protocol_id VARCHAR(256); 5 | ALTER TABLE transactions ADD COLUMN info TEXT; 6 | ALTER TABLE transactions ADD COLUMN status VARCHAR(64); 7 | 8 | CREATE INDEX transactions_protocol_id ON transactions(protocol_id); 9 | CREATE INDEX transactions_ref ON transactions(ref); 10 | 11 | DROP INDEX transactions_blockchain_ids; 12 | ALTER TABLE transactions DROP COLUMN blockchain_ids; 13 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/solidity_firefly/contracts/IBatchPin.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: Apache-2.0 2 | 3 | pragma solidity >=0.6.0 <0.9.0; 4 | 5 | interface IBatchPin { 6 | event BatchPin( 7 | address author, 8 | uint timestamp, 9 | string action, 10 | bytes32 uuids, 11 | bytes32 batchHash, 12 | string payloadRef, 13 | bytes32[] contexts 14 | ); 15 | 16 | function pinBatchData(bytes calldata data) external; 17 | 18 | function pinBatch( 19 | bytes32 uuids, 20 | bytes32 batchHash, 21 | string memory payloadRef, 22 | bytes32[] memory contexts 23 | ) external; 24 | } 25 | -------------------------------------------------------------------------------- /db/migrations/postgres/000055_add_blobs_size_and_name.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE blobs ADD COLUMN size BIGINT; 3 | 4 | ALTER TABLE data ADD COLUMN blob_name VARCHAR(1024); 5 | ALTER TABLE data ADD COLUMN blob_size BIGINT; 6 | ALTER TABLE data ADD COLUMN value_size BIGINT; 7 | 8 | UPDATE blobs SET size = 0; 9 | UPDATE data SET blob_size = 0, blob_name = '', value_size = 0; 10 | 11 | ALTER TABLE data ALTER COLUMN blob_name SET NOT NULL; 12 | ALTER TABLE data ALTER COLUMN blob_size SET NOT NULL; 13 | ALTER TABLE data ALTER COLUMN value_size SET NOT NULL; 14 | 15 | CREATE INDEX data_blob_name ON data(blob_name); 16 | CREATE INDEX data_blob_size ON data(blob_size); 17 | 18 | COMMIT; 19 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000095_change_namespace_fields.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE messages ADD COLUMN namespace_local VARCHAR(64); 2 | UPDATE messages SET namespace_local = namespace; 3 | 4 | ALTER TABLE groups ADD COLUMN namespace_local VARCHAR(64); 5 | UPDATE groups SET namespace_local = namespace; 6 | 7 | DROP INDEX namespaces_id; 8 | ALTER TABLE namespaces DROP COLUMN id; 9 | ALTER TABLE namespaces DROP COLUMN message_id; 10 | ALTER TABLE namespaces DROP COLUMN ntype; 11 | ALTER TABLE namespaces ADD COLUMN remote_name VARCHAR(64); 12 | UPDATE namespaces SET remote_name = name; 13 | 14 | DROP INDEX transactions_id; 15 | CREATE UNIQUE INDEX transactions_id ON transactions(namespace, id); 16 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | We welcome contributions to the FireFly Project in many forms, and 4 | there's always plenty to do! 5 | 6 | Please visit the 7 | [contributors guide](https://hyperledger.github.io/firefly/latest/contributors/index.html) in the 8 | docs to learn how to make contributions to this exciting project. 9 | 10 | Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. 11 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000033_add_token_connector_fields.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE tokenaccount ADD COLUMN connector VARCHAR(64); 2 | ALTER TABLE tokentransfer ADD COLUMN connector VARCHAR(64); 3 | 4 | UPDATE tokenaccount SET connector = pool.connector 5 | FROM (SELECT protocol_id, connector FROM tokenpool) AS pool 6 | WHERE tokenaccount.pool_protocol_id = pool.protocol_id; 7 | 8 | UPDATE tokentransfer SET connector = pool.connector 9 | FROM (SELECT protocol_id, connector FROM tokenpool) AS pool 10 | WHERE tokentransfer.pool_protocol_id = pool.protocol_id; 11 | 12 | DROP INDEX tokentransfer_protocolid; 13 | CREATE UNIQUE INDEX tokentransfer_protocolid ON tokentransfer(connector,protocol_id); 14 | -------------------------------------------------------------------------------- /db/migrations/postgres/000056_refactor_transactions_columns.down.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | ALTER TABLE transactions ADD COLUMN ref UUID; 3 | ALTER TABLE transactions ADD COLUMN signer VARCHAR(1024); 4 | ALTER TABLE transactions ADD COLUMN hash CHAR(64); 5 | ALTER TABLE transactions ADD COLUMN protocol_id VARCHAR(256); 6 | ALTER TABLE transactions ADD COLUMN info TEXT; 7 | ALTER TABLE transactions ADD COLUMN status VARCHAR(64); 8 | 9 | CREATE INDEX transactions_protocol_id ON transactions(protocol_id); 10 | CREATE INDEX transactions_ref ON transactions(ref); 11 | 12 | DROP INDEX transactions_blockchain_ids; 13 | ALTER TABLE transactions DROP COLUMN blockchain_ids; 14 | COMMIT; 15 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000006_create_datatypes_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE datatypes ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | message_id UUID NOT NULL, 5 | validator VARCHAR(64) NOT NULL, 6 | namespace VARCHAR(64) NOT NULL, 7 | name VARCHAR(64) NOT NULL, 8 | version VARCHAR(64) NOT NULL, 9 | hash CHAR(64) NOT NULL, 10 | created BIGINT NOT NULL, 11 | value TEXT 12 | ); 13 | 14 | CREATE UNIQUE INDEX datatypes_id ON data(id); 15 | CREATE UNIQUE INDEX datatypes_unique ON datatypes(namespace,name,version); 16 | CREATE INDEX datatypes_created ON datatypes(created); 17 | -------------------------------------------------------------------------------- /doc-site/docs/reference/types/_includes/datatype_description.md: -------------------------------------------------------------------------------- 1 | A datatype defines the format of some data that can be shared between parties, in a way 2 | that FireFly can enforce consistency of that data against the schema. 3 | 4 | Data that does not match the schema associated with it will not be accepted on 5 | upload to FireFly, and if this were bypassed by a participant in some way 6 | it would be rejected by all parties and result in a `message_rejected` event 7 | (rather than `message_confirmed` event). 8 | 9 | Currently JSON Schema validation of data is supported. 10 | 11 | The system for defining datatypes is pluggable, to support other schemes in the future, 12 | such as XML Schema, or CSV, EDI etc. 13 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/custompin_sample/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | 4 | // You need to export an object to set up your config 5 | // Go to https://hardhat.org/config/ to learn more 6 | 7 | const config: HardhatUserConfig = { 8 | solidity: "0.8.4", 9 | defaultNetwork: "firefly-cli", 10 | networks: { 11 | "firefly-cli": { 12 | url: "http://127.0.0.1:5100", 13 | }, 14 | }, 15 | gasReporter: { 16 | enabled: process.env.REPORT_GAS !== undefined, 17 | currency: "USD", 18 | }, 19 | etherscan: { 20 | apiKey: process.env.ETHERSCAN_API_KEY, 21 | }, 22 | }; 23 | 24 | export default config; 25 | -------------------------------------------------------------------------------- /smart_contracts/ethereum/solidity_firefly/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | 4 | // You need to export an object to set up your config 5 | // Go to https://hardhat.org/config/ to learn more 6 | 7 | const config: HardhatUserConfig = { 8 | solidity: "0.8.4", 9 | defaultNetwork: "firefly-cli", 10 | networks: { 11 | "firefly-cli": { 12 | url: "http://127.0.0.1:5100", 13 | }, 14 | }, 15 | gasReporter: { 16 | enabled: process.env.REPORT_GAS !== undefined, 17 | currency: "USD", 18 | }, 19 | etherscan: { 20 | apiKey: process.env.ETHERSCAN_API_KEY, 21 | }, 22 | }; 23 | 24 | export default config; 25 | -------------------------------------------------------------------------------- /db/migrations/postgres/000006_create_datatypes_table.up.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | CREATE TABLE datatypes ( 3 | seq SERIAL PRIMARY KEY, 4 | id UUID NOT NULL, 5 | message_id UUID NOT NULL, 6 | validator VARCHAR(64) NOT NULL, 7 | namespace VARCHAR(64) NOT NULL, 8 | name VARCHAR(64) NOT NULL, 9 | version VARCHAR(64) NOT NULL, 10 | hash CHAR(64) NOT NULL, 11 | created BIGINT NOT NULL, 12 | value TEXT 13 | ); 14 | 15 | CREATE UNIQUE INDEX datatypes_id ON data(id); 16 | CREATE UNIQUE INDEX datatypes_unique ON datatypes(namespace,name,version); 17 | CREATE INDEX datatypes_created ON datatypes(created); 18 | COMMIT; -------------------------------------------------------------------------------- /db/migrations/sqlite/000004_create_batches_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE batches ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | btype VARCHAR(64) NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | author VARCHAR(1024) NOT NULL, 7 | group_hash CHAR(64), 8 | hash CHAR(64), 9 | created BIGINT NOT NULL, 10 | payload TEXT NOT NULL, 11 | confirmed BIGINT, 12 | tx_type VARCHAR(64) NOT NULL, 13 | tx_id UUID 14 | ); 15 | 16 | CREATE UNIQUE INDEX batches_id ON batches(id); 17 | CREATE INDEX batches_created ON batches(namespace,created); 18 | CREATE INDEX batches_fortx ON batches(namespace,tx_id); 19 | -------------------------------------------------------------------------------- /db/migrations/sqlite/000005_create_transactions_table.up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE transactions ( 2 | seq INTEGER PRIMARY KEY AUTOINCREMENT, 3 | id UUID NOT NULL, 4 | ttype VARCHAR(64) NOT NULL, 5 | namespace VARCHAR(64) NOT NULL, 6 | ref UUID, 7 | signer VARCHAR(1024) NOT NULL, 8 | hash CHAR(64) NOT NULL, 9 | created BIGINT NOT NULL, 10 | protocol_id VARCHAR(256), 11 | status VARCHAR(64) NOT NULL, 12 | info TEXT 13 | ); 14 | 15 | CREATE INDEX transactions_created ON transactions(created); 16 | CREATE INDEX transactions_protocol_id ON transactions(protocol_id); 17 | CREATE INDEX transactions_ref ON transactions(ref); 18 | --------------------------------------------------------------------------------