bedrock-ts-sdk 0.0.3 → 0.0.5
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.
- package/README.md +4 -4
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +144 -260
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +144 -260
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ const client = await BedrockClient.fromPrivateKey('0x...');
|
|
|
34
34
|
// Upload a file
|
|
35
35
|
const files = await client.files.uploadFiles([{
|
|
36
36
|
name: 'hello.txt',
|
|
37
|
-
path: 'documents/hello.txt',
|
|
37
|
+
path: '/documents/hello.txt',
|
|
38
38
|
content: Buffer.from('Hello, Bedrock!'),
|
|
39
39
|
}]);
|
|
40
40
|
|
|
@@ -74,7 +74,7 @@ const buffer = Buffer.from(await file.arrayBuffer());
|
|
|
74
74
|
|
|
75
75
|
await client.files.uploadFiles([{
|
|
76
76
|
name: file.name,
|
|
77
|
-
path:
|
|
77
|
+
path: `/uploads/${file.name}`,
|
|
78
78
|
content: buffer,
|
|
79
79
|
}]);
|
|
80
80
|
```
|
|
@@ -121,12 +121,12 @@ const client = await BedrockClient.fromSignature(
|
|
|
121
121
|
const files = await client.files.uploadFiles([
|
|
122
122
|
{
|
|
123
123
|
name: 'document.pdf',
|
|
124
|
-
path: 'documents/document.pdf',
|
|
124
|
+
path: '/documents/document.pdf',
|
|
125
125
|
content: fileBuffer, // Buffer or File
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
name: 'image.jpg',
|
|
129
|
-
path: 'images/image.jpg',
|
|
129
|
+
path: '/images/image.jpg',
|
|
130
130
|
content: imageBuffer,
|
|
131
131
|
},
|
|
132
132
|
]);
|
package/dist/index.d.mts
CHANGED
|
@@ -11,9 +11,9 @@ export { Account } from '@aleph-sdk/account';
|
|
|
11
11
|
* Low-level Aleph SDK wrapper (matches Bedrock implementation)
|
|
12
12
|
*/
|
|
13
13
|
declare class AlephService {
|
|
14
|
-
private subAccountClient;
|
|
15
|
-
private account;
|
|
16
|
-
private channel;
|
|
14
|
+
private readonly subAccountClient;
|
|
15
|
+
private readonly account;
|
|
16
|
+
private readonly channel;
|
|
17
17
|
constructor(account: ETHAccount, channel?: string, apiServer?: string);
|
|
18
18
|
/**
|
|
19
19
|
* Get the account address
|
|
@@ -69,10 +69,10 @@ interface BedrockCoreConfig {
|
|
|
69
69
|
* Core Bedrock functionality: authentication, sub-accounts, encryption key derivation
|
|
70
70
|
*/
|
|
71
71
|
declare class BedrockCore {
|
|
72
|
-
private mainAccount;
|
|
73
|
-
private subAccount;
|
|
74
|
-
private alephService;
|
|
75
|
-
private encryptionPrivateKey;
|
|
72
|
+
private readonly mainAccount;
|
|
73
|
+
private readonly subAccount;
|
|
74
|
+
private readonly alephService;
|
|
75
|
+
private readonly encryptionPrivateKey;
|
|
76
76
|
private constructor();
|
|
77
77
|
/**
|
|
78
78
|
* Initialize from signature hash (matches Bedrock app pattern)
|
|
@@ -661,7 +661,7 @@ interface FileInput {
|
|
|
661
661
|
* File service for managing encrypted files
|
|
662
662
|
*/
|
|
663
663
|
declare class FileService {
|
|
664
|
-
private core;
|
|
664
|
+
private readonly core;
|
|
665
665
|
constructor(core: BedrockCore);
|
|
666
666
|
/**
|
|
667
667
|
* Initialize file entries aggregate if it doesn't exist
|
|
@@ -771,8 +771,8 @@ declare class FileService {
|
|
|
771
771
|
* Contact service for managing contacts and shared files
|
|
772
772
|
*/
|
|
773
773
|
declare class ContactService {
|
|
774
|
-
private core;
|
|
775
|
-
private fileService;
|
|
774
|
+
private readonly core;
|
|
775
|
+
private readonly fileService;
|
|
776
776
|
constructor(core: BedrockCore, fileService: FileService);
|
|
777
777
|
/**
|
|
778
778
|
* Initialize contacts aggregate if it doesn't exist
|
|
@@ -839,7 +839,7 @@ declare class ContactService {
|
|
|
839
839
|
* Knowledge base service for organizing files into collections
|
|
840
840
|
*/
|
|
841
841
|
declare class KnowledgeBaseService {
|
|
842
|
-
private core;
|
|
842
|
+
private readonly core;
|
|
843
843
|
constructor(core: BedrockCore);
|
|
844
844
|
/**
|
|
845
845
|
* Initialize knowledge bases aggregate if it doesn't exist
|
package/dist/index.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ export { Account } from '@aleph-sdk/account';
|
|
|
11
11
|
* Low-level Aleph SDK wrapper (matches Bedrock implementation)
|
|
12
12
|
*/
|
|
13
13
|
declare class AlephService {
|
|
14
|
-
private subAccountClient;
|
|
15
|
-
private account;
|
|
16
|
-
private channel;
|
|
14
|
+
private readonly subAccountClient;
|
|
15
|
+
private readonly account;
|
|
16
|
+
private readonly channel;
|
|
17
17
|
constructor(account: ETHAccount, channel?: string, apiServer?: string);
|
|
18
18
|
/**
|
|
19
19
|
* Get the account address
|
|
@@ -69,10 +69,10 @@ interface BedrockCoreConfig {
|
|
|
69
69
|
* Core Bedrock functionality: authentication, sub-accounts, encryption key derivation
|
|
70
70
|
*/
|
|
71
71
|
declare class BedrockCore {
|
|
72
|
-
private mainAccount;
|
|
73
|
-
private subAccount;
|
|
74
|
-
private alephService;
|
|
75
|
-
private encryptionPrivateKey;
|
|
72
|
+
private readonly mainAccount;
|
|
73
|
+
private readonly subAccount;
|
|
74
|
+
private readonly alephService;
|
|
75
|
+
private readonly encryptionPrivateKey;
|
|
76
76
|
private constructor();
|
|
77
77
|
/**
|
|
78
78
|
* Initialize from signature hash (matches Bedrock app pattern)
|
|
@@ -661,7 +661,7 @@ interface FileInput {
|
|
|
661
661
|
* File service for managing encrypted files
|
|
662
662
|
*/
|
|
663
663
|
declare class FileService {
|
|
664
|
-
private core;
|
|
664
|
+
private readonly core;
|
|
665
665
|
constructor(core: BedrockCore);
|
|
666
666
|
/**
|
|
667
667
|
* Initialize file entries aggregate if it doesn't exist
|
|
@@ -771,8 +771,8 @@ declare class FileService {
|
|
|
771
771
|
* Contact service for managing contacts and shared files
|
|
772
772
|
*/
|
|
773
773
|
declare class ContactService {
|
|
774
|
-
private core;
|
|
775
|
-
private fileService;
|
|
774
|
+
private readonly core;
|
|
775
|
+
private readonly fileService;
|
|
776
776
|
constructor(core: BedrockCore, fileService: FileService);
|
|
777
777
|
/**
|
|
778
778
|
* Initialize contacts aggregate if it doesn't exist
|
|
@@ -839,7 +839,7 @@ declare class ContactService {
|
|
|
839
839
|
* Knowledge base service for organizing files into collections
|
|
840
840
|
*/
|
|
841
841
|
declare class KnowledgeBaseService {
|
|
842
|
-
private core;
|
|
842
|
+
private readonly core;
|
|
843
843
|
constructor(core: BedrockCore);
|
|
844
844
|
/**
|
|
845
845
|
* Initialize knowledge bases aggregate if it doesn't exist
|