@hirosystems/token-metadata-api-client 1.2.0 → 2.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,9 +11,14 @@ npm install @hirosystems/token-metadata-api-client
11
11
  ### Example
12
12
 
13
13
  ```typescript
14
- import { Configuration, TokensApi } from "@hirosystems/token-metadata-api-client";
14
+ import { createClient } from '@hirosystems/token-metadata-api-client';
15
15
 
16
- const config: Configuration = {}
17
- const api = new TokensApi(config);
18
- const result = await api.getFtMetadata('SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2');
19
- ```
16
+ const client = createClient({ baseUrl: 'https://api.mainnet.hiro.so' });
17
+ const metadata = await client.GET('/metadata/v1/ft/{principal}', {
18
+ params: {
19
+ path: {
20
+ principal: 'SM26AQGZBMDPN2NTH0DJWFESFV0NJC744F1GQVZ6Y.token-btc',
21
+ },
22
+ },
23
+ });
24
+ ```