@ckbfs/api 1.3.0 → 1.5.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.
@@ -0,0 +1 @@
1
+ Hello CKBFS from direct content!
@@ -0,0 +1 @@
1
+ Hello CKBFS from direct content!
package/example.txt DELETED
@@ -1 +0,0 @@
1
- hello, world
@@ -1,24 +0,0 @@
1
- // Create CKBFS cell output data based on version
2
- let outputData: Uint8Array;
3
-
4
- if (version === ProtocolVersion.V1) {
5
- // V1 format: Single index field (a single number, not an array)
6
- // For V1, use the first index where content is placed
7
- outputData = CKBFSData.pack({
8
- index: contentStartIndex,
9
- checksum,
10
- contentType: textEncoder.encode(contentType),
11
- filename: textEncoder.encode(filename),
12
- backLinks: [],
13
- }, version);
14
- } else {
15
- // V2 format: Multiple indexes (array of numbers)
16
- // For V2, use all the indices where content is placed
17
- outputData = CKBFSData.pack({
18
- indexes: witnessIndices,
19
- checksum,
20
- contentType: textEncoder.encode(contentType),
21
- filename: textEncoder.encode(filename),
22
- backLinks: [],
23
- }, version);
24
- }