Skip to content

Latest commit

 

History

History
340 lines (309 loc) · 20.1 KB

README.md

File metadata and controls

340 lines (309 loc) · 20.1 KB

com.usemoon.MoonSDK - the C# library for the moon-vault-api

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Version support

This generator should support all current LTS versions of Unity

  • Unity 2020.3 (LTS) and up
  • .NET Standard 2.1 / .NET Framework

Dependencies

Installation

Add the dependencies to Packages/manifest.json

{
  "dependencies": {
    ...
    "com.unity.nuget.newtonsoft-json": "3.0.2",
    "com.unity.test-framework": "1.1.33",
  }
}

Then use the namespaces:

using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;

Getting Started

using System;
using System.Collections.Generic;
using UnityEngine;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;

namespace com.usemoon.MoonSDKExample
{

    public class BorrowExample : MonoBehaviour
    {
        async void Start()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://beta.usemoon.ai";
            // Configure API key authorization: ApiKeyAuth
            config.ApiKey.Add("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("x-api-key", "Bearer");
            // Configure API key authorization: BearerAuth
            config.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AaveApi(config);
            var authorization = "authorization_example";  // string | 
            var name = "name_example";  // string | 
            var aaveInput = new AaveInput(); // AaveInput | 

            try
            {
                TransactionAPIResponse result = await apiInstance.BorrowAsync(authorization, name, aaveInput);
                Debug.Log(result);
                Debug.Log("Done!");
            }
            catch (ApiException e)
            {
                Debug.LogError("Exception when calling AaveApi.Borrow: " + e.Message );
                Debug.LogError("Status Code: "+ e.ErrorCode);
                Debug.LogError(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://beta.usemoon.ai

Class Method HTTP request Description
AaveApi Borrow POST /aave/{name}/borrow
AaveApi Lend POST /aave/{name}/lend
AaveApi Repay POST /aave/{name}/repay
AaveApi UserReserveData POST /aave/{name}/user-reserve-data
AccountsApi BroadcastTx POST /accounts/{accountName}/broadcast-tx
AccountsApi CreateAccount POST /accounts
AccountsApi DeleteAccount DELETE /accounts/{accountName}
AccountsApi DeployContract POST /accounts/{accountName}/deploy
AccountsApi GetAccount GET /accounts/{accountName}
AccountsApi GetBalance GET /accounts/{accountName}/balance
AccountsApi GetNonce GET /accounts/{accountName}/nonce
AccountsApi ListAccounts GET /accounts
AccountsApi SignMessage POST /accounts/{accountName}/sign-message
AccountsApi SignTransaction POST /accounts/{accountName}/sign-transaction
AccountsApi SignTypedData POST /accounts/{accountName}/sign-typed-data
AccountsApi TransferEth POST /accounts/{accountName}/transfer-eth
BitcoinApi CreateBitcoinAccount POST /bitcoin
BitcoinApi GetBitcoinAccount GET /bitcoin/{accountName}
BitcoinApi ListBitcoinAccounts GET /bitcoin
BitcoinApi SignBitcoinTransaction POST /bitcoin/{accountName}/sign-tx
BitcoincashApi CreateBitcoinCashAccount POST /bitcoincash
BitcoincashApi GetBitcoinCashAccount GET /bitcoincash/{accountName}
BitcoincashApi ListBitcoinCashAccounts GET /bitcoincash
BitcoincashApi SignBitcoinCashTransaction POST /bitcoincash/{accountName}/sign-tx
ConveyorFinanceApi Swap POST /conveyorfinance/{name}/swap
CosmosApi CreateCosmosAccount POST /cosmos
CosmosApi GetCosmosAccount GET /cosmos/{accountName}
CosmosApi ListCosmosAccounts GET /cosmos
CosmosApi SignCosmosTransaction POST /cosmos/{accountName}/sign-tx
DefaultApi GetMessage GET /ping
DogeCoinApi CreateDogeCoinAccount POST /dogecoin
DogeCoinApi GetDogeCoinAccount GET /dogecoin/{accountName}
DogeCoinApi ListDogeCoinAccounts GET /dogecoin
DogeCoinApi SignDogeCoinTransaction POST /dogecoin/{accountName}/sign-tx
ENSApi Resolve POST /ens/resolve
ERC1155Api BalanceOf POST /erc1155/{name}/balance-of
ERC1155Api BalanceOfBatch POST /erc1155/{name}/balance-of-batch
ERC1155Api IsApprovedForAll POST /erc1155/{name}/is-approved-for-all
ERC1155Api SafeBatchTransferFrom POST /erc1155/{name}/safe-batch-transfer-from
ERC1155Api SafeTransferFrom POST /erc1155/{name}/safe-transfer-from
ERC1155Api SetApprovalForAll POST /erc1155/{name}/set-approval-for-all
EosApi CreateEosAccount POST /eos
EosApi GetEosAccount GET /eos/{accountName}
EosApi ListEosAccounts GET /eos
EosApi SignEosTransaction POST /eos/{accountName}/sign-tx
Erc20Api AllowanceErc20 POST /erc20/{name}/allowance
Erc20Api ApproveErc20 POST /erc20/{name}/approve
Erc20Api BalanceOfErc20 POST /erc20/{name}/balance-of
Erc20Api DecimalsErc20 POST /erc20/{name}/decimals
Erc20Api NameErc20 POST /erc20/{name}/name
Erc20Api SymbolErc20 POST /erc20/{name}/symbol
Erc20Api TotalSupplyErc20 POST /erc20/{name}/total-supply
Erc20Api TransferErc20 POST /erc20/{name}/transfer
Erc20Api TransferFromErc20 POST /erc20/{name}/transfer-from
Erc721Api Approve POST /erc721/{name}/approve
Erc721Api BalanceOf POST /erc721/{name}/balance-of
Erc721Api GetApproved POST /erc721/{name}/get-approved
Erc721Api IsApprovedForAll POST /erc721/{name}/is-approved-for-all
Erc721Api Name POST /erc721/{name}/name
Erc721Api OwnerOf POST /erc721/{name}/owner-of
Erc721Api SafeTransferFrom POST /erc721/{name}/safe-transfer-from
Erc721Api SetApprovalForAll POST /erc721/{name}/set-approval-for-all
Erc721Api Symbol POST /erc721/{name}/symbol
Erc721Api TokenUri POST /erc721/{name}/token-uri
Erc721Api Transfer POST /erc721/{name}/transfer
Erc721Api TransferFrom POST /erc721/{name}/transfer-from
LitecoinApi CreateLitecoinAccount POST /litecoin
LitecoinApi GetLitecoinAccount GET /litecoin/{accountName}
LitecoinApi ListLitecoinAccounts GET /litecoin
LitecoinApi SignLitecoinTransaction POST /litecoin/{accountName}/sign-tx
OneinchApi ApproveCallData POST /oneinch/approve-call-data
OneinchApi ApproveSpender POST /oneinch/approve-spender
OneinchApi Protocols POST /oneinch/protocols
OneinchApi Quote POST /oneinch/quote
OneinchApi Swap POST /oneinch/{accountName}/swap
OneinchApi Tokens POST /oneinch/tokens
OnramperApi OnRamperCheckout POST /onramper/fund/${accountName}
OnramperApi OnRamperGetQuotesBuy GET /onramper/quotes/buy
OnramperApi OnRamperGetQuotesSell GET /onramper/quotes/sell
OnramperApi OnRamperGetSupportedAssets GET /onramper/assets
OnramperApi OnRamperGetSupportedCurrencies GET /onramper/currencies
OnramperApi OnRamperGetSupportedDefaultsAll GET /onramper/defaults
OnramperApi OnRamperGetSupportedOnRampsAll GET /onramper/onramps
OnramperApi OnRamperGetSupportedPaymentTypes GET /onramper/payment-types
OnramperApi OnRamperGetSupportedPaymentTypesFiat GET /onramper/payment-types/fiat
RippleApi CreateRippleAccount POST /ripple
RippleApi GetRippleAccount GET /ripple/{accountName}
RippleApi ListRippleAccounts GET /ripple
RippleApi SignRippleTransaction POST /ripple/{accountName}/sign-tx
SolanaApi CreateSolanaAccount POST /solana
SolanaApi GetSolanaAccount GET /solana/{accountName}
SolanaApi ListSolanaAccounts GET /solana
SolanaApi SignSolanaTransaction POST /solana/{accountName}/sign-tx
TronApi CreateTronAccount POST /tron
TronApi GetTronAccount GET /tron/{accountName}
TronApi ListTronAccounts GET /tron
TronApi SignTronTransaction POST /tron/{accountName}/sign-tx
UniSwapApi AddLiquidity POST /uniswap/{name}/add-liquidity
UniSwapApi RemoveLiquidity POST /uniswap/{name}/remove-liquidity
UniSwapApi SwapExactETHForTokens POST /uniswap/{name}/swap-exact-eth-for-tokens
UniSwapApi SwapExactTokensForTokens POST /uniswap/{name}/swap-exact-tokens-for-tokens
YearnApi AddLiquidity POST /yearn/{name}/add-liquidity
YearnApi AddLiquidityWeth POST /yearn/{name}/add-liquidity-weth
YearnApi RemoveLiquidity POST /yearn/{name}/remove-liquidity
YearnApi RemoveLiquidityWeth POST /yearn/{name}/remove-liquidity-weth

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

OAuth2

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • authorization_code: grants authorization_code

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header