Skip to content

Commit b7e838d

Browse files
authored
build: generate client with openapi-typescript (#274)
* build: generate client with openapi-typescript * fix: bump breaking version
1 parent 1aab466 commit b7e838d

23 files changed

+7953
-12864
lines changed

client/typescript/.gitignore renamed to client/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ wwwroot/*.js
22
node_modules
33
typings
44
dist
5+
lib

client/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## @hirosystems/token-metadata-api-client
2+
3+
This is a client library for the [Token Metadata API](https://github.com/hirosystems/token-metadata-api).
4+
5+
### Installation
6+
7+
```
8+
npm install @hirosystems/token-metadata-api-client
9+
```
10+
11+
### Example
12+
13+
```typescript
14+
import { createClient } from '@hirosystems/token-metadata-api-client';
15+
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+
```

0 commit comments

Comments
 (0)