@wharfkit/antelope
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@wharfkit/antelope", | ||
"description": "Library for working with Antelope powered blockchains.", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"homepage": "https://github.com/wharfkit/antelope", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause-No-Military-License", |
@@ -30,2 +30,4 @@ import {APIClient} from '../client' | ||
GetBlockResponse, | ||
GetCurrencyStatsItemResponse, | ||
GetCurrencyStatsResponse, | ||
GetInfoResponse, | ||
@@ -135,2 +137,21 @@ GetProducerScheduleResponse, | ||
async get_currency_stats( | ||
contract: NameType, | ||
symbol: string | ||
): Promise<GetCurrencyStatsResponse> { | ||
const params: any = { | ||
code: Name.from(contract), | ||
symbol, | ||
} | ||
const response: GetCurrencyStatsResponse = await this.client.call({ | ||
path: '/v1/chain/get_currency_stats', | ||
params, | ||
}) | ||
const result: GetCurrencyStatsResponse = {} | ||
Object.keys(response).forEach( | ||
(r) => (result[r] = GetCurrencyStatsItemResponse.from(response[r])) | ||
) | ||
return result | ||
} | ||
async get_info() { | ||
@@ -137,0 +158,0 @@ return this.client.call({ |
@@ -644,2 +644,13 @@ import pako from 'pako' | ||
export interface GetCurrencyStatsResponse { | ||
[key: string]: GetCurrencyStatsItemResponse | ||
} | ||
@Struct.type('get_currency_stats_item_response') | ||
export class GetCurrencyStatsItemResponse extends Struct { | ||
@Struct.field('asset') declare supply: Asset | ||
@Struct.field('asset') declare max_supply: Asset | ||
@Struct.field('name') declare issuer: Name | ||
} | ||
@Struct.type('get_transaction_status_response') | ||
@@ -646,0 +657,0 @@ export class GetTransactionStatusResponse extends Struct { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1153469
20986