@hirosystems/token-metadata-api-client 1.0.0 → 1.0.1
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/.swagger-codegen-ignore +2 -23
- package/README.md +11 -37
- package/package.json +12 -4
package/.swagger-codegen-ignore
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
# Swagger Codegen Ignore
|
|
2
|
-
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
|
3
|
-
|
|
4
|
-
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
-
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
-
|
|
7
|
-
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
-
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
|
9
|
-
#ApiClient.cs
|
|
10
|
-
|
|
11
|
-
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
-
#foo/*/qux
|
|
13
|
-
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
-
|
|
15
|
-
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
-
#foo/**/qux
|
|
17
|
-
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
-
|
|
19
|
-
# You can also negate patterns with an exclamation (!).
|
|
20
|
-
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
-
#docs/*.md
|
|
22
|
-
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
-
#!docs/README.md
|
|
24
1
|
package.json
|
|
2
|
+
package-lock.json
|
|
3
|
+
README.md
|
package/README.md
CHANGED
|
@@ -1,45 +1,19 @@
|
|
|
1
|
-
## @hirosystems/token-metadata-api-client
|
|
1
|
+
## @hirosystems/token-metadata-api-client
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This is a client library for the [Token Metadata API](https://github.com/hirosystems/token-metadata-api).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
* Node.js
|
|
7
|
-
* Webpack
|
|
8
|
-
* Browserify
|
|
5
|
+
### Installation
|
|
9
6
|
|
|
10
|
-
Language level
|
|
11
|
-
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
-
* ES6
|
|
13
|
-
|
|
14
|
-
Module system
|
|
15
|
-
* CommonJS
|
|
16
|
-
* ES6 module system
|
|
17
|
-
|
|
18
|
-
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
|
|
19
|
-
|
|
20
|
-
### Building
|
|
21
|
-
|
|
22
|
-
To build an compile the typescript sources to javascript use:
|
|
23
7
|
```
|
|
24
|
-
npm install
|
|
25
|
-
npm run build
|
|
8
|
+
npm install @hirosystems/token-metadata-api-client
|
|
26
9
|
```
|
|
27
10
|
|
|
28
|
-
###
|
|
29
|
-
|
|
30
|
-
First build the package then run ```npm publish```
|
|
31
|
-
|
|
32
|
-
### Consuming
|
|
11
|
+
### Example
|
|
33
12
|
|
|
34
|
-
|
|
13
|
+
```typescript
|
|
14
|
+
import { Configuration, TokensApi } from "@hirosystems/token-metadata-api-client";
|
|
35
15
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
_unPublished (not recommended):_
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
16
|
+
const config: Configuration = {}
|
|
17
|
+
const api = new TokensApi(config);
|
|
18
|
+
const result = await api.getFtMetadata('SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2');
|
|
19
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hirosystems/token-metadata-api-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Client for @hirosystems/token-metadata-api",
|
|
5
5
|
"author": "Hiro Systems PBC <engineering@hiro.so> (https://hiro.so)",
|
|
6
6
|
"keywords": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "GPL-3.0",
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"typings": "./dist/index.d.ts",
|
|
15
|
-
"scripts"
|
|
15
|
+
"scripts": {
|
|
16
16
|
"build": "tsc --outDir dist/",
|
|
17
17
|
"test": "jest",
|
|
18
18
|
"prepublishOnly": "npm run build"
|
|
@@ -34,5 +34,13 @@
|
|
|
34
34
|
"^.+\\.tsx?$": "ts-jest"
|
|
35
35
|
},
|
|
36
36
|
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
|
37
|
-
"moduleFileExtensions": [
|
|
38
|
-
|
|
37
|
+
"moduleFileExtensions": [
|
|
38
|
+
"ts",
|
|
39
|
+
"tsx",
|
|
40
|
+
"js",
|
|
41
|
+
"jsx",
|
|
42
|
+
"json",
|
|
43
|
+
"node"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|