Preview

Transaction Preview V1

post

Preview a transaction against the latest network state, and returns the preview receipt. If the node has enabled it, you may be able to also preview against recent network state.

For V2 transactions (and beyond) the /preview-v2 endpoint should be used instead.

Body
networkstringRequired

The logical name of the network

Example: {{network}}
at_ledger_stateobjectOptional

An optional specification of a historical ledger state at which to execute the request. The "historical state" feature (see the db.historical_substate_values.enable flag) must be enabled on the Node, and the requested point in history must be recent enough (in accordance with the Node's configured state_hash_tree.state_version_history_length).

manifeststringRequired

A text representation of a transaction manifest.

blobs_hexstring[]Optional

An array of hex-encoded blob data, if referenced by the manifest.

start_epoch_inclusiveinteger · int64 · max: 10000000000Optional

An integer between 0 and 10^10, marking the epoch at which the transaction starts being valid. If not provided, the current epoch will be used (taking into account the at_ledger_state, if specified).

end_epoch_exclusiveinteger · int64 · max: 10000000000Optional

An integer between 0 and 10^10, marking the epoch at which the transaction is no longer valid. If not provided, a maximum epoch (relative to the start_epoch_inclusive) will be used.

notary_public_keyobjectOptional

The notary public key to use. If not provided, this defaults to a fixed public key.

notary_is_signatorybooleanOptional

Whether the notary should be used as a signer (optional). If not provided, this defaults to false.

tip_percentageinteger · int32 · max: 65535Optional

An integer between 0 and 65535, giving the validator tip as a percentage amount. A value of 1 corresponds to a 1% fee. If not provided, this defaults to 0.

nonceinteger · int64 · max: 4294967295Optional

An integer between 0 and 2^32 - 1, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). If not provided, this defaults to 0.

signer_public_keysobject[]Optional

A list of public keys to be used as transaction signers. If not provided, this defaults to an empty array.

messageobjectOptional

An optional transaction message. Only affects the costing.

optionsobjectOptional

A set of flags to configure the response of the transaction preview.

flagsobjectOptional
Responses
application/json
objectOptional
post
POST /transaction/preview HTTP/1.1
Host: xrd.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 515

