/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { AdaAccount } from '../models/AdaAccount'; import type { AdaBlock } from '../models/AdaBlock'; import type { AdaInfo } from '../models/AdaInfo'; import type { AdaTransactionFromAddress } from '../models/AdaTransactionFromAddress'; import type { AdaTransactionFromAddressKMS } from '../models/AdaTransactionFromAddressKMS'; import type { AdaTransactionFromUTXO } from '../models/AdaTransactionFromUTXO'; import type { AdaTransactionFromUTXOKMS } from '../models/AdaTransactionFromUTXOKMS'; import type { AdaTx } from '../models/AdaTx'; import type { AdaUTXO } from '../models/AdaUTXO'; import type { BroadcastKMS } from '../models/BroadcastKMS'; import type { PrivKey } from '../models/PrivKey'; import type { PrivKeyRequest } from '../models/PrivKeyRequest'; import type { SignatureId } from '../models/SignatureId'; import type { TransactionHash } from '../models/TransactionHash'; import type { Wallet } from '../models/Wallet'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class CardanoService { /** * @deprecated * Get Blockchain information *
Support for Cardano is deprecated.
You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Gets Ada blockchain information. Obtains basic info like the testnet / mainnet version of the chain, the current block number and its hash.
* @returns AdaInfo OK * @throws ApiError */ public static adaGetBlockChainInfo(): CancelablePromiseSupport for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
100 credits per API call
*Use this endpoint URL as an GraphQL to connect directly to the Ada node provided by Tatum. You can find full documentation on the Cardano GraphQL API.
* * @param requestBody * @returns any OK * @throws ApiError */ public static adaGraphQl( requestBody: any, ): CancelablePromiseSupport for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Tatum supports BIP44 HD wallets. Because they can generate 2^31 addresses from 1 mnemonic phrase, they are very convenient and secure. A mnemonic phrase consists of 24 special words in a defined order and can restore access to all generated addresses and private keys.
Each address is identified by 3 main values:
Tatum follows BIP44 specification and generates for ADA wallet with derivation path m/1852'/1815'/0'. More about BIP44 HD wallets can be found here - https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki. * Generate BIP44 compatible Ada wallet.
* * @param mnemonic Mnemonic to use for generation of extended public and private keys. * @returns Wallet OK * @throws ApiError */ public static adaGenerateWallet( mnemonic?: string, ): CancelablePromiseSupport for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Generates a Ada deposit address from an Extended public key. The deposit address is generated for the specific index - each extended public key can generate * up to 2^31 addresses starting from index 0 until 2^31 - 1.
* * @param xpub Extended public key of a wallet. * @param index Derivation index of the desired address to be generated. * @returns any OK * @throws ApiError */ public static adaGenerateAddress( xpub: string, index: number, ): CancelablePromise<{ /** * Ada address */ address?: string; }> { return __request({ method: 'GET', path: `/v3/ada/address/${xpub}/${index}`, errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * @deprecated * Generate Ada private key *Support for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Generates a private key for an address from a mnemonic for a given derivation path index. The private key is generated for the specific index - each mnemonic * can generate up to 2^32 private keys starting from index 0 until 2^31 - 1.
* * @param requestBody * @returns PrivKey OK * @throws ApiError */ public static adaGenerateAddressPrivateKey( requestBody: PrivKeyRequest, ): CancelablePromiseSupport for Cardano is deprecated.
You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Gets Ada block detail by block hash or height.
* @param hash Block hash or height. * @returns AdaBlock OK * @throws ApiError */ public static adaGetBlock( hash: string, ): CancelablePromiseSupport for Cardano is deprecated.
You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Get Ada Transaction detail by transaction hash.
* @param hash Transaction hash * @returns AdaTx OK * @throws ApiError */ public static adaGetRawTransaction( hash: string, ): CancelablePromiseSupport for Cardano is deprecated.
You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Gets a Ada transaction by address.
* @param address Address * @param pageSize Max number of items per page is 50. * @param offset Offset to obtain the next page of data. * @returns AdaTx OK * @throws ApiError */ public static adaGetTxByAddress( address: string, pageSize: number, offset?: number, ): CancelablePromiseSupport for Cardano is deprecated.
You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Gets a Ada UTXOs by address.
* @param address Address * @returns AdaUTXO OK * @throws ApiError */ public static adaGetUtxoByAddress( address: string, ): CancelablePromiseSupport for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Send Ada to blockchain addresses. It is possible to build a blockchain transaction in 2 ways: *
Support for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Broadcasts a signed transaction to the Ada blockchain. This method is used internally from Tatum KMS, Tatum Middleware or Tatum Client Libraries. * It is possible to create a custom signing mechanism and only use this method for broadcasting data to the blockchain.
* * @param requestBody * @returns TransactionHash OK * @throws ApiError */ public static adaBroadcast( requestBody: BroadcastKMS, ): CancelablePromiseSupport for Cardano is deprecated.
* You can work with Cardano by connecting directly to a blockchain node provided by Tatum.
Gets a Ada account by address.
* * @param address Address * @returns AdaAccount OK * @throws ApiError */ public static adaGetAccount( address: string, ): CancelablePromise