Skip to content

mainnet-cash/mainnet-go-generated

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
api
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Go API client for openapi

A developer friendly bitcoin cash wallet api

This API is currently in active development, breaking changes may be made prior to official release of version 1.0.0.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.10
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://rest-unstable.mainnet.cash

Class Method HTTP request Description
ContractApi ContractFn Post /contract/call Call a method on a contract
ContractApi ContractInfo Post /contract/info Get information about a contract from the contractId
ContractApi ContractUtxos Post /contract/utxos List specific utxos on any contract
ContractApi CreateContract Post /contract/create Create a cashscript contract
ContractEscrowApi CreateEscrow Post /contract/escrow/create Create an escrow contract
ContractEscrowApi EscrowFn Post /contract/escrow/call Finalize an escrow contract
ContractEscrowApi EscrowInfo Post /contract/escrow/info Get information about an escrow contract from the escrowContractId
ContractEscrowApi EscrowUtxos Post /contract/escrow/utxos List specific utxos on any escrow contract
FaucetApi GetAddresses Post /faucet/get_addresses Get addresses to return back or donate the testnet bch and tokens
FaucetApi GetTestnetBch Post /faucet/get_testnet_bch Get testnet bch
FaucetApi GetTestnetSbch Post /faucet/get_testnet_sbch Request testnet SmartBCH funds. The request is enqueued and served within 1-3 block confirmations. If the target address holds more that 0.1 BCH, the request will fail. Otherwise the address will be topped up to 0.1 BCH.
FaucetApi GetTestnetSep20 Post /faucet/get_testnet_sep20 Request testnet SmartBch SEP20 tokens. The request is enqueued and served within 1-3 block confirmations. If the target address holds more that 10 tokens of requested kind, the request will fail. Otherwise the address will be topped up to 10 tokens.
FaucetApi GetTestnetSlp Post /faucet/get_testnet_slp Get testnet slp tokens
MineApi Mine Post /mine Mine regtest coins to a specified address
SmartbchContractApi SmartBchContractCall Post /smartbch/contract/call Call a SmartBch contract function
SmartbchContractApi SmartBchContractCreate Post /smartbch/contract/create Create a SmartBch contractId
SmartbchContractApi SmartBchContractDeploy Post /smartbch/contract/deploy Request to deploy a SmartBch contract
SmartbchContractApi SmartBchContractEstimateGas Post /smartbch/contract/estimate_gas Estimate the gas for a contract interaction function given the arguments
SmartbchContractApi SmartBchContractInfo Post /smartbch/contract/info Get information about a SmartBch contract from the contractId
SmartbchSep20Api SmartBchSep20AllBalances Post /smartbch/sep20/all_balances Get all SmartBch SEP20 balances of the wallet
SmartbchSep20Api SmartBchSep20Balance Post /smartbch/sep20/balance Get total SmartBch SEP20 token balance of the wallet
SmartbchSep20Api SmartBchSep20DepositAddress Post /smartbch/sep20/deposit_address Get an SmartBch SEP20 deposit address
SmartbchSep20Api SmartBchSep20DepositQr Post /smartbch/sep20/deposit_qr Get an SmartBch SEP20 receiving address as a qrcode
SmartbchSep20Api SmartBchSep20Genesis Post /smartbch/sep20/genesis Get created tokenId back and new SmartBch SEP20 token balance of the wallet
SmartbchSep20Api SmartBchSep20Mint Post /smartbch/sep20/mint Get created tokenId back and new SmartBch SEP20 token balance of the wallet
SmartbchSep20Api SmartBchSep20Send Post /smartbch/sep20/send Send some SmartBch SEP20 token amount to a given address
SmartbchSep20Api SmartBchSep20SendMax Post /smartbch/sep20/send_max Send all available SmartBch SEP20 token funds to a given address
SmartbchSep20Api SmartBchSep20TokenInfo Post /smartbch/sep20/token_info Get information about the SmartBch SEP20 token
SmartbchWalletApi SmartbchBalance Post /smartbch/wallet/balance Get total balance for wallet
SmartbchWalletApi SmartbchCreateWallet Post /smartbch/wallet/create create a new wallet
SmartbchWalletApi SmartbchDepositAddress Post /smartbch/wallet/deposit_address Get a deposit address
SmartbchWalletApi SmartbchDepositQr Post /smartbch/wallet/deposit_qr Get receiving cash address as a qrcode
SmartbchWalletApi SmartbchMaxAmountToSend Post /smartbch/wallet/max_amount_to_send Get maximum spendable amount
SmartbchWalletApi SmartbchSend Post /smartbch/wallet/send Send some amount to a given address
SmartbchWalletApi SmartbchSendMax Post /smartbch/wallet/send_max Send all available funds to a given address
SmartbchWalletApi SmartbchSignedMessageSign Post /smartbch/wallet/signed/sign Returns the message signature
SmartbchWalletApi SmartbchSignedMessageVerify Post /smartbch/wallet/signed/verify Returns a boolean indicating whether message was valid for a given address
UtilApi Convert Post /util/convert convert between units
UtilApi GetAddrsByXpubKey Post /util/get_addrs_by_xpubkey Derive heristic determined addresses from an extended public key, per BIP32
UtilApi GetXpubKeyInfo Post /util/get_xpubkey_info Decode information about an extended public key, per BIP32
WalletApi Balance Post /wallet/balance Get total balance for wallet
WalletApi CreateWallet Post /wallet/create create a new wallet
WalletApi DepositAddress Post /wallet/deposit_address Get a deposit address in cash address format
WalletApi DepositQr Post /wallet/deposit_qr Get receiving cash address as a qrcode
WalletApi EncodeTransaction Post /wallet/encode_transaction Encode and sign a transaction given a list of sendRequests, options and estimate fees
WalletApi GetAllNftTokenBalances Post /wallet/get_all_nft_token_balances Get non-fungible token balance
WalletApi GetAllTokenBalances Post /wallet/get_all_token_balances Get non-fungible token balance
WalletApi GetHistory Post /wallet/get_history Get a simplified list of transactions related to a wallet
WalletApi GetNftTokenBalance Post /wallet/get_nft_token_balance Get non-fungible token balance
WalletApi GetTokenBalance Post /wallet/get_token_balance Get fungible token balance
WalletApi GetTokenUtxos Post /wallet/get_token_utxos Get token utxos
WalletApi Info Post /wallet/info Get information about a wallet
WalletApi MaxAmountToSend Post /wallet/max_amount_to_send Get maximum spendable amount
WalletApi NamedExists Post /wallet/named_exists Check if a named wallet already exists
WalletApi ReplaceNamed Post /wallet/replace_named Replace (recover) named wallet with a new walletId. If wallet with a provided name does not exist yet, it will be creted with a `walletId` supplied If wallet exists it will be overwritten without exception
WalletApi Send Post /wallet/send Send some amount to a given address
WalletApi SendMax Post /wallet/send_max Send all available funds to a given address
WalletApi SubmitTransaction Post /wallet/submit_transaction submit an encoded and signed transaction to the network
WalletApi TokenBurn Post /wallet/token_burn Perform an explicit token burn
WalletApi TokenDepositAddress Post /wallet/token_deposit_address Get a token aware deposit address in cash address format
WalletApi TokenDepositQr Post /wallet/token_deposit_qr Get receiving token aware cash address as a qrcode
WalletApi TokenGenesis Post /wallet/token_genesis Create new token category
WalletApi TokenMint Post /wallet/token_mint Mint new non-fungible tokens
WalletApi Utxos Post /wallet/utxo Get detailed information about unspent outputs (utxos)
WalletApi Xpubkeys Post /wallet/xpubkeys A set of xpubkeys and paths for the wallet.
WalletBcmrApi BcmrAddMetadataRegistryAuthChain Post /wallet/bcmr/add_registry_authchain Add BCMR metadata registry from autchain, returning the built chain
WalletBcmrApi BcmrAddRegistry Post /wallet/bcmr/add_registry Add BCMR registry from parameter
WalletBcmrApi BcmrAddRegistryFromUri Post /wallet/bcmr/add_registry_from_uri Reset tracked BCMR registries
WalletBcmrApi BcmrBuildAuthChain Post /wallet/bcmr/build_authchain Build a BCMR authchain
WalletBcmrApi BcmrGetRegistries Post /wallet/bcmr/get_registries Get tracked BCMR registries
WalletBcmrApi BcmrGetTokenInfo Post /wallet/bcmr/get_token_info Get token info
WalletBcmrApi BcmrResetRegistries Post /wallet/bcmr/reset_registries Reset tracked BCMR registries
WalletSignedApi SignedMessageSign Post /wallet/signed/sign Returns the message signature
WalletSignedApi SignedMessageVerify Post /wallet/signed/verify Returns a boolean indicating whether message was valid for a given address
WalletSlpApi NftChildGenesis Post /wallet/slp/nft_child_genesis Get created tokenId back and new NFT child token balance of the wallet
WalletSlpApi NftParentGenesis Post /wallet/slp/nft_parent_genesis Get created tokenId back and new NFT token balance of the wallet
WalletSlpApi SlpAllBalances Post /wallet/slp/all_balances Get all slp balances of the wallet
WalletSlpApi SlpBalance Post /wallet/slp/balance Get total slp token balance of the wallet
WalletSlpApi SlpCreateWallet Post /wallet/slp/create create a new SLP wallet
WalletSlpApi SlpDepositAddress Post /wallet/slp/deposit_address Get an SLP deposit address in cash address format
WalletSlpApi SlpDepositQr Post /wallet/slp/deposit_qr Get an SLP receiving cash address as a qrcode
WalletSlpApi SlpGenesis Post /wallet/slp/genesis Get created tokenId back and new slp token balance of the wallet
WalletSlpApi SlpMint Post /wallet/slp/mint Get created tokenId back and new slp token balance of the wallet
WalletSlpApi SlpOutpoints Post /wallet/slp/outpoints Get list of unspent SLP outpoints.
WalletSlpApi SlpSend Post /wallet/slp/send Send some SLP token amount to a given cash address
WalletSlpApi SlpSendMax Post /wallet/slp/send_max Send all available SLP funds to a given address
WalletSlpApi SlpTokenInfo Post /wallet/slp/token_info Get information about the token
WalletSlpApi SlpUtxos Post /wallet/slp/utxo Get detailed information about unspent SLP outputs (utxos)
WalletUtilApi UtilDecodeTransaction Post /wallet/util/decode_transaction Decode a bitcoin transaction. Accepts both transaction hash or raw transaction in hex format.
WalletUtilApi UtilGetRawTransaction Post /wallet/util/get_raw_transaction Get bitcoin raw transaction
WebhookApi WatchAddress Post /webhook/watch_address Create a webhook to watch cashaddress balance and transactions.

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Author

hello@mainnet.cash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published