{
  "network": "{{network}}",
  "at_ledger_state": {
    "type": "ByStateVersion"
  },
  "manifest": "text",
  "blobs_hex": [
    "text"
  ],
  "start_epoch_inclusive": 1,
  "end_epoch_exclusive": 1,
  "notary_public_key": {
    "key_type": "EcdsaSecp256k1"
  },
  "notary_is_signatory": true,
  "tip_percentage": 1,
  "nonce": 1,
  "signer_public_keys": [
    {
      "key_type": "EcdsaSecp256k1"
    }
  ],
  "message": {
    "type": "Plaintext"
  },
  "options": {
    "radix_engine_toolkit_receipt": true
  },
  "flags": {
    "use_free_credit": true,
    "assume_all_signature_proofs": true,
    "skip_epoch_check": true,
    "disable_auth_checks": true
  }
}
{
  "at_ledger_state": {
    "state_version": 1,
    "header_summary": {
      "epoch_round": {
        "epoch": 1,
        "round": 1
      },
      "ledger_hashes": {
        "state_tree_hash": "text",
        "transaction_tree_hash": "text",
        "receipt_tree_hash": "text"
      },
      "proposer_timestamp": {
        "unix_timestamp_ms": 1,
        "date_time": "text"
      }
    }
  },
  "receipt": {
    "status": "Succeeded",
    "fee_summary": {
      "execution_cost_units_consumed": 1,
      "finalization_cost_units_consumed": 1,
      "xrd_total_execution_cost": "text",
      "xrd_total_finalization_cost": "text",
      "xrd_total_royalty_cost": "text",
      "xrd_total_storage_cost": "text",
      "xrd_total_tipping_cost": "text"
    },
    "costing_parameters": {
      "execution_cost_unit_price": "text",
      "execution_cost_unit_limit": 1,
      "execution_cost_unit_loan": 1,
      "finalization_cost_unit_price": "text",
      "finalization_cost_unit_limit": 1,
      "xrd_usd_price": "text",
      "xrd_storage_price": "text",
      "xrd_archive_storage_price": "text",
      "tip_proportion": "text"
    },
    "fee_source": {
      "from_vaults": [
        {
          "vault_entity": {
            "entity_type": "GlobalPackage",
            "is_global": true,
            "entity_address": "text"
          },
          "xrd_amount": "text"
        }
      ]
    },
    "fee_destination": {
      "to_proposer": "text",
      "to_validator_set": "text",
      "to_burn": "text",
      "to_royalty_recipients": [
        {
          "royalty_recipient": {
            "entity_type": "GlobalPackage",
            "is_global": true,
            "entity_address": "text"
          },
          "xrd_amount": "text"
        }
      ]
    },
    "state_updates": {
      "deleted_partitions": [
        {
          "entity_type": "GlobalPackage",
          "entity_address": "text",
          "entity_module": "TypeInfo",
          "partition_kind": "Field",
          "partition_number": 1
        }
      ],
      "created_substates": [
        {
          "substate_id": {
            "entity_type": "GlobalPackage",
            "entity_address": "text",
            "entity_module": "TypeInfo",
            "partition_kind": "Field",
            "partition_number": 1,
            "substate_type": "BootLoaderModuleFieldSystemBoot",
            "substate_key": {
              "key_type": "Field",
              "db_sort_key_hex": "text"
            }
          },
          "value": {
            "substate_hex": "text",
            "substate_data_hash": "text",
            "substate_data": {
              "substate_type": "BootLoaderModuleFieldSystemBoot",
              "is_locked": true
            }
          },
          "system_structure": {
            "type": "SystemField"
          }
        }
      ],
      "updated_substates": [
        {
          "substate_id": {
            "entity_type": "GlobalPackage",
            "entity_address": "text",
            "entity_module": "TypeInfo",
            "partition_kind": "Field",
            "partition_number": 1,
            "substate_type": "BootLoaderModuleFieldSystemBoot",
            "substate_key": {
              "key_type": "Field",
              "db_sort_key_hex": "text"
            }
          },
          "new_value": {
            "substate_hex": "text",
            "substate_data_hash": "text",
            "substate_data": {
              "substate_type": "BootLoaderModuleFieldSystemBoot",
              "is_locked": true
            }
          },
          "previous_value": {
            "substate_hex": "text",
            "substate_data_hash": "text",
            "substate_data": {
              "substate_type": "BootLoaderModuleFieldSystemBoot",
              "is_locked": true
            }
          },
          "system_structure": {
            "type": "SystemField"
          }
        }
      ],
      "deleted_substates": [
        {
          "substate_id": {
            "entity_type": "GlobalPackage",
            "entity_address": "text",
            "entity_module": "TypeInfo",
            "partition_kind": "Field",
            "partition_number": 1,
            "substate_type": "BootLoaderModuleFieldSystemBoot",
            "substate_key": {
              "key_type": "Field",
              "db_sort_key_hex": "text"
            }
          },
          "previous_value": {
            "substate_hex": "text",
            "substate_data_hash": "text",
            "substate_data": {
              "substate_type": "BootLoaderModuleFieldSystemBoot",
              "is_locked": true
            }
          },
          "system_structure": {
            "type": "SystemField"
          }
        }
      ],
      "new_global_entities": [
        {
          "entity_type": "GlobalPackage",
          "is_global": true,
          "entity_address": "text"
        }
      ]
    },
    "events": [
      {
        "type": {
          "emitter": {
            "type": "Function"
          },
          "type_reference": {
            "full_type_id": {
              "entity_address": "text",
              "schema_hash": "text",
              "local_type_id": {
                "kind": "WellKnown",
                "id": 1,
                "as_sbor": {
                  "hex": "text",
                  "programmatic_json": null
                }
              }
            }
          },
          "name": "text"
        },
        "data": {
          "hex": "text",
          "programmatic_json": null
        }
      }
    ],
    "next_epoch": {
      "epoch": 1,
      "validators": [
        {
          "address": "text",
          "key": {
            "key_type": "EcdsaSecp256k1",
            "key_hex": "text"
          },
          "stake": "text"
        }
      ],
      "significant_protocol_update_readiness": [
        {
          "readiness_signal_name": "text",
          "signalled_stake": "text"
        }
      ]
    },
    "output": [
      {
        "hex": "text",
        "programmatic_json": null
      }
    ],
    "error_message": "text"
  },
  "radix_engine_toolkit_receipt": {},
  "instruction_resource_changes": [
    {
      "index": 1,
      "resource_changes": [
        {
          "resource_address": "text",
          "component_entity": {
            "entity_type": "GlobalPackage",
            "is_global": true,
            "entity_address": "text"
          },
          "vault_entity": {
            "entity_type": "GlobalPackage",
            "is_global": true,
            "entity_address": "text"
          },
          "amount": "text"
        }
      ]
    }
  ],
  "logs": [
    {
      "level": "text",
      "message": "text"
    }
  ]
}