@ckbfs/api 1.2.5 → 1.2.6

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.
@@ -6,7 +6,7 @@ const privateKey = process.env.CKB_PRIVATE_KEY || 'your-private-key-here';
6
6
  // Initialize the SDK with network and version options
7
7
  const ckbfs = new CKBFS(
8
8
  privateKey,
9
- NetworkType.Testnet, // Use testnet
9
+ NetworkType.Mainnet, // Use testnet
10
10
  {
11
11
  version: ProtocolVersion.V2, // Use the latest version (V2)
12
12
  chunkSize: 30 * 1024, // 30KB chunks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckbfs/api",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "SDK for CKBFS protocol on CKB",
5
5
  "license": "MIT",
6
6
  "author": "Code Monad<code@lab-11.org>",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  Transaction,
5
5
  ClientPublicTestnet,
6
6
  SignerCkbPrivateKey,
7
+ ClientPublicMainnet,
7
8
  } from "@ckb-ccc/core";
8
9
  import {
9
10
  calculateChecksum,
@@ -156,7 +157,10 @@ export class CKBFS {
156
157
  options ||
157
158
  (typeof networkOrOptions === "object" ? networkOrOptions : {});
158
159
 
159
- const client = new ClientPublicTestnet();
160
+ const client =
161
+ network === "mainnet"
162
+ ? new ClientPublicMainnet()
163
+ : new ClientPublicTestnet();
160
164
  this.signer = new SignerCkbPrivateKey(client, privateKey);
161
165
  this.network = network;
162
166
  this.chunkSize = opts.chunkSize || 30 * 1024;