Skip to content

Commit

Permalink
copied docs from core api schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelPawelec-RDX committed Jul 16, 2024
1 parent cce91dd commit 600fb38
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 35 deletions.
51 changes: 45 additions & 6 deletions src/RadixDlt.NetworkGateway.GatewayApi/gateway-api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3317,7 +3317,7 @@ components:
description: A text-representation of a transaction manifest
type: string
blobs_hex:
description: An array of hex-encoded blob data (optional)
description: An array of hex-encoded blob data, if referenced by the manifest.
type: array
items:
type: string
Expand All @@ -3326,30 +3326,40 @@ components:
format: int64
minimum: 0
maximum: 10000000000
description: An integer between `0` and `10^10`, marking the epoch at which the transaction starts being valid
description: |
An integer between `0` and `10^10`, marking the epoch at which the transaction starts
being valid. If omitted, the current epoch will be used (taking into account the
`at_ledger_state`, if specified).
end_epoch_exclusive:
type: integer
format: int64
minimum: 0
maximum: 10000000000
description: An integer between `0` and `10^10`, marking the epoch at which the transaction is no longer valid
description: |
An integer between `0` and `10^10`, marking the epoch at which the transaction is no
longer valid. If omitted, a maximum epoch (relative to the `start_epoch_inclusive`) will
be used.
notary_public_key:
$ref: "#/components/schemas/PublicKey"
description: The notary public key to use (optional)
notary_is_signatory:
type: boolean
description: Whether the notary should count as a signatory (optional, default false)
description: Whether the notary should count as a signatory (defaults to `false`).
tip_percentage:
type: integer
format: int32
minimum: 0
maximum: 65535
description: An integer between `0` and `65535`, giving the validator tip as a percentage amount. A value of `1` corresponds to 1% of the fee.
description: |
An integer between `0` and `65535`, giving the validator tip as a percentage amount.
A value of `1` corresponds to a 1% fee.
nonce:
type: integer
format: int64
minimum: 0
description: A decimal-string-encoded integer between `0` and `2^32 - 1`, used to ensure the transaction intent is unique.
description: |
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).
signer_public_keys:
type: array
items:
Expand All @@ -3358,6 +3368,7 @@ components:
message:
type: object
description: |
An optional transaction message. Only affects the costing.
This type is defined in the Core API as `TransactionMessage`. See the Core API documentation for more details.
flags:
type: object
Expand All @@ -3367,12 +3378,40 @@ components:
- skip_epoch_check
properties:
use_free_credit:
description: |
Whether to use a virtual, preview-only pool of XRD to pay for all execution fees.
type: boolean
assume_all_signature_proofs:
description: |
Whether the virtual signature proofs should be automatically placed in the auth zone.
type: boolean
skip_epoch_check:
description: |
Whether to skip the epoch range check (i.e. ignoring the `start_epoch_inclusive` and
`end_epoch_exclusive` parameters, if specified).
Note: effectively, without an epoch range, the Radix Engine cannot perform the
*intent hash duplicate* detection, which means that this check will be skipped as well.
type: boolean
disable_auth_checks:
description: |
Whether to skip the auth checks during execution.
This could be used to e.g.:
* Preview protocol update style transactions.
* Mint resources for previewing trades with resources you don't own. If doing this, be warned:
* Only resources which were potentially mintable/burnable at creation time
will be mintable/burnable, due to feature flags on the resource.
* Please see the below warning about unexpected results if using this approach.
Warning: this mode of operation is quite a departure from normal operation:
* Calculated fees will likely be lower than a standard execution.
* This mode can subtly break invariants some dApp code might rely on, or result in unexpected
behaviour, so the resulting execution result might not be valid for your needs. For example,
if I used this flag to mint pool units to preview a redemption (or some dApp interaction which
behind the scenes redeemed them), they'd redeem for less than they're currently worth,
because the blueprint code relies on the total supply of the pool units to calculate their
redemption worth, and you've just inflated the total supply through the mint operation.
type: boolean
TransactionPreviewResponse:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ protected TransactionPreviewRequest() { }
/// Initializes a new instance of the <see cref="TransactionPreviewRequest" /> class.
/// </summary>
/// <param name="manifest">A text-representation of a transaction manifest (required).</param>
/// <param name="blobsHex">An array of hex-encoded blob data (optional).</param>
/// <param name="startEpochInclusive">An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid (required).</param>
/// <param name="endEpochExclusive">An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid (required).</param>
/// <param name="blobsHex">An array of hex-encoded blob data, if referenced by the manifest..</param>
/// <param name="startEpochInclusive">An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid. If omitted, the current epoch will be used (taking into account the &#x60;at_ledger_state&#x60;, if specified). (required).</param>
/// <param name="endEpochExclusive">An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid. If omitted, a maximum epoch (relative to the &#x60;start_epoch_inclusive&#x60;) will be used. (required).</param>
/// <param name="notaryPublicKey">notaryPublicKey.</param>
/// <param name="notaryIsSignatory">Whether the notary should count as a signatory (optional, default false).</param>
/// <param name="tipPercentage">An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to 1% of the fee. (required).</param>
/// <param name="nonce">A decimal-string-encoded integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, used to ensure the transaction intent is unique. (required).</param>
/// <param name="notaryIsSignatory">Whether the notary should count as a signatory (defaults to &#x60;false&#x60;)..</param>
/// <param name="tipPercentage">An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to a 1% fee. (required).</param>
/// <param name="nonce">An integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). (required).</param>
/// <param name="signerPublicKeys">A list of public keys to be used as transaction signers (required).</param>
/// <param name="message">This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details. .</param>
/// <param name="message">An optional transaction message. Only affects the costing. This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details. .</param>
/// <param name="flags">flags (required).</param>
public TransactionPreviewRequest(string manifest = default(string), List<string> blobsHex = default(List<string>), long startEpochInclusive = default(long), long endEpochExclusive = default(long), PublicKey notaryPublicKey = default(PublicKey), bool notaryIsSignatory = default(bool), int tipPercentage = default(int), long nonce = default(long), List<PublicKey> signerPublicKeys = default(List<PublicKey>), Object message = default(Object), TransactionPreviewRequestFlags flags = default(TransactionPreviewRequestFlags))
{
Expand Down Expand Up @@ -152,23 +152,23 @@ protected TransactionPreviewRequest() { }
public string Manifest { get; set; }

/// <summary>
/// An array of hex-encoded blob data (optional)
/// An array of hex-encoded blob data, if referenced by the manifest.
/// </summary>
/// <value>An array of hex-encoded blob data (optional)</value>
/// <value>An array of hex-encoded blob data, if referenced by the manifest.</value>
[DataMember(Name = "blobs_hex", EmitDefaultValue = true)]
public List<string> BlobsHex { get; set; }

/// <summary>
/// An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid
/// An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid. If omitted, the current epoch will be used (taking into account the &#x60;at_ledger_state&#x60;, if specified).
/// </summary>
/// <value>An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid</value>
/// <value>An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction starts being valid. If omitted, the current epoch will be used (taking into account the &#x60;at_ledger_state&#x60;, if specified). </value>
[DataMember(Name = "start_epoch_inclusive", IsRequired = true, EmitDefaultValue = true)]
public long StartEpochInclusive { get; set; }

/// <summary>
/// An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid
/// An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid. If omitted, a maximum epoch (relative to the &#x60;start_epoch_inclusive&#x60;) will be used.
/// </summary>
/// <value>An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid</value>
/// <value>An integer between &#x60;0&#x60; and &#x60;10^10&#x60;, marking the epoch at which the transaction is no longer valid. If omitted, a maximum epoch (relative to the &#x60;start_epoch_inclusive&#x60;) will be used. </value>
[DataMember(Name = "end_epoch_exclusive", IsRequired = true, EmitDefaultValue = true)]
public long EndEpochExclusive { get; set; }

Expand All @@ -179,23 +179,23 @@ protected TransactionPreviewRequest() { }
public PublicKey NotaryPublicKey { get; set; }

/// <summary>
/// Whether the notary should count as a signatory (optional, default false)
/// Whether the notary should count as a signatory (defaults to &#x60;false&#x60;).
/// </summary>
/// <value>Whether the notary should count as a signatory (optional, default false)</value>
/// <value>Whether the notary should count as a signatory (defaults to &#x60;false&#x60;).</value>
[DataMember(Name = "notary_is_signatory", EmitDefaultValue = true)]
public bool NotaryIsSignatory { get; set; }

/// <summary>
/// An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to 1% of the fee.
/// An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to a 1% fee.
/// </summary>
/// <value>An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to 1% of the fee.</value>
/// <value>An integer between &#x60;0&#x60; and &#x60;65535&#x60;, giving the validator tip as a percentage amount. A value of &#x60;1&#x60; corresponds to a 1% fee. </value>
[DataMember(Name = "tip_percentage", IsRequired = true, EmitDefaultValue = true)]
public int TipPercentage { get; set; }

/// <summary>
/// A decimal-string-encoded integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, used to ensure the transaction intent is unique.
/// An integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent).
/// </summary>
/// <value>A decimal-string-encoded integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, used to ensure the transaction intent is unique.</value>
/// <value>An integer between &#x60;0&#x60; and &#x60;2^32 - 1&#x60;, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). </value>
[DataMember(Name = "nonce", IsRequired = true, EmitDefaultValue = true)]
public long Nonce { get; set; }

Expand All @@ -207,9 +207,9 @@ protected TransactionPreviewRequest() { }
public List<PublicKey> SignerPublicKeys { get; set; }

/// <summary>
/// This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details.
/// An optional transaction message. Only affects the costing. This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details.
/// </summary>
/// <value>This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details. </value>
/// <value>An optional transaction message. Only affects the costing. This type is defined in the Core API as &#x60;TransactionMessage&#x60;. See the Core API documentation for more details. </value>
[DataMember(Name = "message", EmitDefaultValue = true)]
public Object Message { get; set; }

Expand Down
Loading

0 comments on commit 600fb38

Please sign in to comment.