@ckbfs/api 1.2.6 → 1.4.0

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -84,7 +84,9 @@ class CKBFS {
84
84
  : constants_1.DEFAULT_NETWORK;
85
85
  const opts = options ||
86
86
  (typeof networkOrOptions === "object" ? networkOrOptions : {});
87
- const client = new core_1.ClientPublicTestnet();
87
+ const client = network === "mainnet"
88
+ ? new core_1.ClientPublicMainnet()
89
+ : new core_1.ClientPublicTestnet();
88
90
  this.signer = new core_1.SignerCkbPrivateKey(client, privateKey);
89
91
  this.network = network;
90
92
  this.chunkSize = opts.chunkSize || 30 * 1024;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckbfs/api",
3
- "version": "1.2.6",
3
+ "version": "1.4.0",
4
4
  "description": "SDK for CKBFS protocol on CKB",
5
5
  "license": "MIT",
6
6
  "author": "Code Monad<code@lab-11.org>",