Class SubmitSugar
Inheritance
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public static class SubmitSugar
Methods
| Edit this page View SourceGetLastLedgerSequence(object)
checks if there is a LastLedgerSequence as a part of the transaction
Declaration
public static uint? GetLastLedgerSequence(object transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| object | transaction | tx |
Returns
| Type | Description |
|---|---|
| uint? |
GetSignedTx(IXrplClient, Dictionary<string, object>, bool, bool, XrplWallet?, CancellationToken)
Declaration
public static Task<(string txBlob, Dictionary<string, object> tx)> GetSignedTx(this IXrplClient client, Dictionary<string, object> transaction, bool autofill = false, bool failHard = false, XrplWallet? wallet = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | |
| Dictionary<string, object> | transaction | |
| bool | autofill | |
| bool | failHard | |
| XrplWallet | wallet | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<(string txBlob, Dictionary<string, object> tx)> |
IsAccountDelete(object)
checks if the transaction is an AccountDelete transaction
Declaration
public static bool IsAccountDelete(object transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| object | transaction | tx |
Returns
| Type | Description |
|---|---|
| bool |
IsSigned(object)
Declaration
public static bool IsSigned(object transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| object | transaction |
Returns
| Type | Description |
|---|---|
| bool |
Submit(IXrplClient, Dictionary<string, object>, bool, bool, XrplWallet, CancellationToken)
Submits a signed/unsigned transaction.
Steps performed on a transaction:
1.
Autofill.
2.
Sign and Encode.
3.
Submit.
Declaration
public static Task<Submit> Submit(this IXrplClient client, Dictionary<string, object> transaction, bool autofill = true, bool failHard = false, XrplWallet wallet = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| Dictionary<string, object> | transaction | A transaction to autofill, sign and encode, and submit. |
| bool | autofill | If true, autofill a transaction. |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| XrplWallet | wallet | A wallet to sign a transaction. It must be provided when submitting an unsigned transaction. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> | A promise that contains SubmitResponse |
SubmitAndWait(IXrplClient, Dictionary<string, object>, XrplWallet, bool, bool, CancellationToken)
Asynchronously submits a transaction and verifies that it has been included in a validated ledger(or has errored/will not be included for some reason). See[Reliable Transaction Submission] (https://xrpl.org/reliable-transaction-submission.html).
Declaration
public static Task<TransactionSummary> SubmitAndWait(this IXrplClient client, Dictionary<string, object> transaction, XrplWallet wallet = null, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| Dictionary<string, object> | transaction | A transaction to autofill, sign and encode, and submit. |
| XrplWallet | wallet | A wallet to sign a transaction. It must be provided when submitting an unsigned transaction. |
| bool | autofill | If true, autofill a transaction. |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<TransactionSummary> | A promise that contains TxResponse, that will return when the transaction has been validated. |
SubmitAndWait(IXrplClient, ITransactionRequest, XrplWallet, bool, bool, CancellationToken)
Asynchronously submits a transaction and verifies that it has been included in a validated ledger(or has errored/will not be included for some reason). See[Reliable Transaction Submission] (https://xrpl.org/reliable-transaction-submission.html).
Declaration
public static Task<TransactionSummary> SubmitAndWait(this IXrplClient client, ITransactionRequest transaction, XrplWallet wallet = null, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| ITransactionRequest | transaction | A transaction to autofill, sign and encode, and submit. |
| XrplWallet | wallet | A wallet to sign a transaction. It must be provided when submitting an unsigned transaction. |
| bool | autofill | If true, autofill a transaction. |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<TransactionSummary> | A promise that contains TxResponse, that will return when the transaction has been validated. |
SubmitMulti(IXrplClient, Dictionary<string, object>, IEnumerable<XrplWallet>, bool, bool, CancellationToken)
Encodes and submits a signed transaction.
Declaration
public static Task<Submit> SubmitMulti(this IXrplClient client, Dictionary<string, object> tx, IEnumerable<XrplWallet> wallets, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| Dictionary<string, object> | tx | transaction for submit |
| IEnumerable<XrplWallet> | wallets | wallets for signer |
| bool | autofill | autofill transaction missed fields |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> |
SubmitMulti(IXrplClient, ITransactionRequest, IEnumerable<XrplWallet>, bool, bool, CancellationToken)
Encodes and submits a signed transaction.
Declaration
public static Task<Submit> SubmitMulti(this IXrplClient client, ITransactionRequest tx, IEnumerable<XrplWallet> wallets, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| ITransactionRequest | tx | transaction for submit |
| IEnumerable<XrplWallet> | wallets | wallets for signer |
| bool | autofill | autofill transaction missed fields |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> |
SubmitMultiBatch(IXrplClient, Dictionary<string, object>, IEnumerable<XrplWallet>, bool, bool, CancellationToken)
Encodes and submits a Batch signed transaction.
Declaration
public static Task<Submit> SubmitMultiBatch(this IXrplClient client, Dictionary<string, object> txJson, IEnumerable<XrplWallet> wallets, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| Dictionary<string, object> | txJson | transaction for submit |
| IEnumerable<XrplWallet> | wallets | wallets for signer |
| bool | autofill | autofill transaction missed fields |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> |
SubmitMultiBatch(IXrplClient, Batch, IEnumerable<XrplWallet>, bool, bool, CancellationToken)
Encodes and submits a Batch signed transaction.
Declaration
public static Task<Submit> SubmitMultiBatch(this IXrplClient client, Batch tx, IEnumerable<XrplWallet> wallets, bool autofill = true, bool failHard = false, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| Batch | tx | transaction for submit |
| IEnumerable<XrplWallet> | wallets | wallets for signer |
| bool | autofill | autofill transaction missed fields |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> |
SubmitRequest(IXrplClient, object, bool, CancellationToken)
Encodes and submits a signed transaction.
Declaration
public static Task<Submit> SubmitRequest(this IXrplClient client, object signedTransaction, bool failHard, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | A Client. |
| object | signedTransaction | signed Transaction |
| bool | failHard | If true, and the transaction fails locally, do not retry or relay the transaction to other servers. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Submit> |
SubmitRequestAndWait(IXrplClient, object, bool, CancellationToken)
Declaration
public static Task<TransactionSummary> SubmitRequestAndWait(this IXrplClient client, object signedTransaction, bool failHard, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IXrplClient | client | |
| object | signedTransaction | |
| bool | failHard | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<TransactionSummary> |