@center-inc/api-client
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -9,2 +9,3 @@ "use strict"; | ||
const axios_1 = __importDefault(require("axios")); | ||
const address_1 = require("@ethersproject/address"); | ||
exports.DEFAULT_BASE_URL = 'https://api.center.dev'; | ||
@@ -16,5 +17,6 @@ /** | ||
renderAssetPreset({ network, address, tokenId, preset, }) { | ||
return axios_1.default.get(`${this.request.config.BASE}/v1/${network}/${address}/${tokenId}/${preset}`); | ||
const checksumAddress = (0, address_1.getAddress)(address); | ||
return axios_1.default.get(`${this.request.config.BASE}/v1/${network}/${checksumAddress}/${tokenId}/${preset}`); | ||
} | ||
} | ||
exports.FullCenterClient = FullCenterClient; |
import { CenterClient } from './gen'; | ||
import axios from 'axios'; | ||
import { getAddress } from '@ethersproject/address'; | ||
export const DEFAULT_BASE_URL = 'https://api.center.dev'; | ||
@@ -9,4 +10,5 @@ /** | ||
renderAssetPreset({ network, address, tokenId, preset, }) { | ||
return axios.get(`${this.request.config.BASE}/v1/${network}/${address}/${tokenId}/${preset}`); | ||
const checksumAddress = getAddress(address); | ||
return axios.get(`${this.request.config.BASE}/v1/${network}/${checksumAddress}/${tokenId}/${preset}`); | ||
} | ||
} |
{ | ||
"author": "Omar Bohsali <omar@center.app>", | ||
"name": "@center-inc/api-client", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "api client for center.dev", | ||
@@ -10,2 +11,3 @@ "main": "./dist/cjs/index.js", | ||
"homepage": "https://center.dev", | ||
"repository": "center-inc/monorepo", | ||
"keywords": [ | ||
@@ -21,4 +23,3 @@ "nft", | ||
"scripts": { | ||
"prebuild": "rm -rf dist", | ||
"build": "yarn build:esm && yarn build:cjs", | ||
"build": "yarn codegen && yarn build:esm && yarn build:cjs", | ||
"build:esm": "tsc", | ||
@@ -30,16 +31,15 @@ "build:cjs": "tsc --module commonjs --outdir dist/cjs", | ||
}, | ||
"author": "Omar Bohsali <omar@center.app>", | ||
"devDependencies": { | ||
"form-data": "4.x", | ||
"cross-env": "^7.0.3", | ||
"openapi-typescript-codegen": "^0.20.1" | ||
}, | ||
"peerDependencies": { | ||
"@ethersproject/address": "^5.6.0", | ||
"axios": "^0.26.1" | ||
}, | ||
"dependencies": { | ||
"cross-env": "5.0.5", | ||
"url-join": "^5.0.0", | ||
"whatwg-fetch": "^3.6.2" | ||
}, | ||
"gitHead": "c04bed90852f2a69754f737d0d9a1dccc96c4f03" | ||
"@ethersproject/address": "^5.6.0", | ||
"form-data": "^4.0.0", | ||
"url-join": "^5.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# `center-inc/api-client` | ||
# `@center-inc/api-client` | ||
@@ -3,0 +3,0 @@ API client for the center.dev API. |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
99973
79
1669
5
+ Addedform-data@^4.0.0
+ Added@ethersproject/address@5.7.0(transitive)
+ Added@ethersproject/bignumber@5.7.0(transitive)
+ Added@ethersproject/bytes@5.7.0(transitive)
+ Added@ethersproject/keccak256@5.7.0(transitive)
+ Added@ethersproject/logger@5.7.0(transitive)
+ Added@ethersproject/rlp@5.7.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedbn.js@5.2.1(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedjs-sha3@0.8.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
- Removedcross-env@5.0.5
- Removedwhatwg-fetch@^3.6.2
- Removedcross-env@5.0.5(transitive)
- Removedcross-spawn@5.1.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisexe@2.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
- Removedwhich@1.3.1(transitive)
- Removedyallist@2.1.2(transitive)