diff --git a/deployment/ci.env b/deployment/ci.env index f4d895624..69cb9e007 100644 --- a/deployment/ci.env +++ b/deployment/ci.env @@ -1,4 +1,4 @@ # Git commit version of most recent Node compatible with this Network Gateway (only used in CI/CD environments) -FULLNODE_COMMIT=1b1a2062a2d5cb92b825342746a60d632838e780 -FULLNODE_VERSION=sha-1b1a206 +FULLNODE_COMMIT=738ce8e871535278d613e5cd1511fef4a562bb43 +FULLNODE_VERSION=sha-738ce8e POSTGRES_VERSION=15.2.0 diff --git a/src/RadixDlt.CoreApiSdk/Model/CommittedTransactionBalanceChanges.cs b/src/RadixDlt.CoreApiSdk/Model/CommittedTransactionBalanceChanges.cs index 3c50f3132..c91b17ac1 100644 --- a/src/RadixDlt.CoreApiSdk/Model/CommittedTransactionBalanceChanges.cs +++ b/src/RadixDlt.CoreApiSdk/Model/CommittedTransactionBalanceChanges.cs @@ -90,15 +90,5 @@ public IEnumerable GetEntityAddresses() yield return nonFungibleBalanceChange.EntityAddress; yield return nonFungibleBalanceChange.ResourceAddress; } - - foreach (var resultantAccountFungibleBalance in ResultantAccountFungibleBalances) - { - yield return resultantAccountFungibleBalance.AccountAddress; - - foreach (var resultantBalance in resultantAccountFungibleBalance.ResultantBalances) - { - yield return resultantBalance.ResourceAddress; - } - } } } diff --git a/src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml b/src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml index f632251d6..1068f0781 100644 --- a/src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml +++ b/src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml @@ -142,7 +142,7 @@ tags: User transactions are formed of a core "intent", which is then signed by 0+ signatories, before being notarized. The output is called a notarized payload. It is this notarized transaction payload which is submitted to the network. - + For most users, this construction process will generally happen in their Radix Wallet. If you wish to construct transactions programmatically or offline, you will need to integrate the Radix Engine Toolkit into your application for construction and finalization. @@ -166,7 +166,7 @@ tags: ## State Model The Radix Engine State Model can be thought of as a forest of state sub-trees. - A state sub-tree consists of "entities". These entities have an ID, and 0 or more "substates" at keys underneath them. + A state sub-tree consists of "entities". These entities have an ID, and 0 or more "substates" at keys underneath them. These substates are typed, and can own other entities, forming a tree of ownership. Each state sub-tree has a root entity, and a single Bech32M Global Address, with a human-readable-prefix (and prefix byte) matching the root entity type. @@ -176,7 +176,7 @@ tags: - name: Construction x-displayName: Transaction Construction x-traitTag: true # Don't display endpoints under this tag - description: | + description: | To construct and submit a transaction using the LTS endpoints: * Query `/lts/transaction/construction` to retrieve the current epoch (according to your node). @@ -209,9 +209,9 @@ tags: x-displayName: Stream Endpoints description: To query the transaction stream of the ledger. paths: - ################################################## - # Long Term Support backwards compatible Sub-API # - ################################################## +################################################## +# Long Term Support backwards compatible Sub-API # +################################################## "/lts/transaction/construction": post: summary: Get Construction Metadata @@ -443,9 +443,9 @@ paths: application/json: schema: $ref: "#/components/schemas/BasicErrorResponse" - ################## - # Status Sub-API # - ################## +################## +# Status Sub-API # +################## "/status/network-configuration": post: summary: Get Network Configuration @@ -515,9 +515,9 @@ paths: application/json: schema: $ref: "#/components/schemas/BasicErrorResponse" - ################### - # Mempool Sub-API # - ################### +################### +# Mempool Sub-API # +################### "/mempool/list": post: summary: Get Mempool List @@ -574,9 +574,9 @@ paths: application/json: schema: $ref: "#/components/schemas/BasicErrorResponse" - ####################### - # Transaction Sub-API # - ####################### +####################### +# Transaction Sub-API # +####################### "/transaction/parse": post: summary: Parse Transaction Payload @@ -785,9 +785,9 @@ paths: application/json: schema: $ref: "#/components/schemas/BasicErrorResponse" - ################## - # Stream Sub-API # - ################## +################## +# Stream Sub-API # +################## "/stream/transactions": post: summary: Get Committed Transactions @@ -820,9 +820,9 @@ paths: application/json: schema: $ref: "#/components/schemas/BasicErrorResponse" - ################# - # State Sub-API # - ################# +################# +# State Sub-API # +################# "/state/consensus-manager": post: summary: Get Consensus Manager Details @@ -1126,9 +1126,9 @@ paths: ############################################################################################# components: schemas: - ############################################# - # GENERAL / SHARED MODELS - Request Options # - ############################################# +############################################# +# GENERAL / SHARED MODELS - Request Options # +############################################# NetworkIdentifier: description: The logical name of the network type: string @@ -1184,17 +1184,17 @@ components: previous: description: Whether to return the previous substate value for updates and deletes (default false) type: boolean - ########################################################### - # GENERAL / SHARED MODELS - General / Numeric / Utilities # - ########################################################### +########################################################### +# GENERAL / SHARED MODELS - General / Numeric / Utilities # +########################################################### Decimal: type: string description: | A string-encoded fixed-precision decimal to 18 decimal places. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. - ########################################## - # GENERAL / SHARED MODELS - Transactions # - ########################################## +########################################## +# GENERAL / SHARED MODELS - Transactions # +########################################## TransactionStatus: type: string enum: @@ -1669,9 +1669,9 @@ components: allOf: - $ref: "#/components/schemas/ErrorResponse" - type: object - ###################################### - # GENERAL / SHARED MODELS - Receipts # - ###################################### +###################################### +# GENERAL / SHARED MODELS - Receipts # +###################################### FeeSummary: type: object required: @@ -1730,6 +1730,7 @@ components: - finalization_cost_unit_limit - xrd_usd_price - xrd_storage_price + - xrd_archive_storage_price - tip_percentage properties: execution_cost_unit_price: @@ -1768,7 +1769,12 @@ components: xrd_storage_price: type: string description: | - The string-encoded decimal representing the price of 1 byte of storage, expressed in XRD. + The string-encoded decimal representing the price of 1 byte of state storage, expressed in XRD. + A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. + xrd_archive_storage_price: + type: string + description: | + The string-encoded decimal representing the price of 1 byte of archive storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. tip_percentage: type: integer @@ -2346,9 +2352,9 @@ components: object_module_id: $ref: "#/components/schemas/ModuleId" - ################################################# - # GENERAL / SHARED MODELS - keys and signatures # - ################################################# +################################################# +# GENERAL / SHARED MODELS - keys and signatures # +################################################# PublicKeyType: type: string enum: @@ -2458,15 +2464,15 @@ components: required: - public_key - signature - description: The EdDSA public key and signature + description: The EdDSA public key and signature properties: public_key: $ref: '#/components/schemas/EddsaEd25519PublicKey' signature: $ref: '#/components/schemas/EddsaEd25519Signature' - ########################################## - # GENERAL / SHARED MODELS - Access Rules # - ########################################## +########################################## +# GENERAL / SHARED MODELS - Access Rules # +########################################## AccessRuleType: type: string enum: @@ -2688,9 +2694,9 @@ components: - None - Owner - Object - ####################################### - # GENERAL / SHARED MODELS - Resources # - ####################################### +####################################### +# GENERAL / SHARED MODELS - Resources # +####################################### ResourceType: type: string enum: @@ -2816,9 +2822,9 @@ components: properties: local_id: $ref: '#/components/schemas/NonFungibleLocalIdSimpleRepresentation' - ################################## - # GENERAL / SHARED MODELS - SBOR # - ################################## +################################## +# GENERAL / SHARED MODELS - SBOR # +################################## DataStruct: type: object required: @@ -2848,9 +2854,9 @@ components: description: The hex-encoded, raw SBOR-encoded data programmatic_json: description: The (untyped) unannotated programmatic SBOR JSON - ##################################### - # GENERAL / SHARED MODELS - Royalty # - ##################################### +##################################### +# GENERAL / SHARED MODELS - Royalty # +##################################### BlueprintRoyaltyConfig: type: object required: @@ -2886,9 +2892,9 @@ components: enum: - XRD - USD - ######################################## - # GENERAL / SHARED MODELS - validators # - ######################################## +######################################## +# GENERAL / SHARED MODELS - validators # +######################################## ActiveValidator: type: object required: @@ -2905,9 +2911,9 @@ components: description: | A string-encoded decimal representing the validator's voting power for this epoch. This is a snapshot of the amount of XRD staked to the validator at the start of the epoch. - ##################################### - # GENERAL / SHARED MODELS - schemas # - ##################################### +##################################### +# GENERAL / SHARED MODELS - schemas # +##################################### ScryptoSchema: type: object required: @@ -3566,9 +3572,9 @@ components: type: boolean direct_access: type: boolean - ##################################################### - # GENERAL / SHARED MODELS - general substate models # - ##################################################### +##################################################### +# GENERAL / SHARED MODELS - general substate models # +##################################################### EntityType: type: string enum: @@ -3624,7 +3630,7 @@ components: mapping: # NOTE: # There is an important convention to these names, for consistency: - # + # # For each distinct typed substate, form [SubstateType] = [ModuleSpecifier][SubstateSpecifier][SubstateTypeVersion] # - [ModuleSpecifier] is either [ModuleName]Module for non-main modules, or [EntityType] for main modules # - [SubstateSpecifier] is either: @@ -3744,9 +3750,9 @@ components: - MultiResourcePoolFieldState - TransactionTrackerFieldState - TransactionTrackerCollectionEntry - ################################################ - # GENERAL / SHARED MODELS - substate key types # - ################################################ +################################################ +# GENERAL / SHARED MODELS - substate key types # +################################################ ObjectRoleKey: type: object required: @@ -3886,9 +3892,9 @@ components: key_data: description: If it can be decoded as SBOR, this is the data $ref: '#/components/schemas/SborData' - ################################################ - # GENERAL / SHARED MODELS - specific substates # - ################################################ +################################################ +# GENERAL / SHARED MODELS - specific substates # +################################################ TypeInfoModuleFieldTypeInfoSubstate: allOf: - $ref: '#/components/schemas/Substate' @@ -4037,7 +4043,7 @@ components: description: | The generic substitution is provided remotely by a blueprint type. The `resolved_full_type_id` is added by the node, and is always present in the model returned from the transaction stream API. - Other APIs may not resolve the type from the blueprint definition. + Other APIs may not resolve the type from the blueprint definition. required: - blueprint_type_identifier properties: @@ -4774,7 +4780,7 @@ components: effective_epoch_start: description: | The effective time the epoch started. A drift-free measure, used to work out when the - epoch should ideally end. + epoch should ideally end. $ref: '#/components/schemas/Instant' actual_epoch_start: description: | @@ -5279,9 +5285,9 @@ components: $ref: '#/components/schemas/EntityReference' resource_address: $ref: '#/components/schemas/ResourceAddress' - ########################################## - # REQUEST: /lts/transaction/construction # - ########################################## +########################################## +# REQUEST: /lts/transaction/construction # +########################################## LtsTransactionConstructionRequest: type: object required: @@ -5306,9 +5312,9 @@ components: description: | The latest round proposer's timestamp (rounded down to the current minute). This is provided so that the client can detect if the node is synced up or not. - #################################### - # REQUEST: /lts/transaction/status # - #################################### +#################################### +# REQUEST: /lts/transaction/status # +#################################### LtsTransactionStatusRequest: type: object required: @@ -5376,7 +5382,7 @@ components: type: string description: | The status of the transaction intent, as determined by the node. - FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction enum: - CommittedSuccess - CommittedFailure @@ -5397,9 +5403,9 @@ components: - TransientlyRejected - InMempool - NotInMempool - #################################### - # REQUEST: /lts/transaction/submit # - #################################### +#################################### +# REQUEST: /lts/transaction/submit # +#################################### LtsTransactionSubmitRequest: type: object required: @@ -5533,9 +5539,9 @@ components: description: | An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be permanently rejected. Only present if the rejection isn't permanent. - ############################################################## - # REQUEST: /lts/state/account-all-fungible-resource-balances # - ############################################################## +############################################################## +# REQUEST: /lts/state/account-all-fungible-resource-balances # +############################################################## LtsStateAccountAllFungibleResourceBalancesRequest: type: object required: @@ -5582,9 +5588,9 @@ components: description: | The string-encoded decimal representing the amount of the fungible resource. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. - ######################################################### - # REQUEST: /lts/state/account-fungible-resource-balance # - ######################################################### +######################################################### +# REQUEST: /lts/state/account-fungible-resource-balance # +######################################################### LtsStateAccountFungibleResourceBalanceRequest: type: object required: @@ -5618,9 +5624,9 @@ components: description: The Bech32m-encoded human readable version of the account's address fungible_resource_balance: $ref: "#/components/schemas/LtsFungibleResourceBalance" - ######################################################### - # REQUEST: /lts/state/account-deposit-behaviour # - ######################################################### +######################################################### +# REQUEST: /lts/state/account-deposit-behaviour # +######################################################### LtsStateAccountDepositBehaviourRequest: type: object required: @@ -5694,9 +5700,9 @@ components: The fully resolved `try_deposit_*` ability of this resource (which takes all the inputs into account, including the authorized depositor badge, the default deposit rule and the above resource-specific circumstances). - ############################################# - # REQUEST: /lts/stream/transaction-outcomes # - ############################################# +############################################# +# REQUEST: /lts/stream/transaction-outcomes # +############################################# LtsStreamTransactionOutcomesRequest: description: | A request to retrieve a sublist of committed transactions from the ledger. @@ -5752,8 +5758,6 @@ components: description: | For the given transaction, contains the status, total fee summary and individual entity resource balance changes. The balance changes accounts for the fee payments as well. - For failed transactions, current implementation does not return any balance changes (not even the fee payments). - This will also change in a future update. type: object required: - state_version @@ -5826,7 +5830,7 @@ components: description: | If present, this field indicates the entity contributed to the payment of the fee. The change in balance will always be negative. - NOTE: This property is deprecated but kept for backwards compatibility. This entry is duplicated in + NOTE: This property is deprecated but kept for backwards compatibility. This entry is duplicated in `fee_balance_changes`. fee_balance_changes: type: array @@ -5947,9 +5951,9 @@ components: description: | The string-encoded decimal representing the resultant balance of the fungible resource. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. - ##################################################### - # REQUEST: /lts/stream/account-transaction-outcomes # - ##################################################### +##################################################### +# REQUEST: /lts/stream/account-transaction-outcomes # +##################################################### LtsStreamAccountTransactionOutcomesRequest: description: | A request to retrieve a sublist of committed transactions from the ledger. @@ -5998,9 +6002,9 @@ components: type: array items: $ref: "#/components/schemas/LtsCommittedTransactionOutcome" - ########################################## - # REQUEST: /status/network-configuration # - ########################################## +########################################## +# REQUEST: /status/network-configuration # +########################################## NetworkConfigurationResponse: type: object required: @@ -6144,9 +6148,9 @@ components: format: int32 minimum: 0 maximum: 255 - ################################### - # REQUEST: /status/network-status # - ################################### +################################### +# REQUEST: /status/network-status # +################################### NetworkStatusRequest: type: object required: @@ -6224,9 +6228,9 @@ components: $ref: "#/components/schemas/StateVersion" description: The state version, which increments with each transaction, starting at `0` pre-genesis. - $ref: "#/components/schemas/LedgerHashes" - ############################## - # REQUEST: /status/scenarios # - ############################## +############################## +# REQUEST: /status/scenarios # +############################## ScenariosRequest: type: object required: @@ -6294,9 +6298,9 @@ components: DescribedAddress: type: string description: An arbitrary Bech32m-encoded human readable address (its type should be inferred from `logical_name`). - ########################## - # REQUEST: /mempool/list # - ########################## +########################## +# REQUEST: /mempool/list # +########################## MempoolListRequest: type: object required: @@ -6329,9 +6333,9 @@ components: $ref: "#/components/schemas/NotarizedTransactionHash" payload_hash_bech32m: $ref: "#/components/schemas/NotarizedTransactionHashBech32m" - ################################# - # REQUEST: /mempool/transaction # - ################################# +################################# +# REQUEST: /mempool/transaction # +################################# MempoolTransactionRequest: type: object required: @@ -6378,9 +6382,9 @@ components: type: string description: | Error message why `hex` field is missing: the transaction was not found in the mempool or the provided hash is invalid. - ############################### - # REQUEST: /transaction/parse # - ############################### +############################### +# REQUEST: /transaction/parse # +############################### TransactionParseRequest: type: object required: @@ -6597,9 +6601,9 @@ components: $ref: "#/components/schemas/LedgerPayloadHash" ledger_hash_bech32m: $ref: "#/components/schemas/LedgerPayloadHashBech32m" - ################################ - # REQUEST: /transaction/submit # - ################################ +################################ +# REQUEST: /transaction/submit # +################################ TransactionSubmitRequest: type: object required: @@ -6733,9 +6737,9 @@ components: description: | An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be permanently rejected. Only present if the rejection isn't permanent. - ################################ - # REQUEST: /transaction/status # - ################################ +################################ +# REQUEST: /transaction/status # +################################ TransactionStatusRequest: type: object required: @@ -6808,7 +6812,7 @@ components: type: string description: | The status of the transaction intent, as determined by the node. - FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction enum: - CommittedSuccess - CommittedFailure @@ -6817,9 +6821,9 @@ components: - NotSeen - FateUncertain - FateUncertainButLikelyRejection - ################################# - # REQUEST: /transaction/receipt # - ################################# +################################# +# REQUEST: /transaction/receipt # +################################# TransactionReceiptRequest: type: object required: @@ -6837,9 +6841,9 @@ components: properties: committed: $ref: "#/components/schemas/CommittedTransaction" - ##################################### - # REQUEST: /transaction/callpreview # - ##################################### +##################################### +# REQUEST: /transaction/callpreview # +##################################### TransactionCallPreviewRequest: type: object required: @@ -6917,9 +6921,9 @@ components: error_message: type: string description: Error message (only present if status is Failed or Rejected) - ################################# - # REQUEST: /transaction/preview # - ################################# +################################# +# REQUEST: /transaction/preview # +################################# TransactionPreviewRequest: type: object required: @@ -7028,9 +7032,9 @@ components: type: string message: type: string - ################################# - # REQUEST: /stream/transactions # - ################################# +################################# +# REQUEST: /stream/transactions # +################################# StreamTransactionsRequest: description: | A request to retrieve a sublist of committed transactions from the ledger. @@ -7149,6 +7153,9 @@ components: receipt: $ref: "#/components/schemas/TransactionReceipt" balance_changes: + description: | + All balance changes of a transaction (including those fee-related), aggregated by resource and global entity + within which the change occurred. Only returned if available and enabled in `TransactionFormatOptions` on your request. $ref: "#/components/schemas/CommittedTransactionBalanceChanges" proposer_timestamp_ms: type: integer @@ -7157,16 +7164,10 @@ components: maximum: 100000000000000 description: An integer between `0` and `10^14`, marking the proposer timestamp in ms. CommittedTransactionBalanceChanges: - description: | - For the given transaction, contains individual entity resource balance changes. - The balance changes accounts for the fee payments as well. - For failed transactions, current implementation does not return any balance changes (not even the fee payments). - This will also change in a future update. type: object required: - fungible_entity_balance_changes - non_fungible_entity_balance_changes - - resultant_account_fungible_balances properties: fungible_entity_balance_changes: description: | @@ -7181,13 +7182,6 @@ components: type: array items: $ref: "#/components/schemas/LtsEntityNonFungibleBalanceChanges" - resultant_account_fungible_balances: - description: | - A list of the resultant fungible account balances for any balances which changed in this transaction. - Only balances for accounts are returned, not any other kind of entity. - type: array - items: - $ref: "#/components/schemas/LtsResultantAccountFungibleBalances" LedgerProof: type: object required: @@ -7195,7 +7189,7 @@ components: - ledger_header - timestamped_signatures properties: - opaque_hash: + opaque_hash: $ref: "#/components/schemas/OpaqueHash" ledger_header: $ref: "#/components/schemas/LedgerHeader" @@ -7275,6 +7269,7 @@ components: - Genesis - User - RoundUpdate + - Flash LedgerTransaction: type: object required: @@ -7292,6 +7287,7 @@ components: Genesis: '#/components/schemas/GenesisLedgerTransaction' User: '#/components/schemas/UserLedgerTransaction' RoundUpdate: '#/components/schemas/RoundUpdateLedgerTransaction' + Flash: '#/components/schemas/FlashLedgerTransaction' GenesisLedgerTransaction: allOf: - $ref: "#/components/schemas/LedgerTransaction" @@ -7324,6 +7320,15 @@ components: properties: round_update_transaction: $ref: "#/components/schemas/RoundUpdateTransaction" + FlashLedgerTransaction: + allOf: + - $ref: "#/components/schemas/LedgerTransaction" + - type: object + required: + - flash_transaction + properties: + flash_transaction: + $ref: "#/components/schemas/FlashTransaction" RoundUpdateTransaction: type: object required: @@ -7351,6 +7356,35 @@ components: leader_proposal_history: $ref: '#/components/schemas/LeaderProposalHistory' description: A recent history (i.e. since the previous `RoundUpdateValidatorTransaction`) of consensus round leaders' reliability. Used for validator emissions calculation. + FlashTransaction: + type: object + required: + - flashed_substates + properties: + flashed_substates: + type: array + items: + $ref: "#/components/schemas/FlashedSubstate" + FlashedSubstate: + type: object + required: + - entity_address + - partition_number + - substate_key + - value + properties: + entity_address: + $ref: "#/components/schemas/EntityAddress" + partition_number: + type: integer + format: int32 + minimum: 0 + maximum: 255 + substate_key: + $ref: "#/components/schemas/SubstateKey" + value: + type: string + description: The hex-encoded, SBOR-encoded substate data bytes. LeaderProposalHistory: type: object required: @@ -7386,9 +7420,9 @@ components: payload_hex: type: string description: The hex-encoded system transaction payload. Only returned if enabled in TransactionFormatOptions on your request. - ##################################### - # REQUEST: /state/consensus-manager # - ##################################### +##################################### +# REQUEST: /state/consensus-manager # +##################################### StateConsensusManagerRequest: type: object required: @@ -7422,9 +7456,9 @@ components: $ref: "#/components/schemas/Substate" current_time_rounded_to_minutes: $ref: "#/components/schemas/Substate" - ########################### - # REQUEST: /state/account # - ########################### +########################### +# REQUEST: /state/account # +########################### StateAccountRequest: type: object required: @@ -7469,9 +7503,9 @@ components: $ref: "#/components/schemas/EntityReference" resource_amount: $ref: "#/components/schemas/ResourceAmount" - ############################# - # REQUEST: /state/component # - ############################# +############################# +# REQUEST: /state/component # +############################# StateComponentRequest: type: object required: @@ -7545,9 +7579,9 @@ components: format: int32 minimum: 0 maximum: 100 - ############################# - # REQUEST: /state/validator # - ############################# +############################# +# REQUEST: /state/validator # +############################# StateValidatorRequest: type: object required: @@ -7587,9 +7621,9 @@ components: description: Any descendent nodes owned directly or indirectly by the component items: $ref: "#/components/schemas/StateComponentDescendentNode" - ##################################### - # REQUEST: /state/access-controller # - ##################################### +##################################### +# REQUEST: /state/access-controller # +##################################### StateAccessControllerRequest: type: object required: @@ -7626,9 +7660,9 @@ components: description: Any descendent nodes owned directly or indirectly by the component items: $ref: "#/components/schemas/StateComponentDescendentNode" - ############################ - # REQUEST: /state/resource # - ############################ +############################ +# REQUEST: /state/resource # +############################ StateResourceRequest: type: object required: @@ -7692,9 +7726,9 @@ components: $ref: "#/components/schemas/Substate" mutable_fields: $ref: "#/components/schemas/Substate" - ################################ - # REQUEST: /state/non-fungible # - ################################ +################################ +# REQUEST: /state/non-fungible # +################################ StateNonFungibleRequest: type: object required: @@ -7720,9 +7754,9 @@ components: description: A summarized state of the ledger at which the query was performed. non_fungible: $ref: "#/components/schemas/Substate" - ########################### - # REQUEST: /state/package # - ########################### +########################### +# REQUEST: /state/package # +########################### StatePackageRequest: type: object required: diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/CommittedTransactionBalanceChanges.cs b/src/RadixDlt.CoreApiSdk/generated/Model/CommittedTransactionBalanceChanges.cs index fda0e1e37..6d9f28253 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/CommittedTransactionBalanceChanges.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/CommittedTransactionBalanceChanges.cs @@ -90,7 +90,7 @@ namespace RadixDlt.CoreApiSdk.Model { /// - /// For the given transaction, contains individual entity resource balance changes. The balance changes accounts for the fee payments as well. For failed transactions, current implementation does not return any balance changes (not even the fee payments). This will also change in a future update. + /// CommittedTransactionBalanceChanges /// [DataContract(Name = "CommittedTransactionBalanceChanges")] public partial class CommittedTransactionBalanceChanges : IEquatable @@ -105,8 +105,7 @@ protected CommittedTransactionBalanceChanges() { } /// /// A list of all fungible balance updates which occurred in this transaction, aggregated by the global entity (such as account) which owns the vaults which were updated. (required). /// Non fungible changes per entity and resource (required). - /// A list of the resultant fungible account balances for any balances which changed in this transaction. Only balances for accounts are returned, not any other kind of entity. (required). - public CommittedTransactionBalanceChanges(List fungibleEntityBalanceChanges = default(List), List nonFungibleEntityBalanceChanges = default(List), List resultantAccountFungibleBalances = default(List)) + public CommittedTransactionBalanceChanges(List fungibleEntityBalanceChanges = default(List), List nonFungibleEntityBalanceChanges = default(List)) { // to ensure "fungibleEntityBalanceChanges" is required (not null) if (fungibleEntityBalanceChanges == null) @@ -120,12 +119,6 @@ protected CommittedTransactionBalanceChanges() { } throw new ArgumentNullException("nonFungibleEntityBalanceChanges is a required property for CommittedTransactionBalanceChanges and cannot be null"); } this.NonFungibleEntityBalanceChanges = nonFungibleEntityBalanceChanges; - // to ensure "resultantAccountFungibleBalances" is required (not null) - if (resultantAccountFungibleBalances == null) - { - throw new ArgumentNullException("resultantAccountFungibleBalances is a required property for CommittedTransactionBalanceChanges and cannot be null"); - } - this.ResultantAccountFungibleBalances = resultantAccountFungibleBalances; } /// @@ -142,13 +135,6 @@ protected CommittedTransactionBalanceChanges() { } [DataMember(Name = "non_fungible_entity_balance_changes", IsRequired = true, EmitDefaultValue = true)] public List NonFungibleEntityBalanceChanges { get; set; } - /// - /// A list of the resultant fungible account balances for any balances which changed in this transaction. Only balances for accounts are returned, not any other kind of entity. - /// - /// A list of the resultant fungible account balances for any balances which changed in this transaction. Only balances for accounts are returned, not any other kind of entity. - [DataMember(Name = "resultant_account_fungible_balances", IsRequired = true, EmitDefaultValue = true)] - public List ResultantAccountFungibleBalances { get; set; } - /// /// Returns the string presentation of the object /// @@ -159,7 +145,6 @@ public override string ToString() sb.Append("class CommittedTransactionBalanceChanges {\n"); sb.Append(" FungibleEntityBalanceChanges: ").Append(FungibleEntityBalanceChanges).Append("\n"); sb.Append(" NonFungibleEntityBalanceChanges: ").Append(NonFungibleEntityBalanceChanges).Append("\n"); - sb.Append(" ResultantAccountFungibleBalances: ").Append(ResultantAccountFungibleBalances).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -206,12 +191,6 @@ public bool Equals(CommittedTransactionBalanceChanges input) this.NonFungibleEntityBalanceChanges != null && input.NonFungibleEntityBalanceChanges != null && this.NonFungibleEntityBalanceChanges.SequenceEqual(input.NonFungibleEntityBalanceChanges) - ) && - ( - this.ResultantAccountFungibleBalances == input.ResultantAccountFungibleBalances || - this.ResultantAccountFungibleBalances != null && - input.ResultantAccountFungibleBalances != null && - this.ResultantAccountFungibleBalances.SequenceEqual(input.ResultantAccountFungibleBalances) ); } @@ -232,10 +211,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.NonFungibleEntityBalanceChanges.GetHashCode(); } - if (this.ResultantAccountFungibleBalances != null) - { - hashCode = (hashCode * 59) + this.ResultantAccountFungibleBalances.GetHashCode(); - } return hashCode; } } diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/CostingParameters.cs b/src/RadixDlt.CoreApiSdk/generated/Model/CostingParameters.cs index 7f84e8cf9..be44a4a86 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/CostingParameters.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/CostingParameters.cs @@ -109,9 +109,10 @@ protected CostingParameters() { } /// The string-encoded decimal representing the XRD price of a single cost unit of transaction finalization. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. (required). /// An integer between `0` and `2^32 - 1`, representing the maximum amount of cost units available for the transaction finalization. (required). /// The string-encoded decimal representing the price of 1 USD, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. (required). - /// The string-encoded decimal representing the price of 1 byte of storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. (required). + /// The string-encoded decimal representing the price of 1 byte of state storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. (required). + /// The string-encoded decimal representing the price of 1 byte of archive storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. (required). /// An integer between `0` and `65535`, giving the validator tip as a percentage amount. A value of `1` corresponds to 1% of the fee. (required). - public CostingParameters(string executionCostUnitPrice = default(string), long executionCostUnitLimit = default(long), long executionCostUnitLoan = default(long), string finalizationCostUnitPrice = default(string), long finalizationCostUnitLimit = default(long), string xrdUsdPrice = default(string), string xrdStoragePrice = default(string), int tipPercentage = default(int)) + public CostingParameters(string executionCostUnitPrice = default(string), long executionCostUnitLimit = default(long), long executionCostUnitLoan = default(long), string finalizationCostUnitPrice = default(string), long finalizationCostUnitLimit = default(long), string xrdUsdPrice = default(string), string xrdStoragePrice = default(string), string xrdArchiveStoragePrice = default(string), int tipPercentage = default(int)) { // to ensure "executionCostUnitPrice" is required (not null) if (executionCostUnitPrice == null) @@ -140,6 +141,12 @@ protected CostingParameters() { } throw new ArgumentNullException("xrdStoragePrice is a required property for CostingParameters and cannot be null"); } this.XrdStoragePrice = xrdStoragePrice; + // to ensure "xrdArchiveStoragePrice" is required (not null) + if (xrdArchiveStoragePrice == null) + { + throw new ArgumentNullException("xrdArchiveStoragePrice is a required property for CostingParameters and cannot be null"); + } + this.XrdArchiveStoragePrice = xrdArchiveStoragePrice; this.TipPercentage = tipPercentage; } @@ -186,12 +193,19 @@ protected CostingParameters() { } public string XrdUsdPrice { get; set; } /// - /// The string-encoded decimal representing the price of 1 byte of storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. + /// The string-encoded decimal representing the price of 1 byte of state storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. /// - /// The string-encoded decimal representing the price of 1 byte of storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. + /// The string-encoded decimal representing the price of 1 byte of state storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. [DataMember(Name = "xrd_storage_price", IsRequired = true, EmitDefaultValue = true)] public string XrdStoragePrice { get; set; } + /// + /// The string-encoded decimal representing the price of 1 byte of archive storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. + /// + /// The string-encoded decimal representing the price of 1 byte of archive storage, expressed in XRD. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. + [DataMember(Name = "xrd_archive_storage_price", IsRequired = true, EmitDefaultValue = true)] + public string XrdArchiveStoragePrice { get; set; } + /// /// An integer between `0` and `65535`, giving the validator tip as a percentage amount. A value of `1` corresponds to 1% of the fee. /// @@ -214,6 +228,7 @@ public override string ToString() sb.Append(" FinalizationCostUnitLimit: ").Append(FinalizationCostUnitLimit).Append("\n"); sb.Append(" XrdUsdPrice: ").Append(XrdUsdPrice).Append("\n"); sb.Append(" XrdStoragePrice: ").Append(XrdStoragePrice).Append("\n"); + sb.Append(" XrdArchiveStoragePrice: ").Append(XrdArchiveStoragePrice).Append("\n"); sb.Append(" TipPercentage: ").Append(TipPercentage).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -282,6 +297,11 @@ public bool Equals(CostingParameters input) (this.XrdStoragePrice != null && this.XrdStoragePrice.Equals(input.XrdStoragePrice)) ) && + ( + this.XrdArchiveStoragePrice == input.XrdArchiveStoragePrice || + (this.XrdArchiveStoragePrice != null && + this.XrdArchiveStoragePrice.Equals(input.XrdArchiveStoragePrice)) + ) && ( this.TipPercentage == input.TipPercentage || this.TipPercentage.Equals(input.TipPercentage) @@ -316,6 +336,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.XrdStoragePrice.GetHashCode(); } + if (this.XrdArchiveStoragePrice != null) + { + hashCode = (hashCode * 59) + this.XrdArchiveStoragePrice.GetHashCode(); + } hashCode = (hashCode * 59) + this.TipPercentage.GetHashCode(); return hashCode; } diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransaction.cs new file mode 100644 index 000000000..c4aa21ded --- /dev/null +++ b/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransaction.cs @@ -0,0 +1,202 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +/* + * Radix Core API - Babylon + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.0.4 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using FileParameter = RadixDlt.CoreApiSdk.Client.FileParameter; +using OpenAPIDateConverter = RadixDlt.CoreApiSdk.Client.OpenAPIDateConverter; + +namespace RadixDlt.CoreApiSdk.Model +{ + /// + /// FlashLedgerTransaction + /// + [DataContract(Name = "FlashLedgerTransaction")] + [JsonConverter(typeof(JsonSubtypes), "type")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "Flash")] + [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "Genesis")] + [JsonSubtypes.KnownSubType(typeof(RoundUpdateLedgerTransaction), "RoundUpdate")] + [JsonSubtypes.KnownSubType(typeof(UserLedgerTransaction), "User")] + public partial class FlashLedgerTransaction : LedgerTransaction, IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FlashLedgerTransaction() { } + /// + /// Initializes a new instance of the class. + /// + /// flashTransaction (required). + /// type (required) (default to LedgerTransactionType.Flash). + /// The hex-encoded full ledger transaction payload. Only returned if enabled in TransactionFormatOptions on your request.. + public FlashLedgerTransaction(FlashTransaction flashTransaction = default(FlashTransaction), LedgerTransactionType type = LedgerTransactionType.Flash, string payloadHex = default(string)) : base(type, payloadHex) + { + // to ensure "flashTransaction" is required (not null) + if (flashTransaction == null) + { + throw new ArgumentNullException("flashTransaction is a required property for FlashLedgerTransaction and cannot be null"); + } + this.FlashTransaction = flashTransaction; + } + + /// + /// Gets or Sets FlashTransaction + /// + [DataMember(Name = "flash_transaction", IsRequired = true, EmitDefaultValue = true)] + public FlashTransaction FlashTransaction { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FlashLedgerTransaction {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" FlashTransaction: ").Append(FlashTransaction).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FlashLedgerTransaction); + } + + /// + /// Returns true if FlashLedgerTransaction instances are equal + /// + /// Instance of FlashLedgerTransaction to be compared + /// Boolean + public bool Equals(FlashLedgerTransaction input) + { + if (input == null) + { + return false; + } + return base.Equals(input) && + ( + this.FlashTransaction == input.FlashTransaction || + (this.FlashTransaction != null && + this.FlashTransaction.Equals(input.FlashTransaction)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.FlashTransaction != null) + { + hashCode = (hashCode * 59) + this.FlashTransaction.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransactionAllOf.cs b/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransactionAllOf.cs new file mode 100644 index 000000000..44be04391 --- /dev/null +++ b/src/RadixDlt.CoreApiSdk/generated/Model/FlashLedgerTransactionAllOf.cs @@ -0,0 +1,193 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +/* + * Radix Core API - Babylon + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.0.4 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using FileParameter = RadixDlt.CoreApiSdk.Client.FileParameter; +using OpenAPIDateConverter = RadixDlt.CoreApiSdk.Client.OpenAPIDateConverter; + +namespace RadixDlt.CoreApiSdk.Model +{ + /// + /// FlashLedgerTransactionAllOf + /// + [DataContract(Name = "FlashLedgerTransaction_allOf")] + public partial class FlashLedgerTransactionAllOf : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FlashLedgerTransactionAllOf() { } + /// + /// Initializes a new instance of the class. + /// + /// flashTransaction (required). + public FlashLedgerTransactionAllOf(FlashTransaction flashTransaction = default(FlashTransaction)) + { + // to ensure "flashTransaction" is required (not null) + if (flashTransaction == null) + { + throw new ArgumentNullException("flashTransaction is a required property for FlashLedgerTransactionAllOf and cannot be null"); + } + this.FlashTransaction = flashTransaction; + } + + /// + /// Gets or Sets FlashTransaction + /// + [DataMember(Name = "flash_transaction", IsRequired = true, EmitDefaultValue = true)] + public FlashTransaction FlashTransaction { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FlashLedgerTransactionAllOf {\n"); + sb.Append(" FlashTransaction: ").Append(FlashTransaction).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FlashLedgerTransactionAllOf); + } + + /// + /// Returns true if FlashLedgerTransactionAllOf instances are equal + /// + /// Instance of FlashLedgerTransactionAllOf to be compared + /// Boolean + public bool Equals(FlashLedgerTransactionAllOf input) + { + if (input == null) + { + return false; + } + return + ( + this.FlashTransaction == input.FlashTransaction || + (this.FlashTransaction != null && + this.FlashTransaction.Equals(input.FlashTransaction)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FlashTransaction != null) + { + hashCode = (hashCode * 59) + this.FlashTransaction.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/FlashTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/FlashTransaction.cs new file mode 100644 index 000000000..ce01c0707 --- /dev/null +++ b/src/RadixDlt.CoreApiSdk/generated/Model/FlashTransaction.cs @@ -0,0 +1,194 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +/* + * Radix Core API - Babylon + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.0.4 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using FileParameter = RadixDlt.CoreApiSdk.Client.FileParameter; +using OpenAPIDateConverter = RadixDlt.CoreApiSdk.Client.OpenAPIDateConverter; + +namespace RadixDlt.CoreApiSdk.Model +{ + /// + /// FlashTransaction + /// + [DataContract(Name = "FlashTransaction")] + public partial class FlashTransaction : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FlashTransaction() { } + /// + /// Initializes a new instance of the class. + /// + /// flashedSubstates (required). + public FlashTransaction(List flashedSubstates = default(List)) + { + // to ensure "flashedSubstates" is required (not null) + if (flashedSubstates == null) + { + throw new ArgumentNullException("flashedSubstates is a required property for FlashTransaction and cannot be null"); + } + this.FlashedSubstates = flashedSubstates; + } + + /// + /// Gets or Sets FlashedSubstates + /// + [DataMember(Name = "flashed_substates", IsRequired = true, EmitDefaultValue = true)] + public List FlashedSubstates { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FlashTransaction {\n"); + sb.Append(" FlashedSubstates: ").Append(FlashedSubstates).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FlashTransaction); + } + + /// + /// Returns true if FlashTransaction instances are equal + /// + /// Instance of FlashTransaction to be compared + /// Boolean + public bool Equals(FlashTransaction input) + { + if (input == null) + { + return false; + } + return + ( + this.FlashedSubstates == input.FlashedSubstates || + this.FlashedSubstates != null && + input.FlashedSubstates != null && + this.FlashedSubstates.SequenceEqual(input.FlashedSubstates) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FlashedSubstates != null) + { + hashCode = (hashCode * 59) + this.FlashedSubstates.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/FlashedSubstate.cs b/src/RadixDlt.CoreApiSdk/generated/Model/FlashedSubstate.cs new file mode 100644 index 000000000..c82627abc --- /dev/null +++ b/src/RadixDlt.CoreApiSdk/generated/Model/FlashedSubstate.cs @@ -0,0 +1,255 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +/* + * Radix Core API - Babylon + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.0.4 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using FileParameter = RadixDlt.CoreApiSdk.Client.FileParameter; +using OpenAPIDateConverter = RadixDlt.CoreApiSdk.Client.OpenAPIDateConverter; + +namespace RadixDlt.CoreApiSdk.Model +{ + /// + /// FlashedSubstate + /// + [DataContract(Name = "FlashedSubstate")] + public partial class FlashedSubstate : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FlashedSubstate() { } + /// + /// Initializes a new instance of the class. + /// + /// Bech32m-encoded human readable version of the entity's address (ie the entity's node id) (required). + /// partitionNumber (required). + /// substateKey (required). + /// The hex-encoded, SBOR-encoded substate data bytes. (required). + public FlashedSubstate(string entityAddress = default(string), int partitionNumber = default(int), SubstateKey substateKey = default(SubstateKey), string value = default(string)) + { + // to ensure "entityAddress" is required (not null) + if (entityAddress == null) + { + throw new ArgumentNullException("entityAddress is a required property for FlashedSubstate and cannot be null"); + } + this.EntityAddress = entityAddress; + this.PartitionNumber = partitionNumber; + // to ensure "substateKey" is required (not null) + if (substateKey == null) + { + throw new ArgumentNullException("substateKey is a required property for FlashedSubstate and cannot be null"); + } + this.SubstateKey = substateKey; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for FlashedSubstate and cannot be null"); + } + this.Value = value; + } + + /// + /// Bech32m-encoded human readable version of the entity's address (ie the entity's node id) + /// + /// Bech32m-encoded human readable version of the entity's address (ie the entity's node id) + [DataMember(Name = "entity_address", IsRequired = true, EmitDefaultValue = true)] + public string EntityAddress { get; set; } + + /// + /// Gets or Sets PartitionNumber + /// + [DataMember(Name = "partition_number", IsRequired = true, EmitDefaultValue = true)] + public int PartitionNumber { get; set; } + + /// + /// Gets or Sets SubstateKey + /// + [DataMember(Name = "substate_key", IsRequired = true, EmitDefaultValue = true)] + public SubstateKey SubstateKey { get; set; } + + /// + /// The hex-encoded, SBOR-encoded substate data bytes. + /// + /// The hex-encoded, SBOR-encoded substate data bytes. + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FlashedSubstate {\n"); + sb.Append(" EntityAddress: ").Append(EntityAddress).Append("\n"); + sb.Append(" PartitionNumber: ").Append(PartitionNumber).Append("\n"); + sb.Append(" SubstateKey: ").Append(SubstateKey).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FlashedSubstate); + } + + /// + /// Returns true if FlashedSubstate instances are equal + /// + /// Instance of FlashedSubstate to be compared + /// Boolean + public bool Equals(FlashedSubstate input) + { + if (input == null) + { + return false; + } + return + ( + this.EntityAddress == input.EntityAddress || + (this.EntityAddress != null && + this.EntityAddress.Equals(input.EntityAddress)) + ) && + ( + this.PartitionNumber == input.PartitionNumber || + this.PartitionNumber.Equals(input.PartitionNumber) + ) && + ( + this.SubstateKey == input.SubstateKey || + (this.SubstateKey != null && + this.SubstateKey.Equals(input.SubstateKey)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EntityAddress != null) + { + hashCode = (hashCode * 59) + this.EntityAddress.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PartitionNumber.GetHashCode(); + if (this.SubstateKey != null) + { + hashCode = (hashCode * 59) + this.SubstateKey.GetHashCode(); + } + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/GenesisLedgerTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/GenesisLedgerTransaction.cs index f49a02fbd..df05f7f37 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/GenesisLedgerTransaction.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/GenesisLedgerTransaction.cs @@ -95,6 +95,7 @@ namespace RadixDlt.CoreApiSdk.Model /// [DataContract(Name = "GenesisLedgerTransaction")] [JsonConverter(typeof(JsonSubtypes), "type")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "Flash")] [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "Genesis")] [JsonSubtypes.KnownSubType(typeof(RoundUpdateLedgerTransaction), "RoundUpdate")] [JsonSubtypes.KnownSubType(typeof(UserLedgerTransaction), "User")] diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransaction.cs index 04060753d..c1e3d9cc4 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransaction.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransaction.cs @@ -95,6 +95,8 @@ namespace RadixDlt.CoreApiSdk.Model /// [DataContract(Name = "LedgerTransaction")] [JsonConverter(typeof(JsonSubtypes), "type")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "Flash")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "FlashLedgerTransaction")] [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "Genesis")] [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "GenesisLedgerTransaction")] [JsonSubtypes.KnownSubType(typeof(RoundUpdateLedgerTransaction), "RoundUpdate")] diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransactionType.cs b/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransactionType.cs index e15b92bb1..f52cece35 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransactionType.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/LedgerTransactionType.cs @@ -112,7 +112,13 @@ public enum LedgerTransactionType /// Enum RoundUpdate for value: RoundUpdate /// [EnumMember(Value = "RoundUpdate")] - RoundUpdate = 3 + RoundUpdate = 3, + + /// + /// Enum Flash for value: Flash + /// + [EnumMember(Value = "Flash")] + Flash = 4 } diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/LtsCommittedTransactionOutcome.cs b/src/RadixDlt.CoreApiSdk/generated/Model/LtsCommittedTransactionOutcome.cs index 7b90ead5d..3ada3c222 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/LtsCommittedTransactionOutcome.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/LtsCommittedTransactionOutcome.cs @@ -90,7 +90,7 @@ namespace RadixDlt.CoreApiSdk.Model { /// - /// For the given transaction, contains the status, total fee summary and individual entity resource balance changes. The balance changes accounts for the fee payments as well. For failed transactions, current implementation does not return any balance changes (not even the fee payments). This will also change in a future update. + /// For the given transaction, contains the status, total fee summary and individual entity resource balance changes. The balance changes accounts for the fee payments as well. /// [DataContract(Name = "LtsCommittedTransactionOutcome")] public partial class LtsCommittedTransactionOutcome : IEquatable diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/LtsTransactionIntentStatus.cs b/src/RadixDlt.CoreApiSdk/generated/Model/LtsTransactionIntentStatus.cs index 11418ee85..7c6cb9894 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/LtsTransactionIntentStatus.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/LtsTransactionIntentStatus.cs @@ -90,9 +90,9 @@ namespace RadixDlt.CoreApiSdk.Model { /// - /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction /// - /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction [JsonConverter(typeof(StringEnumConverter))] public enum LtsTransactionIntentStatus { diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/RemoteGenericSubstitutionAllOf.cs b/src/RadixDlt.CoreApiSdk/generated/Model/RemoteGenericSubstitutionAllOf.cs index 79b8c118a..f1e88c3af 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/RemoteGenericSubstitutionAllOf.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/RemoteGenericSubstitutionAllOf.cs @@ -90,7 +90,7 @@ namespace RadixDlt.CoreApiSdk.Model { /// - /// The generic substitution is provided remotely by a blueprint type. The `resolved_full_type_id` is added by the node, and is always present in the model returned from the transaction stream API. Other APIs may not resolve the type from the blueprint definition. + /// The generic substitution is provided remotely by a blueprint type. The `resolved_full_type_id` is added by the node, and is always present in the model returned from the transaction stream API. Other APIs may not resolve the type from the blueprint definition. /// [DataContract(Name = "RemoteGenericSubstitution_allOf")] public partial class RemoteGenericSubstitutionAllOf : IEquatable diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/RoundUpdateLedgerTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/RoundUpdateLedgerTransaction.cs index 9515a357f..1c9d772fa 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/RoundUpdateLedgerTransaction.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/RoundUpdateLedgerTransaction.cs @@ -95,6 +95,7 @@ namespace RadixDlt.CoreApiSdk.Model /// [DataContract(Name = "RoundUpdateLedgerTransaction")] [JsonConverter(typeof(JsonSubtypes), "type")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "Flash")] [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "Genesis")] [JsonSubtypes.KnownSubType(typeof(RoundUpdateLedgerTransaction), "RoundUpdate")] [JsonSubtypes.KnownSubType(typeof(UserLedgerTransaction), "User")] diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/TransactionIntentStatus.cs b/src/RadixDlt.CoreApiSdk/generated/Model/TransactionIntentStatus.cs index 0877e3440..6b0c81566 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/TransactionIntentStatus.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/TransactionIntentStatus.cs @@ -90,9 +90,9 @@ namespace RadixDlt.CoreApiSdk.Model { /// - /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction /// - /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction + /// The status of the transaction intent, as determined by the node. FateUncertain or FateUncertainButLikelyRejection mean that it's still possible that a payload containing the transaction [JsonConverter(typeof(StringEnumConverter))] public enum TransactionIntentStatus { diff --git a/src/RadixDlt.CoreApiSdk/generated/Model/UserLedgerTransaction.cs b/src/RadixDlt.CoreApiSdk/generated/Model/UserLedgerTransaction.cs index d0cebf826..1569a6f05 100644 --- a/src/RadixDlt.CoreApiSdk/generated/Model/UserLedgerTransaction.cs +++ b/src/RadixDlt.CoreApiSdk/generated/Model/UserLedgerTransaction.cs @@ -95,6 +95,7 @@ namespace RadixDlt.CoreApiSdk.Model /// [DataContract(Name = "UserLedgerTransaction")] [JsonConverter(typeof(JsonSubtypes), "type")] + [JsonSubtypes.KnownSubType(typeof(FlashLedgerTransaction), "Flash")] [JsonSubtypes.KnownSubType(typeof(GenesisLedgerTransaction), "Genesis")] [JsonSubtypes.KnownSubType(typeof(RoundUpdateLedgerTransaction), "RoundUpdate")] [JsonSubtypes.KnownSubType(typeof(UserLedgerTransaction), "User")] diff --git a/src/RadixDlt.NetworkGateway.Abstractions/Model/LedgerTransactionType.cs b/src/RadixDlt.NetworkGateway.Abstractions/Model/LedgerTransactionType.cs index 7ec23d1f0..bad21d7c5 100644 --- a/src/RadixDlt.NetworkGateway.Abstractions/Model/LedgerTransactionType.cs +++ b/src/RadixDlt.NetworkGateway.Abstractions/Model/LedgerTransactionType.cs @@ -69,4 +69,5 @@ public enum LedgerTransactionType Genesis, User, RoundUpdate, + Flash, } diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/CommonDbContext.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/CommonDbContext.cs index 4c1ae76c7..69d0bb60c 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/CommonDbContext.cs +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/CommonDbContext.cs @@ -210,7 +210,8 @@ private static void HookupTransactions(ModelBuilder modelBuilder) .HasDiscriminator(DiscriminatorColumnName) .HasValue(LedgerTransactionType.User) .HasValue(LedgerTransactionType.RoundUpdate) - .HasValue(LedgerTransactionType.Genesis); + .HasValue(LedgerTransactionType.Genesis) + .HasValue(LedgerTransactionType.Flash); modelBuilder .Entity() diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PostgresLedgerExtenderService.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PostgresLedgerExtenderService.cs index 4cc6d6b09..82e364689 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PostgresLedgerExtenderService.cs +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PostgresLedgerExtenderService.cs @@ -513,7 +513,8 @@ private async Task ProcessTransactions(ReadWriteDbContext db RawPayload = ult.NotarizedTransaction.GetPayloadBytes(), }, CoreModel.RoundUpdateLedgerTransaction => new RoundUpdateLedgerTransaction(), - _ => throw new UnreachableException(), + CoreModel.FlashLedgerTransaction => new FlashLedgerTransaction(), + _ => throw new UnreachableException($"Unsupported transaction type: {committedTransaction.LedgerTransaction.GetType()}"), }; ledgerTransaction.StateVersion = stateVersion; diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/WriteHelper.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/WriteHelper.cs index e4553d288..3fcafb91e 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/WriteHelper.cs +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/WriteHelper.cs @@ -256,6 +256,8 @@ public async Task CopyLedgerTransaction(ICollection enti switch (lt) { case GenesisLedgerTransaction: + case RoundUpdateLedgerTransaction: + case FlashLedgerTransaction: await writer.WriteNullAsync(token); await writer.WriteNullAsync(token); await writer.WriteNullAsync(token); @@ -269,13 +271,6 @@ public async Task CopyLedgerTransaction(ICollection enti await writer.WriteAsync(ult.Message, NpgsqlDbType.Jsonb, token); await writer.WriteAsync(ult.RawPayload, NpgsqlDbType.Bytea, token); break; - case RoundUpdateLedgerTransaction: - await writer.WriteNullAsync(token); - await writer.WriteNullAsync(token); - await writer.WriteNullAsync(token); - await writer.WriteNullAsync(token); - await writer.WriteNullAsync(token); - break; default: throw new ArgumentOutOfRangeException(nameof(lt), lt, null); } diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.Designer.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.Designer.cs new file mode 100644 index 000000000..f3b8bcedd --- /dev/null +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.Designer.cs @@ -0,0 +1,2348 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +// +using System; +using System.Collections.Generic; +using System.Numerics; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using RadixDlt.NetworkGateway.Abstractions.Addressing; +using RadixDlt.NetworkGateway.Abstractions.Model; +using RadixDlt.NetworkGateway.PostgresIntegration; +using RadixDlt.NetworkGateway.PostgresIntegration.Models; + +#nullable disable + +namespace RadixDlt.NetworkGateway.PostgresIntegration.Migrations +{ + [DbContext(typeof(MigrationsDbContext))] + [Migration("20240110094622_AddFlashTransactionType")] + partial class AddFlashTransactionType + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.11") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "account_default_deposit_rule", new[] { "accept", "reject", "allow_existing" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "account_resource_preference_rule", new[] { "allowed", "disallowed" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "entity_type", new[] { "global_consensus_manager", "global_fungible_resource", "global_non_fungible_resource", "global_generic_component", "internal_generic_component", "global_account_component", "global_package", "internal_key_value_store", "internal_fungible_vault", "internal_non_fungible_vault", "global_validator", "global_access_controller", "global_identity", "global_one_resource_pool", "global_two_resource_pool", "global_multi_resource_pool", "global_transaction_tracker" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_event_type", new[] { "withdrawal", "deposit" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_operation_type", new[] { "resource_in_use", "account_deposited_into", "account_withdrawn_from" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_origin_type", new[] { "user", "epoch_change" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_type", new[] { "origin", "event", "manifest_address", "affected_global_entity" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_status", new[] { "succeeded", "failed" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_type", new[] { "genesis", "user", "round_update", "flash" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "module_id", new[] { "main", "metadata", "royalty", "role_assignment" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "non_fungible_id_type", new[] { "string", "integer", "bytes", "ruid" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "package_vm_type", new[] { "native", "scrypto_v1" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "pending_transaction_intent_ledger_status", new[] { "unknown", "committed", "commit_pending", "permanent_rejection", "possible_to_commit", "likely_but_not_certain_rejection" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "pending_transaction_payload_ledger_status", new[] { "unknown", "committed", "commit_pending", "clashing_commit", "permanently_rejected", "transiently_accepted", "transiently_rejected" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "public_key_type", new[] { "ecdsa_secp256k1", "eddsa_ed25519" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "resource_type", new[] { "fungible", "non_fungible" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "sbor_type_kind", new[] { "well_known", "schema_local" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "state_type", new[] { "json", "sbor" }); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.AccountDefaultDepositRuleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccountEntityId") + .HasColumnType("bigint") + .HasColumnName("account_entity_id"); + + b.Property("DefaultDepositRule") + .HasColumnType("account_default_deposit_rule") + .HasColumnName("default_deposit_rule"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.HasKey("Id"); + + b.HasIndex("AccountEntityId", "FromStateVersion"); + + b.ToTable("account_default_deposit_rule_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.AccountResourcePreferenceRuleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccountEntityId") + .HasColumnType("bigint") + .HasColumnName("account_entity_id"); + + b.Property("AccountResourcePreferenceRule") + .HasColumnType("account_resource_preference_rule") + .HasColumnName("account_resource_preference_rule"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("AccountEntityId", "ResourceEntityId", "FromStateVersion"); + + b.ToTable("account_resource_preference_rule_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ComponentMethodRoyaltyEntryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsLocked") + .HasColumnType("boolean") + .HasColumnName("is_locked"); + + b.Property("MethodName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("method_name"); + + b.Property("RoyaltyAmount") + .HasColumnType("jsonb") + .HasColumnName("royalty_amount"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.HasIndex("EntityId", "MethodName", "FromStateVersion"); + + b.ToTable("component_method_royalty_entry_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasColumnType("text") + .HasColumnName("address"); + + b.Property>("AncestorIds") + .HasColumnType("bigint[]") + .HasColumnName("ancestor_ids"); + + b.Property>("CorrelatedEntities") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("correlated_entities"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("GlobalAncestorId") + .HasColumnType("bigint") + .HasColumnName("global_ancestor_id"); + + b.Property("IsGlobal") + .HasColumnType("boolean") + .HasColumnName("is_global"); + + b.Property("OwnerAncestorId") + .HasColumnType("bigint") + .HasColumnName("owner_ancestor_id"); + + b.Property("ParentAncestorId") + .HasColumnType("bigint") + .HasColumnName("parent_ancestor_id"); + + b.Property("discriminator") + .HasColumnType("entity_type"); + + b.HasKey("Id"); + + b.HasIndex("Address") + .IsUnique(); + + b.HasIndex("FromStateVersion") + .HasFilter("discriminator = 'global_validator'"); + + b.ToTable("entities"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityMetadataAggregateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property>("MetadataIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("metadata_ids"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.ToTable("entity_metadata_aggregate_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityMetadataHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted"); + + b.Property("IsLocked") + .HasColumnType("boolean") + .HasColumnName("is_locked"); + + b.Property("Key") + .IsRequired() + .HasColumnType("text") + .HasColumnName("key"); + + b.Property("Value") + .HasColumnType("bytea") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "Key", "FromStateVersion"); + + b.ToTable("entity_metadata_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityResourceAggregateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property>("FungibleResourceEntityIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("fungible_resource_entity_ids"); + + b.Property>("FungibleResourceSignificantUpdateStateVersions") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("fungible_resource_significant_update_state_versions"); + + b.Property>("NonFungibleResourceEntityIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("non_fungible_resource_entity_ids"); + + b.Property>("NonFungibleResourceSignificantUpdateStateVersions") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("non_fungible_resource_significant_update_state_versions"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.ToTable("entity_resource_aggregate_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityResourceAggregatedVaultsHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property("discriminator") + .HasColumnType("resource_type"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "ResourceEntityId", "FromStateVersion"); + + b.ToTable("entity_resource_aggregated_vaults_history"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityResourceVaultAggregateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property>("VaultEntityIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("vault_entity_ids"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "ResourceEntityId", "FromStateVersion"); + + b.ToTable("entity_resource_vault_aggregate_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityRoleAssignmentsAggregateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property>("EntryIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("entry_ids"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("OwnerRoleId") + .HasColumnType("bigint") + .HasColumnName("owner_role_id"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.ToTable("entity_role_assignments_aggregate_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityRoleAssignmentsEntryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted"); + + b.Property("KeyModule") + .HasColumnType("module_id") + .HasColumnName("key_module"); + + b.Property("KeyRole") + .IsRequired() + .HasColumnType("text") + .HasColumnName("key_role"); + + b.Property("RoleAssignments") + .HasColumnType("jsonb") + .HasColumnName("role_assignments"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "KeyRole", "KeyModule", "FromStateVersion"); + + b.ToTable("entity_role_assignments_entry_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityRoleAssignmentsOwnerRoleHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("RoleAssignments") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("role_assignments"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.ToTable("entity_role_assignments_owner_role_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityVaultHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("GlobalEntityId") + .HasColumnType("bigint") + .HasColumnName("global_entity_id"); + + b.Property("OwnerEntityId") + .HasColumnType("bigint") + .HasColumnName("owner_entity_id"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property("VaultEntityId") + .HasColumnType("bigint") + .HasColumnName("vault_entity_id"); + + b.Property("discriminator") + .HasColumnType("resource_type"); + + b.HasKey("Id"); + + b.HasIndex("GlobalEntityId", "FromStateVersion") + .HasFilter("is_royalty_vault = true"); + + b.HasIndex("OwnerEntityId", "FromStateVersion") + .HasFilter("is_royalty_vault = true"); + + b.HasIndex("VaultEntityId", "FromStateVersion") + .HasFilter("discriminator = 'non_fungible'"); + + b.HasIndex("GlobalEntityId", "VaultEntityId", "FromStateVersion"); + + b.HasIndex("Id", "ResourceEntityId", "FromStateVersion"); + + b.HasIndex("OwnerEntityId", "VaultEntityId", "FromStateVersion"); + + b.ToTable("entity_vault_history"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.KeyValueStoreEntryHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted"); + + b.Property("IsLocked") + .HasColumnType("boolean") + .HasColumnName("is_locked"); + + b.Property("Key") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("key"); + + b.Property("KeyValueStoreEntityId") + .HasColumnType("bigint") + .HasColumnName("key_value_store_entity_id"); + + b.Property("Value") + .HasColumnType("bytea") + .HasColumnName("value"); + + b.HasKey("Id"); + + b.HasIndex("KeyValueStoreEntityId", "Key", "FromStateVersion"); + + b.ToTable("key_value_store_entry_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.KeyValueStoreSchemaHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("KeySborTypeKind") + .HasColumnType("sbor_type_kind") + .HasColumnName("key_sbor_type_kind"); + + b.Property("KeySchemaDefiningEntityId") + .HasColumnType("bigint") + .HasColumnName("key_schema_defining_entity_id"); + + b.Property("KeySchemaHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("key_schema_hash"); + + b.Property("KeyTypeIndex") + .HasColumnType("bigint") + .HasColumnName("key_type_index"); + + b.Property("KeyValueStoreEntityId") + .HasColumnType("bigint") + .HasColumnName("key_value_store_entity_id"); + + b.Property("ValueSborTypeKind") + .HasColumnType("sbor_type_kind") + .HasColumnName("value_sbor_type_kind"); + + b.Property("ValueSchemaDefiningEntityId") + .HasColumnType("bigint") + .HasColumnName("value_schema_defining_entity_id"); + + b.Property("ValueSchemaHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("value_schema_hash"); + + b.Property("ValueTypeIndex") + .HasColumnType("bigint") + .HasColumnName("value_type_index"); + + b.HasKey("Id"); + + b.HasIndex("KeyValueStoreEntityId", "FromStateVersion"); + + b.ToTable("key_value_store_schema_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransaction", b => + { + b.Property("StateVersion") + .HasColumnType("bigint") + .HasColumnName("state_version"); + + b.Property("AffectedGlobalEntities") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("affected_global_entities"); + + b.Property("BalanceChanges") + .HasColumnType("jsonb") + .HasColumnName("balance_changes"); + + b.Property("CreatedTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_timestamp"); + + b.Property("Epoch") + .HasColumnType("bigint") + .HasColumnName("epoch"); + + b.Property("FeePaid") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("fee_paid"); + + b.Property("IndexInEpoch") + .HasColumnType("bigint") + .HasColumnName("index_in_epoch"); + + b.Property("IndexInRound") + .HasColumnType("bigint") + .HasColumnName("index_in_round"); + + b.Property("NormalizedRoundTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("normalized_round_timestamp"); + + b.Property("ReceiptCostingParameters") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("receipt_costing_parameters"); + + b.Property("ReceiptErrorMessage") + .HasColumnType("text") + .HasColumnName("receipt_error_message"); + + b.Property("ReceiptEventEmitters") + .IsRequired() + .HasColumnType("jsonb[]") + .HasColumnName("receipt_event_emitters"); + + b.Property("ReceiptEventNames") + .IsRequired() + .HasColumnType("text[]") + .HasColumnName("receipt_event_names"); + + b.Property("ReceiptEventSborTypeKinds") + .IsRequired() + .HasColumnType("sbor_type_kind[]") + .HasColumnName("receipt_event_sbor_type_kinds"); + + b.Property("ReceiptEventSbors") + .IsRequired() + .HasColumnType("bytea[]") + .HasColumnName("receipt_event_sbors"); + + b.Property("ReceiptEventSchemaEntityIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("receipt_event_schema_entity_ids"); + + b.Property("ReceiptEventSchemaHashes") + .IsRequired() + .HasColumnType("bytea[]") + .HasColumnName("receipt_event_schema_hashes"); + + b.Property("ReceiptEventTypeIndexes") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("receipt_event_type_indexes"); + + b.Property("ReceiptFeeDestination") + .HasColumnType("jsonb") + .HasColumnName("receipt_fee_destination"); + + b.Property("ReceiptFeeSource") + .HasColumnType("jsonb") + .HasColumnName("receipt_fee_source"); + + b.Property("ReceiptFeeSummary") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("receipt_fee_summary"); + + b.Property("ReceiptNextEpoch") + .HasColumnType("jsonb") + .HasColumnName("receipt_next_epoch"); + + b.Property("ReceiptOutput") + .HasColumnType("jsonb") + .HasColumnName("receipt_output"); + + b.Property("ReceiptStateUpdates") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("receipt_state_updates"); + + b.Property("ReceiptStatus") + .HasColumnType("ledger_transaction_status") + .HasColumnName("receipt_status"); + + b.Property("ReceiptTreeHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("receipt_tree_hash"); + + b.Property("RoundInEpoch") + .HasColumnType("bigint") + .HasColumnName("round_in_epoch"); + + b.Property("RoundTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("round_timestamp"); + + b.Property("StateTreeHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("state_tree_hash"); + + b.Property("TipPaid") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("tip_paid"); + + b.Property("TransactionTreeHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("transaction_tree_hash"); + + b.Property("discriminator") + .HasColumnType("ledger_transaction_type"); + + b.HasKey("StateVersion"); + + b.HasIndex("RoundTimestamp"); + + b.HasIndex("Epoch", "RoundInEpoch") + .IsUnique() + .HasFilter("index_in_round = 0"); + + b.ToTable("ledger_transactions"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransactionMarker", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("StateVersion") + .HasColumnType("bigint") + .HasColumnName("state_version"); + + b.Property("discriminator") + .HasColumnType("ledger_transaction_marker_type"); + + b.HasKey("Id"); + + b.HasIndex("StateVersion"); + + b.ToTable("ledger_transaction_markers"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NetworkConfiguration", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("AddressTypeDefinitions") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("address_type_definitions"); + + b.Property("GenesisEpoch") + .HasColumnType("bigint") + .HasColumnName("genesis_epoch"); + + b.Property("GenesisRound") + .HasColumnType("bigint") + .HasColumnName("genesis_round"); + + b.Property("HrpDefinition") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("hrp_definition"); + + b.Property("NetworkHrpSuffix") + .IsRequired() + .HasColumnType("text") + .HasColumnName("network_hrp_suffix"); + + b.Property("NetworkId") + .HasColumnType("smallint") + .HasColumnName("network_id"); + + b.Property("NetworkName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("network_name"); + + b.Property("WellKnownAddresses") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("well_known_addresses"); + + b.HasKey("Id"); + + b.ToTable("network_configuration"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NonFungibleIdData", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("NonFungibleId") + .IsRequired() + .HasColumnType("text") + .HasColumnName("non_fungible_id"); + + b.Property("NonFungibleResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("non_fungible_resource_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("NonFungibleResourceEntityId", "FromStateVersion"); + + b.HasIndex("NonFungibleResourceEntityId", "NonFungibleId", "FromStateVersion") + .IsUnique(); + + b.ToTable("non_fungible_id_data"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NonFungibleIdDataHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Data") + .HasColumnType("bytea") + .HasColumnName("data"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("IsDeleted") + .HasColumnType("boolean") + .HasColumnName("is_deleted"); + + b.Property("IsLocked") + .HasColumnType("boolean") + .HasColumnName("is_locked"); + + b.Property("NonFungibleIdDataId") + .HasColumnType("bigint") + .HasColumnName("non_fungible_id_data_id"); + + b.HasKey("Id"); + + b.HasIndex("NonFungibleIdDataId", "FromStateVersion"); + + b.ToTable("non_fungible_id_data_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NonFungibleIdLocationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("NonFungibleIdDataId") + .HasColumnType("bigint") + .HasColumnName("non_fungible_id_data_id"); + + b.Property("VaultEntityId") + .HasColumnType("bigint") + .HasColumnName("vault_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("NonFungibleIdDataId", "FromStateVersion"); + + b.ToTable("non_fungible_id_location_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NonFungibleIdStoreHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property>("NonFungibleIdDataIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("non_fungible_id_data_ids"); + + b.Property("NonFungibleResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("non_fungible_resource_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("NonFungibleResourceEntityId", "FromStateVersion"); + + b.ToTable("non_fungible_id_store_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.NonFungibleSchemaHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property("SborTypeKind") + .HasColumnType("sbor_type_kind") + .HasColumnName("sbor_type_kind"); + + b.Property("SchemaDefiningEntityId") + .HasColumnType("bigint") + .HasColumnName("schema_defining_entity_id"); + + b.Property("SchemaHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("schema_hash"); + + b.Property("TypeIndex") + .HasColumnType("bigint") + .HasColumnName("type_index"); + + b.HasKey("Id"); + + b.HasIndex("ResourceEntityId", "FromStateVersion"); + + b.ToTable("non_fungible_schema_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PackageBlueprintHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AuthTemplate") + .HasColumnType("jsonb") + .HasColumnName("auth_template"); + + b.Property("AuthTemplateIsLocked") + .HasColumnType("boolean") + .HasColumnName("auth_template_is_locked"); + + b.Property("Definition") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("definition"); + + b.Property>("DependantEntityIds") + .HasColumnType("bigint[]") + .HasColumnName("dependant_entity_ids"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text") + .HasColumnName("name"); + + b.Property("PackageEntityId") + .HasColumnType("bigint") + .HasColumnName("package_entity_id"); + + b.Property("RoyaltyConfig") + .HasColumnType("jsonb") + .HasColumnName("royalty_config"); + + b.Property("RoyaltyConfigIsLocked") + .HasColumnType("boolean") + .HasColumnName("royalty_config_is_locked"); + + b.Property("Version") + .IsRequired() + .HasColumnType("text") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex("PackageEntityId", "FromStateVersion"); + + b.HasIndex("PackageEntityId", "Name", "Version", "FromStateVersion"); + + b.ToTable("package_blueprint_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PackageCodeHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("code"); + + b.Property("CodeHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("code_hash"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("PackageEntityId") + .HasColumnType("bigint") + .HasColumnName("package_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("PackageEntityId", "FromStateVersion"); + + b.ToTable("package_code_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EndEpochExclusive") + .HasColumnType("numeric(20,0)") + .HasColumnName("end_epoch_exclusive"); + + b.Property("IntentHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("intent_hash"); + + b.Property("PayloadHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("payload_hash"); + + b.Property("PayloadId") + .HasColumnType("bigint") + .HasColumnName("payload_id"); + + b.Property("VersionControl") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("xid") + .HasColumnName("xmin"); + + b.HasKey("Id"); + + b.HasIndex("IntentHash"); + + b.HasIndex("PayloadHash") + .IsUnique(); + + b.ToTable("pending_transactions"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionPayload", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("NotarizedTransactionBlob") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("notarized_transaction_blob"); + + b.Property("PendingTransactionId") + .HasColumnType("bigint") + .HasColumnName("pending_transaction_id"); + + b.HasKey("Id"); + + b.HasIndex("PendingTransactionId") + .IsUnique(); + + b.ToTable("pending_transaction_payloads"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ResourceEntitySupplyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property("TotalBurned") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("total_burned"); + + b.Property("TotalMinted") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("total_minted"); + + b.Property("TotalSupply") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("total_supply"); + + b.HasKey("Id"); + + b.HasIndex("ResourceEntityId", "FromStateVersion"); + + b.ToTable("resource_entity_supply_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.SchemaHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("Schema") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("schema"); + + b.Property("SchemaHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("schema_hash"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.HasIndex("SchemaHash", "FromStateVersion"); + + b.ToTable("schema_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.StateHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EntityId") + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("discriminator") + .HasColumnType("state_type"); + + b.HasKey("Id"); + + b.HasIndex("EntityId", "FromStateVersion"); + + b.ToTable("state_history"); + + b.HasDiscriminator("discriminator"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ValidatorActiveSetHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Epoch") + .HasColumnType("bigint") + .HasColumnName("epoch"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("Stake") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("stake"); + + b.Property("ValidatorPublicKeyHistoryId") + .HasColumnType("bigint") + .HasColumnName("validator_public_key_history_id"); + + b.HasKey("Id"); + + b.HasIndex("Epoch"); + + b.HasIndex("FromStateVersion"); + + b.HasIndex("ValidatorPublicKeyHistoryId"); + + b.ToTable("validator_active_set_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ValidatorEmissionStatistics", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("EpochNumber") + .HasColumnType("bigint") + .HasColumnName("epoch_number"); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("ProposalsMade") + .HasColumnType("bigint") + .HasColumnName("proposals_made"); + + b.Property("ProposalsMissed") + .HasColumnType("bigint") + .HasColumnName("proposals_missed"); + + b.Property("ValidatorEntityId") + .HasColumnType("bigint") + .HasColumnName("validator_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("ValidatorEntityId", "EpochNumber"); + + b.ToTable("validator_emission_statistics"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ValidatorPublicKeyHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FromStateVersion") + .HasColumnType("bigint") + .HasColumnName("from_state_version"); + + b.Property("Key") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("key"); + + b.Property("KeyType") + .HasColumnType("public_key_type") + .HasColumnName("key_type"); + + b.Property("ValidatorEntityId") + .HasColumnType("bigint") + .HasColumnName("validator_entity_id"); + + b.HasKey("Id"); + + b.HasIndex("ValidatorEntityId", "FromStateVersion"); + + b.HasIndex("ValidatorEntityId", "KeyType", "Key"); + + b.ToTable("validator_public_key_history"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalAccessControllerEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalAccessController); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalAccountEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalAccountComponent); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalConsensusManager", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalConsensusManager); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalFungibleResourceEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("Divisibility") + .HasColumnType("integer") + .HasColumnName("divisibility"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalFungibleResource); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalGenericComponentEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalGenericComponent); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalIdentityEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalIdentity); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalMultiResourcePoolEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalMultiResourcePool); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalNonFungibleResourceEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("NonFungibleIdType") + .HasColumnType("non_fungible_id_type") + .HasColumnName("non_fungible_id_type"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalNonFungibleResource); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalOneResourcePoolEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalOneResourcePool); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalPackageEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.Property("VmType") + .HasColumnType("package_vm_type") + .HasColumnName("vm_type"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalPackage); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalTransactionTrackerEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalTransactionTracker); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalTwoResourcePoolEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalTwoResourcePool); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GlobalValidatorEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("LockedOwnerStakeUnitVault") + .HasColumnType("bigint") + .HasColumnName("locked_owner_stake_unit_vault_entity_id"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.Property("PendingOwnerStakeUnitUnlockVault") + .HasColumnType("bigint") + .HasColumnName("pending_owner_stake_unit_unlock_vault_entity_id"); + + b.Property("PendingXrdWithdrawVault") + .HasColumnType("bigint") + .HasColumnName("pending_xrd_withdraw_vault_entity_id"); + + b.Property("StakeVaultEntityId") + .HasColumnType("bigint") + .HasColumnName("stake_vault_entity_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.GlobalValidator); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.InternalFungibleVaultEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.Property("ResourceEntityId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.Property("RoyaltyVaultOfEntityId") + .HasColumnType("bigint") + .HasColumnName("royalty_vault_of_entity_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.InternalFungibleVault); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.InternalGenericComponentEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.InternalGenericComponent); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.InternalKeyValueStoreEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.InternalKeyValueStore); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.InternalNonFungibleVaultEntity", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.Entity"); + + b.Property("BlueprintName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_name"); + + b.Property("BlueprintVersion") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("blueprint_version"); + + b.Property("PackageId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("package_id"); + + b.Property("ResourceEntityId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.ToTable("entities"); + + b.HasDiscriminator().HasValue(EntityType.InternalNonFungibleVault); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityFungibleResourceAggregatedVaultsHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityResourceAggregatedVaultsHistory"); + + b.Property("Balance") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("balance"); + + b.ToTable("entity_resource_aggregated_vaults_history"); + + b.HasDiscriminator().HasValue(ResourceType.Fungible); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityNonFungibleResourceAggregatedVaultsHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityResourceAggregatedVaultsHistory"); + + b.Property("TotalCount") + .HasColumnType("bigint") + .HasColumnName("total_count"); + + b.ToTable("entity_resource_aggregated_vaults_history"); + + b.HasDiscriminator().HasValue(ResourceType.NonFungible); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityFungibleVaultHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityVaultHistory"); + + b.Property("Balance") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("balance"); + + b.Property("IsRoyaltyVault") + .HasColumnType("boolean") + .HasColumnName("is_royalty_vault"); + + b.ToTable("entity_vault_history"); + + b.HasDiscriminator().HasValue(ResourceType.Fungible); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityNonFungibleVaultHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.EntityVaultHistory"); + + b.Property>("NonFungibleIds") + .IsRequired() + .HasColumnType("bigint[]") + .HasColumnName("non_fungible_ids"); + + b.ToTable("entity_vault_history"); + + b.HasDiscriminator().HasValue(ResourceType.NonFungible); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.GenesisLedgerTransaction", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransaction"); + + b.ToTable("ledger_transactions"); + + b.HasDiscriminator().HasValue(LedgerTransactionType.Flash); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.RoundUpdateLedgerTransaction", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransaction"); + + b.ToTable("ledger_transactions"); + + b.HasDiscriminator().HasValue(LedgerTransactionType.RoundUpdate); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.UserLedgerTransaction", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransaction"); + + b.Property("IntentHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("intent_hash"); + + b.Property("Message") + .HasColumnType("jsonb") + .HasColumnName("message"); + + b.Property("PayloadHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("payload_hash"); + + b.Property("RawPayload") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("raw_payload"); + + b.Property("SignedIntentHash") + .IsRequired() + .HasColumnType("text") + .HasColumnName("signed_intent_hash"); + + b.HasIndex("IntentHash") + .HasFilter("intent_hash IS NOT NULL"); + + NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("IntentHash"), "hash"); + + b.ToTable("ledger_transactions"); + + b.HasDiscriminator().HasValue(LedgerTransactionType.User); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.AffectedGlobalEntityTransactionMarker", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransactionMarker"); + + b.Property("EntityId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.HasIndex("EntityId", "StateVersion") + .HasFilter("discriminator = 'affected_global_entity'"); + + b.ToTable("ledger_transaction_markers"); + + b.HasDiscriminator().HasValue(LedgerTransactionMarkerType.AffectedGlobalEntity); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.EventLedgerTransactionMarker", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransactionMarker"); + + b.Property("EntityId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("EventType") + .HasColumnType("ledger_transaction_marker_event_type") + .HasColumnName("event_type"); + + b.Property("Quantity") + .HasPrecision(1000) + .HasColumnType("numeric") + .HasColumnName("quantity"); + + b.Property("ResourceEntityId") + .HasColumnType("bigint") + .HasColumnName("resource_entity_id"); + + b.HasIndex("EventType", "EntityId", "StateVersion") + .HasFilter("discriminator = 'event'"); + + b.ToTable("ledger_transaction_markers"); + + b.HasDiscriminator().HasValue(LedgerTransactionMarkerType.Event); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ManifestAddressLedgerTransactionMarker", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransactionMarker"); + + b.Property("EntityId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("bigint") + .HasColumnName("entity_id"); + + b.Property("OperationType") + .HasColumnType("ledger_transaction_marker_operation_type") + .HasColumnName("operation_type"); + + b.HasIndex("OperationType", "EntityId", "StateVersion") + .HasFilter("discriminator = 'manifest_address'"); + + b.ToTable("ledger_transaction_markers"); + + b.HasDiscriminator().HasValue(LedgerTransactionMarkerType.ManifestAddress); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.OriginLedgerTransactionMarker", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.LedgerTransactionMarker"); + + b.Property("OriginType") + .HasColumnType("ledger_transaction_marker_origin_type") + .HasColumnName("origin_type"); + + b.HasIndex("OriginType", "StateVersion") + .HasFilter("discriminator = 'origin'"); + + b.ToTable("ledger_transaction_markers"); + + b.HasDiscriminator().HasValue(LedgerTransactionMarkerType.Origin); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.JsonStateHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.StateHistory"); + + b.Property("JsonState") + .IsRequired() + .HasColumnType("jsonb") + .HasColumnName("json_state"); + + b.ToTable("state_history"); + + b.HasDiscriminator().HasValue(StateType.Json); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.SborStateHistory", b => + { + b.HasBaseType("RadixDlt.NetworkGateway.PostgresIntegration.Models.StateHistory"); + + b.Property("SborState") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("sbor_state"); + + b.Property("SborTypeKind") + .HasColumnType("sbor_type_kind") + .HasColumnName("sbor_type_kind"); + + b.Property("SchemaDefiningEntityId") + .HasColumnType("bigint") + .HasColumnName("schema_defining_entity_id"); + + b.Property("SchemaHash") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("schema_hash"); + + b.Property("TypeIndex") + .HasColumnType("bigint") + .HasColumnName("type_index"); + + b.ToTable("state_history"); + + b.HasDiscriminator().HasValue(StateType.Sbor); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransaction", b => + { + b.OwnsOne("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionGatewayHandling", "GatewayHandling", b1 => + { + b1.Property("PendingTransactionId") + .HasColumnType("bigint"); + + b1.Property("AttemptedSubmissionToNodesCount") + .HasColumnType("integer") + .HasColumnName("node_submission_count"); + + b1.Property("FirstSubmittedToGatewayTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("first_submitted_to_gateway_timestamp"); + + b1.Property("HandlingStatusReason") + .HasColumnType("text") + .HasColumnName("handling_status_reason"); + + b1.Property("ResubmitFromTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("resubmit_from_timestamp"); + + b1.HasKey("PendingTransactionId"); + + b1.HasIndex("FirstSubmittedToGatewayTimestamp"); + + b1.HasIndex("ResubmitFromTimestamp"); + + b1.ToTable("pending_transactions"); + + b1.WithOwner() + .HasForeignKey("PendingTransactionId"); + }); + + b.OwnsOne("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionLedgerDetails", "LedgerDetails", b1 => + { + b1.Property("PendingTransactionId") + .HasColumnType("bigint"); + + b1.Property("CommitTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("commit_timestamp"); + + b1.Property("InitialRejectionReason") + .HasColumnType("text") + .HasColumnName("initial_rejection_reason"); + + b1.Property("IntentLedgerStatus") + .HasColumnType("pending_transaction_intent_ledger_status") + .HasColumnName("intent_status"); + + b1.Property("LatestRejectionReason") + .HasColumnType("text") + .HasColumnName("latest_rejection_reason"); + + b1.Property("LatestRejectionTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("latest_rejection_timestamp"); + + b1.Property("PayloadLedgerStatus") + .HasColumnType("pending_transaction_payload_ledger_status") + .HasColumnName("payload_status"); + + b1.HasKey("PendingTransactionId"); + + b1.ToTable("pending_transactions"); + + b1.WithOwner() + .HasForeignKey("PendingTransactionId"); + }); + + b.OwnsOne("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionNetworkDetails", "NetworkDetails", b1 => + { + b1.Property("PendingTransactionId") + .HasColumnType("bigint"); + + b1.Property("LastSubmitErrorTitle") + .HasColumnType("text") + .HasColumnName("last_submit_error"); + + b1.Property("LatestNodeSubmissionTimestamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("latest_node_submission_timestamp"); + + b1.Property("LatestNodeSubmissionWasAccepted") + .HasColumnType("boolean") + .HasColumnName("latest_node_submission_was_accepted"); + + b1.Property("LatestSubmittedToNodeName") + .HasColumnType("text") + .HasColumnName("latest_submitted_to_node_name"); + + b1.HasKey("PendingTransactionId"); + + b1.ToTable("pending_transactions"); + + b1.WithOwner() + .HasForeignKey("PendingTransactionId"); + }); + + b.Navigation("GatewayHandling") + .IsRequired(); + + b.Navigation("LedgerDetails") + .IsRequired(); + + b.Navigation("NetworkDetails") + .IsRequired(); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionPayload", b => + { + b.HasOne("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransaction", "PendingTransaction") + .WithOne("Payload") + .HasForeignKey("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransactionPayload", "PendingTransactionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PendingTransaction"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.ValidatorActiveSetHistory", b => + { + b.HasOne("RadixDlt.NetworkGateway.PostgresIntegration.Models.ValidatorPublicKeyHistory", "PublicKey") + .WithMany() + .HasForeignKey("ValidatorPublicKeyHistoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PublicKey"); + }); + + modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.PendingTransaction", b => + { + b.Navigation("Payload"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.cs new file mode 100644 index 000000000..029423f97 --- /dev/null +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240110094622_AddFlashTransactionType.cs @@ -0,0 +1,90 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace RadixDlt.NetworkGateway.PostgresIntegration.Migrations +{ + /// + public partial class AddFlashTransactionType : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("Npgsql:Enum:ledger_transaction_type", "genesis,user,round_update,flash") + .OldAnnotation("Npgsql:Enum:ledger_transaction_type", "genesis,user,round_update"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("Npgsql:Enum:ledger_transaction_type", "genesis,user,round_update") + .OldAnnotation("Npgsql:Enum:ledger_transaction_type", "genesis,user,round_update,flash"); + } + } +} diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql index 995409c6e..e48ac7e2c 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql @@ -1068,3 +1068,48 @@ BEGIN END $EF$; COMMIT; +START TRANSACTION; + + +DO $EF$ +BEGIN + IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20231130132946_AddNetworkHrpSuffixToNetworkConfiguration') THEN + ALTER TABLE network_configuration ADD network_hrp_suffix text NULL; + END IF; +END $EF$; + +DO $EF$ +BEGIN + IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20231130132946_AddNetworkHrpSuffixToNetworkConfiguration') THEN + update network_configuration set network_hrp_suffix = (select substring(recordset."HrpPrefix"::text,'_(.+)') from network_configuration, jsonb_to_recordset(address_type_definitions) as recordset("HrpPrefix" TEXT) WHERE recordset."HrpPrefix" like '%account%' limit 1) + END IF; +END $EF$; + +DO $EF$ +BEGIN + IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20231130132946_AddNetworkHrpSuffixToNetworkConfiguration') THEN + INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") + VALUES ('20231130132946_AddNetworkHrpSuffixToNetworkConfiguration', '7.0.11'); + END IF; +END $EF$; +COMMIT; + +START TRANSACTION; + + +DO $EF$ +BEGIN + IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20240110094622_AddFlashTransactionType') THEN + ALTER TYPE ledger_transaction_type ADD VALUE 'flash'; + END IF; +END $EF$; + +DO $EF$ +BEGIN + IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20240110094622_AddFlashTransactionType') THEN + INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") + VALUES ('20240110094622_AddFlashTransactionType', '7.0.11'); + END IF; +END $EF$; +COMMIT; + diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/MigrationsDbContextModelSnapshot.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/MigrationsDbContextModelSnapshot.cs index e19ef720c..3f49c1c2f 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/MigrationsDbContextModelSnapshot.cs +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/MigrationsDbContextModelSnapshot.cs @@ -62,7 +62,7 @@ * permissions under this License. */ -// +// using System; using System.Collections.Generic; using System.Numerics; @@ -97,7 +97,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_origin_type", new[] { "user", "epoch_change" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_marker_type", new[] { "origin", "event", "manifest_address", "affected_global_entity" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_status", new[] { "succeeded", "failed" }); - NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_type", new[] { "genesis", "user", "round_update" }); + NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "ledger_transaction_type", new[] { "genesis", "user", "round_update", "flash" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "module_id", new[] { "main", "metadata", "royalty", "role_assignment" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "non_fungible_id_type", new[] { "string", "integer", "bytes", "ruid" }); NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "package_vm_type", new[] { "native", "scrypto_v1" }); @@ -2024,7 +2024,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("ledger_transactions"); - b.HasDiscriminator().HasValue(LedgerTransactionType.Genesis); + b.HasDiscriminator().HasValue(LedgerTransactionType.Flash); }); modelBuilder.Entity("RadixDlt.NetworkGateway.PostgresIntegration.Models.RoundUpdateLedgerTransaction", b => diff --git a/src/RadixDlt.NetworkGateway.PostgresIntegration/Models/LedgerTransaction.cs b/src/RadixDlt.NetworkGateway.PostgresIntegration/Models/LedgerTransaction.cs index af9099b50..0d9544d90 100644 --- a/src/RadixDlt.NetworkGateway.PostgresIntegration/Models/LedgerTransaction.cs +++ b/src/RadixDlt.NetworkGateway.PostgresIntegration/Models/LedgerTransaction.cs @@ -238,6 +238,10 @@ internal class RoundUpdateLedgerTransaction : LedgerTransaction { } +internal class FlashLedgerTransaction : LedgerTransaction +{ +} + internal class TransactionReceipt { private readonly LedgerTransaction _ledgerTransaction;