REST API for Marlowe Runtime
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.0.5.1
- SDK version: 1.0.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using MarloweAPIClient.Api;
using MarloweAPIClient.Client;
using MarloweAPIClient.Model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out MarloweAPIClient.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using MarloweAPIClient.Api;
using MarloweAPIClient.Client;
using MarloweAPIClient.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://marlowe-runtime-preprod-web.scdev.aws.iohkdev.io";
var apiInstance = new DefaultApi(config);
var contractId = 98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231; // string |
var xChangeAddress = addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf; // string |
var xAddress = "xAddress_example"; // string? | (optional)
var xCollateralUTxO = "xCollateralUTxO_example"; // string? | (optional)
var postTransactionsRequest = new PostTransactionsRequest?(); // PostTransactionsRequest? | (optional)
try
{
// Apply inputs to contract
ApplyInputsResponse result = apiInstance.ApplyInputsToContract(contractId, xChangeAddress, xAddress, xCollateralUTxO, postTransactionsRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.ApplyInputsToContract: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://marlowe-runtime-preprod-web.scdev.aws.iohkdev.io
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | ApplyInputsToContract | POST /contracts/{contractId}/transactions | Apply inputs to contract |
DefaultApi | CreateContract | POST /contracts | Create a new contract |
DefaultApi | CreateContractSources | POST /contracts/sources | Upload contract sources |
DefaultApi | GetContractById | GET /contracts/{contractId} | Get contract by ID |
DefaultApi | GetContractSourceAdjacency | GET /contracts/sources/{contractSourceId}/adjacency | Get adjacent contract source IDs by ID |
DefaultApi | GetContractSourceById | GET /contracts/sources/{contractSourceId} | Get contract source by ID |
DefaultApi | GetContractSourceClosure | GET /contracts/sources/{contractSourceId}/closure | Get contract source closure by ID |
DefaultApi | GetContractTransactionById | GET /contracts/{contractId}/transactions/{transactionId} | Get contract transaction by ID |
DefaultApi | GetContracts | GET /contracts | Get contracts |
DefaultApi | GetNextStepsForContract | GET /contracts/{contractId}/next | Get next contract steps |
DefaultApi | GetPayoutById | GET /payouts/{payoutId} | Get payout by ID |
DefaultApi | GetPayouts | GET /payouts | Get role payouts |
DefaultApi | GetTransactionsForContract | GET /contracts/{contractId}/transactions | Get transactions for contract |
DefaultApi | GetWithdrawalById | GET /withdrawals/{withdrawalId} | Get withdrawal by ID |
DefaultApi | GetWithdrawals | GET /withdrawals | Get withdrawals |
DefaultApi | Healthcheck | GET /healthcheck | Test server status |
DefaultApi | SubmitContract | PUT /contracts/{contractId} | Submit contract to chain |
DefaultApi | SubmitContractTransaction | PUT /contracts/{contractId}/transactions/{transactionId} | Submit contract input application |
DefaultApi | SubmitWithdrawal | PUT /withdrawals/{withdrawalId} | Submit payout withdrawal |
DefaultApi | WithdrawPayouts | POST /withdrawals | Withdraw payouts |
- Model.AccountTokenTupleInner
- Model.Action
- Model.ActionObject
- Model.Add
- Model.AddObject
- Model.AddressAndMetadata
- Model.And
- Model.AndObject
- Model.ApplicableInputs
- Model.ApplyInputsResponse
- Model.ApplyInputsResponseLinks
- Model.ApplyInputsTxEnvelope
- Model.Assert
- Model.AssertFail
- Model.AssertObject
- Model.AssetId
- Model.Assets
- Model.BlockHeader
- Model.Bound
- Model.CanChoose
- Model.CanDeposit
- Model.CanNotify
- Model.Case
- Model.CaseMerkleizedThen
- Model.CaseMerkleizedThenObject
- Model.CaseObject
- Model.CaseThen
- Model.CaseThenObject
- Model.ChoiceAction
- Model.ChoiceActionObject
- Model.ChoiceContinuationInput
- Model.ChoiceId
- Model.ChoiceIdObject
- Model.ChoiceInput
- Model.ChooseFor
- Model.ChooseForObject
- Model.Close
- Model.CloseObject
- Model.ContinuationInput
- Model.Contract
- Model.ContractHeader
- Model.ContractObject
- Model.ContractSourceIds
- Model.ContractState
- Model.CreateContractResponse
- Model.CreateContractResponseLinks
- Model.CreateTxBodyEnvelope
- Model.CreateTxEnvelope
- Model.DepositAction
- Model.DepositActionObject
- Model.DepositContinuationInput
- Model.DepositInput
- Model.Divide
- Model.DivideObject
- Model.Equal
- Model.EqualObject
- Model.ExBudget
- Model.GetContractResponse
- Model.GetContractResponseLinks
- Model.GetContractsResponse
- Model.GetContractsResponseResultsInner
- Model.GetContractsResponseResultsInnerLinks
- Model.GetPayoutResponse
- Model.GetPayoutResponseLinks
- Model.GetPayoutsResponse
- Model.GetPayoutsResponseResultsInner
- Model.GetPayoutsResponseResultsInnerLinks
- Model.GetTransactionResponse
- Model.GetTransactionResponseLinks
- Model.GetTransactionsResponse
- Model.GetTransactionsResponseResultsInner
- Model.GetWithdrawalsResponse
- Model.GetWithdrawalsResponseResultsInner
- Model.GetWithdrawalsResponseResultsInnerLinks
- Model.Greater
- Model.GreaterObject
- Model.GreaterOrEqual
- Model.GreaterOrEqualObject
- Model.If
- Model.IfObject
- Model.IfValue
- Model.IfValueObject
- Model.Input
- Model.IntervalError
- Model.IntervalInPast
- Model.IntervalInPastIntervalInPastError
- Model.InvalidInterval
- Model.InvalidIntervalInvalidInterval
- Model.LabelRef
- Model.LabelledObject
- Model.LabelledObjectValue
- Model.Lesser
- Model.LesserObject
- Model.LesserOrEqual
- Model.LesserOrEqualObject
- Model.Let
- Model.LetObject
- Model.MarloweState
- Model.MarloweStateAccountsInnerInner
- Model.MarloweStateBoundValuesInnerInner
- Model.MarloweStateChoicesInnerInner
- Model.MarloweVersion
- Model.Metadata
- Model.MetadataAndRecipients
- Model.MetadataAndScript
- Model.Minus
- Model.MinusObject
- Model.Multiply
- Model.MultiplyObject
- Model.Negate
- Model.NegateObject
- Model.Next
- Model.NonPositiveDeposit
- Model.NonPositivePayment
- Model.Not
- Model.NotObject
- Model.NotifyAction
- Model.NotifyActionObject
- Model.NotifyInput
- Model.Observation
- Model.ObservationObject
- Model.Or
- Model.OrObject
- Model.PartialPayment
- Model.Party
- Model.PartyAddress
- Model.PartyObject
- Model.PartyRoleName
- Model.Pay
- Model.PayObject
- Model.PayToAccount
- Model.PayToAccountObject
- Model.PayToParty
- Model.PayToPartyObject
- Model.Payee
- Model.PayeeObject
- Model.Payment
- Model.Payout
- Model.PayoutHeader
- Model.PayoutState
- Model.PayoutStatus
- Model.PlutusAddress
- Model.PlutusCredential
- Model.PlutusStakingCredential
- Model.PostContractSourceResponse
- Model.PostContractsRequest
- Model.PostContractsRequestContract
- Model.PostTransactionsRequest
- Model.PostWithdrawalsRequest
- Model.PubKeyCredential
- Model.RoleTokenConfig
- Model.RolesConfig
- Model.SafetyError
- Model.ScriptCredential
- Model.StakingHash
- Model.StakingPointer
- Model.TextEnvelope
- Model.TimeInterval
- Model.Token
- Model.TokenInAccount
- Model.TokenInAccountObject
- Model.TokenMetadata
- Model.TokenMetadataFile
- Model.TokenObject
- Model.Transaction
- Model.TransactionError
- Model.TransactionErrorOneOf
- Model.TransactionInput
- Model.TransactionInputTxInterval
- Model.TransactionOutput
- Model.TransactionWarning
- Model.Tx
- Model.TxHeader
- Model.TxOutputError
- Model.TxOutputSuccess
- Model.TxStatus
- Model.UseValue
- Model.Value
- Model.ValueObject
- Model.ValueOfChoice
- Model.ValueOfChoiceObject
- Model.VariableShadowing
- Model.When
- Model.WhenObject
- Model.WithdrawPayoutsResponse
- Model.WithdrawTxBodyEnvelope
- Model.WithdrawTxEnvelope
- Model.Withdrawal
- Model.WithdrawalHeader
Endpoints do not require authorization.