Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "zkt-sdk", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "zkToken | JS SDK", | ||
@@ -24,2 +24,3 @@ "main": "src/index.js", | ||
"dotenv": "^16.4.5", | ||
"ethers": "^6.12.1", | ||
"ts-node": "^10.9.2", | ||
@@ -26,0 +27,0 @@ "typescript": "^5.4.3" |
@@ -8,17 +8,17 @@ import axios from "axios"; | ||
export default class ZkEth { | ||
export default class Authentication { | ||
private SXT_SECRETS_PROXY_URL: string = ""; | ||
private SXT_BASE_URL: string = ""; | ||
constructor(walletBaseUrl: string, spBaseUrl: string) { | ||
constructor(baseUrl: string, secretsProxyUrl: string) { | ||
if ( | ||
typeof walletBaseUrl === "string" && | ||
walletBaseUrl !== "" && | ||
typeof spBaseUrl === "string" && | ||
spBaseUrl !== "" | ||
typeof baseUrl === "string" && | ||
baseUrl !== "" && | ||
typeof secretsProxyUrl === "string" && | ||
secretsProxyUrl !== "" | ||
) { | ||
this.SXT_SECRETS_PROXY_URL = spBaseUrl; | ||
this.SXT_BASE_URL = walletBaseUrl; | ||
this.SXT_SECRETS_PROXY_URL = secretsProxyUrl; | ||
this.SXT_BASE_URL = baseUrl; | ||
} else { | ||
throw new Error("Invalid baseurl input provided"); | ||
throw new Error("Invalid baseUrl or secretsProxyUrl provided"); | ||
} | ||
@@ -25,0 +25,0 @@ } |
import ZkEth from "zkt-sdk"; | ||
const zkEth = new ZkEth("<SXT_ENDPOINT>", "<SECRETS_PROXY_ENDPOINT>"); | ||
console.log(zkEth); | ||
const zkEth = new ZkEth(); | ||
const auth = zkEth.authentication("<SXT_ENDPOINT>", "<SECRETS_PROXY_ENDPOINT>"); | ||
console.log(auth); |
@@ -1,3 +0,3 @@ | ||
import ZkEth from "./authentication/auth"; | ||
import ZkEth from "./zketh/zketh"; | ||
export default ZkEth; |
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 not supported yet
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
745038
14
816
5
+ Addedethers@^6.12.1
+ Added@adraffy/ens-normalize@1.10.1(transitive)
+ Added@noble/curves@1.2.0(transitive)
+ Added@noble/hashes@1.3.2(transitive)
+ Added@types/node@22.7.5(transitive)
+ Addedaes-js@4.0.0-beta.5(transitive)
+ Addedethers@6.13.5(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedws@8.17.1(transitive)
- Removed@types/node@22.10.5(transitive)
- Removedundici-types@6.20.0(transitive)