diff --git a/src/api/account/AccountService.ts b/src/api/account/AccountService.ts index 0db08d8..fe7c0e0 100644 --- a/src/api/account/AccountService.ts +++ b/src/api/account/AccountService.ts @@ -16,7 +16,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of account (stake address) IDs */ - getAccountList(options?: Options): Promise; + getAccountList(options?: Options): Promise; /** * Account Information @@ -30,7 +30,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of account information */ - getAccountInformation(stakeAddresses: string[], options?: Options): Promise; + getAccountInformation(stakeAddresses: string[], options?: Options): Promise; /** * Account UTxOs @@ -44,7 +44,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of account UTxOs associated with stake address */ - getAccountUTxOs(stakeAddress: string, options?: Options): Promise; + getAccountUTxOs(stakeAddress: string, options?: Options): Promise; /** * Account Information (Cached) @@ -58,7 +58,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of account information */ - getAccountInformationCached(stakeAddresses: string[], options?: Options): Promise; + getAccountInformationCached(stakeAddresses: string[], options?: Options): Promise; /** * Account Rewards @@ -73,7 +73,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of reward history information */ - getAccountRewards(stakeAddresses: string[], epochNo?: number, options?: Options): Promise; + getAccountRewards(stakeAddresses: string[], epochNo?: number, options?: Options): Promise; /** * Account Updates @@ -87,7 +87,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of account updates information */ - getAccountUpdates(stakeAddresses: string[], options?: Options): Promise; + getAccountUpdates(stakeAddresses: string[], options?: Options): Promise; /** * Account Addresses @@ -103,7 +103,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of payment addresses */ - getAccountAddresses(stakeAddresses: string[], firstOnly?: boolean, empty?: boolean, options?: Options): Promise; + getAccountAddresses(stakeAddresses: string[], firstOnly?: boolean, empty?: boolean, options?: Options): Promise; /** * Account Assets @@ -117,7 +117,7 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of assets owned by account */ - getAccountAssets(stakeAddresses: string[], options?: Options): Promise; + getAccountAssets(stakeAddresses: string[], options?: Options): Promise; /** * Account History @@ -132,5 +132,5 @@ export interface AccountService { * @param options Filtering and Pagination options (optional) * @return Array of active stake values per epoch */ - getAccountHistory(stakeAddresses: string[], epochNo?: number, options?: Options): Promise; + getAccountHistory(stakeAddresses: string[], epochNo?: number, options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/account/impl/AccountServiceImpl.ts b/src/api/account/impl/AccountServiceImpl.ts index cecc433..72c3d62 100644 --- a/src/api/account/impl/AccountServiceImpl.ts +++ b/src/api/account/impl/AccountServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class AccountServiceImpl extends BaseService implements AccountService { - getAccountList(options?: Options): Promise { + getAccountList(options?: Options): Promise { return this.get(`account_list${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -18,7 +18,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountInformation(stakeAddresses: string[], options?: Options): Promise { + getAccountInformation(stakeAddresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -31,7 +31,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountUTxOs(stakeAddress: string, options?: Options): Promise { + getAccountUTxOs(stakeAddress: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -45,7 +45,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountInformationCached(stakeAddresses: string[], options?: Options): Promise { + getAccountInformationCached(stakeAddresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -58,7 +58,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountRewards(stakeAddresses: string[], epochNo?: number, options?: Options): Promise { + getAccountRewards(stakeAddresses: string[], epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -71,7 +71,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountUpdates(stakeAddresses: string[], options?: Options): Promise { + getAccountUpdates(stakeAddresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -85,7 +85,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { } - getAccountAddresses(stakeAddresses: string[], firstOnly?: boolean, empty?: boolean, options?: Options): Promise { + getAccountAddresses(stakeAddresses: string[], firstOnly?: boolean, empty?: boolean, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -105,7 +105,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountAssets(stakeAddresses: string[], options?: Options): Promise { + getAccountAssets(stakeAddresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -118,7 +118,7 @@ export class AccountServiceImpl extends BaseService implements AccountService { }) } - getAccountHistory(stakeAddresses: string[], epochNo?: number, options?: Options): Promise { + getAccountHistory(stakeAddresses: string[], epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/address/AddressService.ts b/src/api/address/AddressService.ts index 10bc289..1f8af30 100644 --- a/src/api/address/AddressService.ts +++ b/src/api/address/AddressService.ts @@ -17,7 +17,7 @@ export interface AddressService { * @param options Filtering and Pagination options (optional) * @return Array of address information */ - getAddressInformation(addresses: string[], options?: Options): Promise; + getAddressInformation(addresses: string[], options?: Options): Promise; /** * Address Transactions @@ -32,7 +32,7 @@ export interface AddressService { * @param options Filtering and Pagination options (optional) * @return Array of transaction hashes */ - getAddressTransactions(addresses: string[], afterBlockHeight?: number, options?: Options): Promise; + getAddressTransactions(addresses: string[], afterBlockHeight?: number, options?: Options): Promise; /** * UTxOs from payment credentials @@ -46,7 +46,7 @@ export interface AddressService { * @param options Filtering and Pagination options (optional) * @return Array of UTxOs with balances */ - getCredentialUTxOs(paymentCredentials: string[], options?: Options): Promise; + getCredentialUTxOs(paymentCredentials: string[], options?: Options): Promise; /** * Address Assets @@ -60,7 +60,7 @@ export interface AddressService { * @param options Filtering and Pagination options (optional) * @return Array of address-owned assets */ - getAddressAssets(addresses: string[], options?: Options): Promise; + getAddressAssets(addresses: string[], options?: Options): Promise; /** * Transactions from payment credentials @@ -75,5 +75,5 @@ export interface AddressService { * @param options Filtering and Pagination options (optional) * @return Array of transaction hashes */ - getCredentialsTxs(paymentCredentials: string[], afterBlockHeight?: number, options?: Options): Promise; + getCredentialsTxs(paymentCredentials: string[], afterBlockHeight?: number, options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/address/impl/AddressServiceImpl.ts b/src/api/address/impl/AddressServiceImpl.ts index 28d101d..7e3ceaf 100644 --- a/src/api/address/impl/AddressServiceImpl.ts +++ b/src/api/address/impl/AddressServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class AddressServiceImpl extends BaseService implements AddressService { - getAddressInformation(addresses: string[], options?: Options): Promise { + getAddressInformation(addresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -21,7 +21,7 @@ export class AddressServiceImpl extends BaseService implements AddressService { }) } - getAddressTransactions(addresses: string[], afterBlockHeight?: number, options?: Options): Promise { + getAddressTransactions(addresses: string[], afterBlockHeight?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -34,7 +34,7 @@ export class AddressServiceImpl extends BaseService implements AddressService { }) } - getCredentialUTxOs(paymentCredentials: string[], options?: Options): Promise { + getCredentialUTxOs(paymentCredentials: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -47,7 +47,7 @@ export class AddressServiceImpl extends BaseService implements AddressService { }) } - getAddressAssets(addresses: string[], options?: Options): Promise { + getAddressAssets(addresses: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -60,7 +60,7 @@ export class AddressServiceImpl extends BaseService implements AddressService { }) } - getCredentialsTxs(paymentCredentials: string[], afterBlockHeight?: number, options?: Options): Promise { + getCredentialsTxs(paymentCredentials: string[], afterBlockHeight?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/asset/AssetService.ts b/src/api/asset/AssetService.ts index d24bf96..0382ed7 100644 --- a/src/api/asset/AssetService.ts +++ b/src/api/asset/AssetService.ts @@ -16,7 +16,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of policy IDs and asset names */ - getAssetList(options?: Options): Promise; + getAssetList(options?: Options): Promise; /** * Asset Token Registry @@ -29,7 +29,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of token registry information for each asset */ - getAssetTokenRegistry(options?: Options): Promise; + getAssetTokenRegistry(options?: Options): Promise; /** * Asset Addresses @@ -44,7 +44,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of payment addresses holding the given token (including balances) */ - getAssetAddresses(assetPolicy: string, assetName?: string, options?: Options): Promise; + getAssetAddresses(assetPolicy: string, assetName?: string, options?: Options): Promise; /** * NFT Address @@ -59,7 +59,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Payment addresses currently holding the given NFT */ - getNFTAddress(assetPolicy: string, assetName?: string, options?: Options): Promise; + getNFTAddress(assetPolicy: string, assetName?: string, options?: Options): Promise; /** * Asset Information @@ -74,7 +74,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of detailed asset information */ - getAssetInformation(assetPolicy: string, assetName?: string, options?: Options): Promise; + getAssetInformation(assetPolicy: string, assetName?: string, options?: Options): Promise; /** * Asset Information (Bulk) @@ -88,7 +88,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of detailed asset information */ - getAssetInformationBulk(assets: [string, string][], options?: Options): Promise; + getAssetInformationBulk(assets: [string, string][], options?: Options): Promise; /** * Asset History @@ -103,7 +103,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of asset mint/burn history */ - getAssetHistory(assetPolicy: string, assetName?: string, options?: Options): Promise; + getAssetHistory(assetPolicy: string, assetName?: string, options?: Options): Promise; /** * Policy Asset Address List @@ -117,7 +117,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of asset names and payment addresses for the given policy (including balances) */ - getPolicyAssetAddressList(assetPolicy: string, options?: Options): Promise; + getPolicyAssetAddressList(assetPolicy: string, options?: Options): Promise; /** * Policy Asset Information @@ -131,7 +131,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of detailed information of assets under the same policy */ - getPolicyAssetInformation(assetPolicy: string, options?: Options): Promise; + getPolicyAssetInformation(assetPolicy: string, options?: Options): Promise; /** * Policy Asset List @@ -145,7 +145,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of detailed information of assets under the same policy */ - getPolicyAssetList(assetPolicy: string, options?: Options): Promise; + getPolicyAssetList(assetPolicy: string, options?: Options): Promise; /** * Asset Summary @@ -160,7 +160,7 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of asset summary information */ - getAssetSummary(assetPolicy: string, assetName?: string, options?: Options): Promise; + getAssetSummary(assetPolicy: string, assetName?: string, options?: Options): Promise; /** * Asset Transactions @@ -177,5 +177,5 @@ export interface AssetService { * @param options Filtering and Pagination options (optional) * @return Array of Tx hashes that included the given asset */ - getAssetTransactions(assetPolicy: string, assetName?: string, afterBlockHeight?: number, history?: boolean, options?: Options): Promise; + getAssetTransactions(assetPolicy: string, assetName?: string, afterBlockHeight?: number, history?: boolean, options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/asset/impl/AssetServiceImpl.ts b/src/api/asset/impl/AssetServiceImpl.ts index b846339..af0935f 100644 --- a/src/api/asset/impl/AssetServiceImpl.ts +++ b/src/api/asset/impl/AssetServiceImpl.ts @@ -2,13 +2,14 @@ import {BaseService} from "../../base/BaseService"; import {AssetService} from "../AssetService"; import {Options} from "../../../factory/options/Options"; import {KoiosHttpError} from "../../base/Errors"; +import {Response} from "node-fetch"; /** * Address Service Implementation */ export class AssetServiceImpl extends BaseService implements AssetService { - getAssetList(options?: Options): Promise { + getAssetList(options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -21,7 +22,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetTokenRegistry(options?: Options): Promise { + getAssetTokenRegistry(options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -34,7 +35,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetAddresses(assetPolicy: string, assetName?: string, options?: Options): Promise { + getAssetAddresses(assetPolicy: string, assetName?: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -51,7 +52,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getNFTAddress(assetPolicy: string, assetName?: string, options?: Options): Promise { + getNFTAddress(assetPolicy: string, assetName?: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -68,7 +69,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetInformation(assetPolicy: string, assetName?: string, options?: Options): Promise { + getAssetInformation(assetPolicy: string, assetName?: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -85,7 +86,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetInformationBulk(assets: [string, string][], options?: Options): Promise { + getAssetInformationBulk(assets: [string, string][], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -98,7 +99,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetHistory(assetPolicy: string, assetName?: string, options?: Options): Promise { + getAssetHistory(assetPolicy: string, assetName?: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -115,7 +116,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getPolicyAssetAddressList(assetPolicy: string, options?: Options): Promise { + getPolicyAssetAddressList(assetPolicy: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -129,7 +130,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getPolicyAssetInformation(assetPolicy: string, options?: Options): Promise { + getPolicyAssetInformation(assetPolicy: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -143,7 +144,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getPolicyAssetList(assetPolicy: string, options?: Options): Promise { + getPolicyAssetList(assetPolicy: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -157,7 +158,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetSummary(assetPolicy: string, assetName?: string, options?: Options): Promise { + getAssetSummary(assetPolicy: string, assetName?: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -174,7 +175,7 @@ export class AssetServiceImpl extends BaseService implements AssetService { }) } - getAssetTransactions(assetPolicy: string, assetName?: string, afterBlockHeight?: number, history?: boolean, options?: Options): Promise { + getAssetTransactions(assetPolicy: string, assetName?: string, afterBlockHeight?: number, history?: boolean, options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/base/BaseService.ts b/src/api/base/BaseService.ts index e3879f8..cc2a48a 100644 --- a/src/api/base/BaseService.ts +++ b/src/api/base/BaseService.ts @@ -36,10 +36,10 @@ export class BaseService { return maxRetries >= 1 ? maxRetries : this.retriesCount; } - public get(url: string): Promise { + public get(url: string): Promise { let params: RequestInit = { headers: { - 'accept': 'application/json', + 'Accept': 'application/json', 'Content-Type': 'application/json' }, method: "GET" @@ -48,7 +48,7 @@ export class BaseService { return this.execute(this.baseUrl + url, params,{ timeoutInSeconds: this.getReadTimeoutSec(), tries: this.getMaxRetries() }); } - public post(url: string, body: any): Promise { + public post(url: string, body: any): Promise { function resolveContentType(body: any): string { return (body && (body.constructor === String || body.constructor === Uint8Array)) ? 'application/cbor' : 'application/json' diff --git a/src/api/block/BlockService.ts b/src/api/block/BlockService.ts index 84a93ca..89bf2b8 100644 --- a/src/api/block/BlockService.ts +++ b/src/api/block/BlockService.ts @@ -16,7 +16,7 @@ export interface BlockService { * @param options Filtering and Pagination options (optional) * @return Array of block information */ - getBlockList(options?: Options): Promise; + getBlockList(options?: Options): Promise; /** * Block Information @@ -30,7 +30,7 @@ export interface BlockService { * @param options Filtering and Pagination options (optional) * @return Array of detailed block information */ - getBlockInformation(blockHashes: string[], options?: Options): Promise; + getBlockInformation(blockHashes: string[], options?: Options): Promise; /** * Block Transactions @@ -44,5 +44,5 @@ export interface BlockService { * @param options Filtering and Pagination options (optional) * @return Array of transactions hashes */ - getBlockTransactions(blockHashes: string[], options?: Options): Promise; + getBlockTransactions(blockHashes: string[], options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/block/impl/BlockServiceImpl.ts b/src/api/block/impl/BlockServiceImpl.ts index 0832f8f..cbcab0a 100644 --- a/src/api/block/impl/BlockServiceImpl.ts +++ b/src/api/block/impl/BlockServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class BlockServiceImpl extends BaseService implements BlockService { - getBlockList(options?: Options): Promise { + getBlockList(options?: Options): Promise { return this.get(`blocks${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -18,7 +18,7 @@ export class BlockServiceImpl extends BaseService implements BlockService { }) } - getBlockInformation(blockHashes: string[], options?: Options): Promise { + getBlockInformation(blockHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -31,7 +31,7 @@ export class BlockServiceImpl extends BaseService implements BlockService { }) } - getBlockTransactions(blockHashes: string[], options?: Options): Promise { + getBlockTransactions(blockHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/epoch/EpochService.ts b/src/api/epoch/EpochService.ts index f3fe826..f983303 100644 --- a/src/api/epoch/EpochService.ts +++ b/src/api/epoch/EpochService.ts @@ -18,7 +18,7 @@ export interface EpochService { * @param options Filtering and Pagination options (optional) * @return Array of detailed summary for each epoch */ - getEpochInformation(epochNo?: number, includeNextEpoch?: boolean, options?: Options): Promise; + getEpochInformation(epochNo?: number, includeNextEpoch?: boolean, options?: Options): Promise; /** * Epoch's Protocol Parameters @@ -32,7 +32,7 @@ export interface EpochService { * @param options Filtering and Pagination options (optional) * @return Array of protocol parameters for each epoch */ - getEpochProtocolParameters(epochNo?: number, options?: Options): Promise; + getEpochProtocolParameters(epochNo?: number, options?: Options): Promise; /** * Epoch's Block Protocols @@ -46,5 +46,5 @@ export interface EpochService { * @param options Filtering and Pagination options (optional) * @return Array of distinct block protocol versions counts in epoch */ - getEpochBlockProtocols(epochNo?: number, options?: Options): Promise; + getEpochBlockProtocols(epochNo?: number, options?: Options): Promise; } diff --git a/src/api/epoch/impl/EpochServiceImpl.ts b/src/api/epoch/impl/EpochServiceImpl.ts index b188020..ecb3173 100644 --- a/src/api/epoch/impl/EpochServiceImpl.ts +++ b/src/api/epoch/impl/EpochServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class EpochServiceImpl extends BaseService implements EpochService { - getEpochInformation(epochNo?: number, includeNextEpoch?: boolean, options?: Options): Promise { + getEpochInformation(epochNo?: number, includeNextEpoch?: boolean, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -27,7 +27,7 @@ export class EpochServiceImpl extends BaseService implements EpochService { }) } - getEpochProtocolParameters(epochNo?: number, options?: Options): Promise { + getEpochProtocolParameters(epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -43,7 +43,7 @@ export class EpochServiceImpl extends BaseService implements EpochService { }) } - getEpochBlockProtocols(epochNo?: number, options?: Options): Promise { + getEpochBlockProtocols(epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/network/NetworkService.ts b/src/api/network/NetworkService.ts index 40ce46a..9c93a16 100644 --- a/src/api/network/NetworkService.ts +++ b/src/api/network/NetworkService.ts @@ -13,7 +13,7 @@ export interface NetworkService { * @param options Filtering and Pagination options (optional) * @return Array of block summary (limit+paginated) */ - getChainTip(options?: Options): Promise; + getChainTip(options?: Options): Promise; /** * Get Genesis info @@ -26,7 +26,7 @@ export interface NetworkService { * @param options Filtering and Pagination options (optional) * @return Array of genesis parameters used to start each era on chain */ - getGenesisInfo(options?: Options): Promise; + getGenesisInfo(options?: Options): Promise; /** * Get historical tokenomic stats By Epoch @@ -40,7 +40,7 @@ export interface NetworkService { * @param options Filtering and Pagination options (optional) * @return Array of supply/reserves/utxo/fees/treasury stats */ - getHistoricalTokenomicStatsByEpoch(epochNo?: number, options?: Options): Promise; + getHistoricalTokenomicStatsByEpoch(epochNo?: number, options?: Options): Promise; /** * Param Update Proposals @@ -53,5 +53,5 @@ export interface NetworkService { * @param options Filtering and Pagination options (optional) * @returns Array of unique param update proposals submitted on chain */ - getParamUpdateProposals(options?: Options): Promise; + getParamUpdateProposals(options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/network/impl/NetworkServiceImpl.ts b/src/api/network/impl/NetworkServiceImpl.ts index 61cd2bf..530d11b 100644 --- a/src/api/network/impl/NetworkServiceImpl.ts +++ b/src/api/network/impl/NetworkServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class NetworkServiceImpl extends BaseService implements NetworkService { - public getChainTip(options?: Options): Promise { + public getChainTip(options?: Options): Promise { return this.get(`tip${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -18,7 +18,7 @@ export class NetworkServiceImpl extends BaseService implements NetworkService { }) } - public getGenesisInfo(options?: Options): Promise { + public getGenesisInfo(options?: Options): Promise { return this.get(`genesis${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -28,7 +28,7 @@ export class NetworkServiceImpl extends BaseService implements NetworkService { }) } - public getHistoricalTokenomicStatsByEpoch(epochNo?: number, options?: Options): Promise { + public getHistoricalTokenomicStatsByEpoch(epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/pool/PoolService.ts b/src/api/pool/PoolService.ts index bfcc46d..475cf2d 100644 --- a/src/api/pool/PoolService.ts +++ b/src/api/pool/PoolService.ts @@ -13,7 +13,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool IDs and tickers */ - getPoolList(options?: Options): Promise; + getPoolList(options?: Options): Promise; /** * Pool Information @@ -27,7 +27,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool information */ - getPoolInformation(poolBech32Ids: string[], options?: Options): Promise; + getPoolInformation(poolBech32Ids: string[], options?: Options): Promise; /** * Pool Stake Snapshot @@ -41,7 +41,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool stake information for 3 snapshots */ - getPoolStakeSnapshot(poolBech32: string, options?: Options): Promise; + getPoolStakeSnapshot(poolBech32: string, options?: Options): Promise; /** * Pool Delegators List @@ -55,7 +55,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool delegator information */ - getPoolDelegatorsList(poolBech32: string, options?: Options): Promise; + getPoolDelegatorsList(poolBech32: string, options?: Options): Promise; /** * Pool Delegators History @@ -70,7 +70,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool delegator information */ - getPoolDelegatorsHistory(poolBech32: string, epochNo?: number, options?: Options): Promise; + getPoolDelegatorsHistory(poolBech32: string, epochNo?: number, options?: Options): Promise; /** * Pool Blocks @@ -85,7 +85,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of blocks created by pool */ - getPoolBlocks(poolBech32: string, epochNo?: number, options?: Options): Promise; + getPoolBlocks(poolBech32: string, epochNo?: number, options?: Options): Promise; /** * Pool Stake, Block and Reward History @@ -100,7 +100,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool history information */ - getPoolStakeBlockAndRewardHistory(poolBech32: string, epochNo?: number, options?: Options): Promise; + getPoolStakeBlockAndRewardHistory(poolBech32: string, epochNo?: number, options?: Options): Promise; /** * Pool Updates (History) @@ -114,7 +114,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of historical pool updates */ - getPoolUpdatesHistory(poolBech32: string, options?: Options): Promise; + getPoolUpdatesHistory(poolBech32: string, options?: Options): Promise; /** * Pool Relays @@ -127,7 +127,7 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool relay information */ - getPoolRelays(options?: Options): Promise; + getPoolRelays(options?: Options): Promise; /** * Pool Metadata @@ -141,5 +141,5 @@ export interface PoolService { * @param options Filtering and Pagination options (optional) * @return Array of pool metadata */ - getPoolMetadata(poolBech32Ids: string[], options?: Options): Promise; + getPoolMetadata(poolBech32Ids: string[], options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/pool/impl/PoolServiceImpl.ts b/src/api/pool/impl/PoolServiceImpl.ts index 4add0a1..40735a3 100644 --- a/src/api/pool/impl/PoolServiceImpl.ts +++ b/src/api/pool/impl/PoolServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class PoolServiceImpl extends BaseService implements PoolService { - getPoolList(options?: Options): Promise { + getPoolList(options?: Options): Promise { return this.get(`pool_list${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -18,7 +18,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolInformation(poolBech32Ids: string[], options?: Options): Promise { + getPoolInformation(poolBech32Ids: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -31,7 +31,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolStakeSnapshot(poolBech32: string, options?: Options): Promise { + getPoolStakeSnapshot(poolBech32: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -45,7 +45,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolDelegatorsList(poolBech32: string, options?: Options): Promise { + getPoolDelegatorsList(poolBech32: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -59,7 +59,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolDelegatorsHistory(poolBech32: string, epochNo?: number, options?: Options): Promise { + getPoolDelegatorsHistory(poolBech32: string, epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -76,7 +76,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolBlocks(poolBech32: string, epochNo?: number, options?: Options): Promise { + getPoolBlocks(poolBech32: string, epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -93,7 +93,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolStakeBlockAndRewardHistory(poolBech32: string, epochNo?: number, options?: Options): Promise { + getPoolStakeBlockAndRewardHistory(poolBech32: string, epochNo?: number, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -110,7 +110,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolUpdatesHistory(poolBech32: string, options?: Options): Promise { + getPoolUpdatesHistory(poolBech32: string, options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -124,7 +124,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolRelays(options?: Options): Promise { + getPoolRelays(options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -137,7 +137,7 @@ export class PoolServiceImpl extends BaseService implements PoolService { }) } - getPoolMetadata(poolBech32Ids: string[], options?: Options): Promise { + getPoolMetadata(poolBech32Ids: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } diff --git a/src/api/script/ScriptService.ts b/src/api/script/ScriptService.ts index 4b82e13..bf32641 100644 --- a/src/api/script/ScriptService.ts +++ b/src/api/script/ScriptService.ts @@ -13,7 +13,7 @@ export interface ScriptService { * @param options Filtering and Pagination options (optional) * @return List of native script and creation tx hash pairs */ - getNativeScriptList(options?: Options): Promise; + getNativeScriptList(options?: Options): Promise; /** * Plutus Script List @@ -26,7 +26,7 @@ export interface ScriptService { * @param options Filtering and Pagination options (optional) * @return List of Plutus script and creation tx hash pairs */ - getPlutusScriptList(options?: Options): Promise; + getPlutusScriptList(options?: Options): Promise; /** * Script Redeemers @@ -40,7 +40,7 @@ export interface ScriptService { * @param options Filtering and Pagination options (optional) * @return List of all redeemers for a given script hash */ - getScriptRedeemers(scriptHash: string, options?: Options): Promise; + getScriptRedeemers(scriptHash: string, options?: Options): Promise; /** * Datum Information @@ -54,5 +54,5 @@ export interface ScriptService { * @param options Filtering and Pagination options (optional) * @return List of datum information for given datum hashes */ - getDatumInformation(datumHashes: string[], options?: Options): Promise; + getDatumInformation(datumHashes: string[], options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/script/impl/ScriptServiceImpl.ts b/src/api/script/impl/ScriptServiceImpl.ts index 4e594c5..46e167d 100644 --- a/src/api/script/impl/ScriptServiceImpl.ts +++ b/src/api/script/impl/ScriptServiceImpl.ts @@ -9,7 +9,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class ScriptServiceImpl extends BaseService implements ScriptService { - getNativeScriptList(options?: Options): Promise { + getNativeScriptList(options?: Options): Promise { return this.get(`native_script_list${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -19,7 +19,7 @@ export class ScriptServiceImpl extends BaseService implements ScriptService { }) } - getPlutusScriptList(options?: Options): Promise { + getPlutusScriptList(options?: Options): Promise { return this.get(`plutus_script_list${this.optionsToQueryParams(options)}`) .then(async response => { if (!response.ok) { @@ -29,7 +29,7 @@ export class ScriptServiceImpl extends BaseService implements ScriptService { }) } - getScriptRedeemers(scriptHash:string, options?:Options): Promise { + getScriptRedeemers(scriptHash:string, options?:Options): Promise { if (!options) { options = Options.builder().build() } @@ -43,7 +43,7 @@ export class ScriptServiceImpl extends BaseService implements ScriptService { }) } - getDatumInformation(datumHashes: string[], options?: Options): Promise { + getDatumInformation(datumHashes: string[], options?: Options): Promise { return this.post(`datum_info${this.optionsToQueryParams(options)}`, this.buildBody("_datum_hashes", datumHashes)) .then(async response => { if (!response.ok) { diff --git a/src/api/transactions/TransactionsService.ts b/src/api/transactions/TransactionsService.ts index 30fb18e..f3d3fcc 100644 --- a/src/api/transactions/TransactionsService.ts +++ b/src/api/transactions/TransactionsService.ts @@ -14,7 +14,7 @@ export interface TransactionsService { * @param options Filtering and Pagination options (optional) * @return Array of detailed information about transaction(s) */ - getTransactionInformation(txHashes: string[], options?: Options): Promise; + getTransactionInformation(txHashes: string[], options?: Options): Promise; /** * Transaction UTxOs @@ -28,7 +28,7 @@ export interface TransactionsService { * @param options Filtering and Pagination options (optional) * @return Array of inputs and outputs for given transaction(s) */ - getTransactionUTxOs(txHashes: string[], options?: Options): Promise; + getTransactionUTxOs(txHashes: string[], options?: Options): Promise; /** * Transaction Metadata @@ -42,7 +42,7 @@ export interface TransactionsService { * @param options Filtering and Pagination options (optional) * @return Array of metadata information present in each of the transactions queried */ - getTransactionMetadata(txHashes: string[], options?: Options): Promise; + getTransactionMetadata(txHashes: string[], options?: Options): Promise; /** * Transaction Metadata Labels @@ -55,7 +55,7 @@ export interface TransactionsService { * @param options Filtering and Pagination options (optional) * @return Array of known metadata labels */ - getTransactionMetadataLabels(options?: Options): Promise; + getTransactionMetadataLabels(options?: Options): Promise; /** * Submit Transaction @@ -65,7 +65,7 @@ export interface TransactionsService { * * @return Transaction Id (hex) */ - submitTransaction(transactionData: Uint8Array | string): Promise; + submitTransaction(transactionData: Uint8Array | string): Promise; /** * Transaction Status (Block Confirmations) @@ -79,5 +79,5 @@ export interface TransactionsService { * @param options Filtering and Pagination options (optional) * @return Array of transaction confirmation counts */ - getTransactionStatus(txHashes: string[], options?: Options): Promise; + getTransactionStatus(txHashes: string[], options?: Options): Promise; } \ No newline at end of file diff --git a/src/api/transactions/impl/TransactionsServiceImpl.ts b/src/api/transactions/impl/TransactionsServiceImpl.ts index 908b123..73a6d28 100644 --- a/src/api/transactions/impl/TransactionsServiceImpl.ts +++ b/src/api/transactions/impl/TransactionsServiceImpl.ts @@ -8,7 +8,7 @@ import {KoiosHttpError} from "../../base/Errors"; */ export class TransactionsServiceImpl extends BaseService implements TransactionsService { - getTransactionInformation(txHashes: string[], options?: Options): Promise { + getTransactionInformation(txHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -21,7 +21,7 @@ export class TransactionsServiceImpl extends BaseService implements Transactions }) } - getTransactionUTxOs(txHashes: string[], options?: Options): Promise { + getTransactionUTxOs(txHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -34,7 +34,7 @@ export class TransactionsServiceImpl extends BaseService implements Transactions }) } - getTransactionMetadata(txHashes: string[], options?: Options): Promise { + getTransactionMetadata(txHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -47,7 +47,7 @@ export class TransactionsServiceImpl extends BaseService implements Transactions }) } - getTransactionMetadataLabels(options?: Options): Promise { + getTransactionMetadataLabels(options?: Options): Promise { if (!options) { options = Options.builder().build() } @@ -60,7 +60,7 @@ export class TransactionsServiceImpl extends BaseService implements Transactions }) } - submitTransaction(transactionData: Uint8Array | string): Promise { + submitTransaction(transactionData: Uint8Array | string): Promise { return this.post('submittx', transactionData) .then(async response => { if (!response.ok) { @@ -70,7 +70,7 @@ export class TransactionsServiceImpl extends BaseService implements Transactions }) } - getTransactionStatus(txHashes: string[], options?: Options): Promise { + getTransactionStatus(txHashes: string[], options?: Options): Promise { if (!options) { options = Options.builder().build() }