web-dc-api 0.1.5 → 0.1.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.
- package/dist/cjs/index.js +1 -1
- package/dist/dc.min.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +934 -878
- package/package.json +4 -8
- package/dist/cjs/helia-core-B1Xqha7a.js +0 -1
- package/dist/cjs/helia-core-D8Uv1KjQ.js +0 -1
- package/dist/cjs/polkadot-api-7PhQf3ws.js +0 -1
- package/dist/cjs/polkadot-api-CtrJVWuZ.js +0 -1
- package/dist/esm/chunks/helia-core-BxMqyK2Y.js +0 -1
- package/dist/esm/chunks/helia-core-DMXRpcO-.js +0 -1
- package/dist/esm/chunks/polkadot-api-5Y9Bw8VT.js +0 -1
- package/dist/esm/chunks/polkadot-api-D69Ioun_.js +0 -1
- package/lib/common/blowfish/block.ts +0 -259
- package/lib/common/blowfish/cipher.ts +0 -144
- package/lib/common/blowfish/const.ts +0 -195
- package/lib/common/chain.ts +0 -469
- package/lib/common/commonclient.ts +0 -202
- package/lib/common/constants.ts +0 -55
- package/lib/common/dc-key/ed25519.ts +0 -343
- package/lib/common/dc-key/keyManager.ts +0 -424
- package/lib/common/dcapi.ts +0 -98
- package/lib/common/dcutil.ts +0 -627
- package/lib/common/define.ts +0 -70
- package/lib/common/error.ts +0 -67
- package/lib/common/grpc-dc.ts +0 -104
- package/lib/common/module-system.ts +0 -184
- package/lib/common/service-worker.ts +0 -234
- package/lib/common/types/types.ts +0 -344
- package/lib/dc.ts +0 -701
- package/lib/implements/account/client.ts +0 -185
- package/lib/implements/account/manager.ts +0 -683
- package/lib/implements/aiproxy/client.ts +0 -357
- package/lib/implements/aiproxy/manager.ts +0 -670
- package/lib/implements/cache/client.ts +0 -105
- package/lib/implements/cache/manager.ts +0 -127
- package/lib/implements/comment/client.ts +0 -982
- package/lib/implements/comment/manager.ts +0 -1151
- package/lib/implements/dc/client.ts +0 -51
- package/lib/implements/dc/manager.ts +0 -33
- package/lib/implements/file/client.ts +0 -253
- package/lib/implements/file/file-cache-manager.ts +0 -142
- package/lib/implements/file/manager.ts +0 -1240
- package/lib/implements/file/seekableFileStream.ts +0 -344
- package/lib/implements/file/streamwriter.ts +0 -322
- package/lib/implements/keyvalue/client.ts +0 -376
- package/lib/implements/keyvalue/manager.ts +0 -759
- package/lib/implements/message/client.ts +0 -250
- package/lib/implements/message/manager.ts +0 -215
- package/lib/implements/threaddb/cbor/coding.ts +0 -62
- package/lib/implements/threaddb/cbor/event.ts +0 -336
- package/lib/implements/threaddb/cbor/node.ts +0 -542
- package/lib/implements/threaddb/cbor/record.ts +0 -398
- package/lib/implements/threaddb/common/AsyncMutex.ts +0 -24
- package/lib/implements/threaddb/common/addrinfo.ts +0 -135
- package/lib/implements/threaddb/common/dispatcher.ts +0 -81
- package/lib/implements/threaddb/common/idbstore-adapter.ts +0 -260
- package/lib/implements/threaddb/common/json-patcher.ts +0 -204
- package/lib/implements/threaddb/common/key.ts +0 -290
- package/lib/implements/threaddb/common/level-adapter.ts +0 -235
- package/lib/implements/threaddb/common/lineReader.ts +0 -79
- package/lib/implements/threaddb/common/logstore.ts +0 -215
- package/lib/implements/threaddb/common/transformed-datastore.ts +0 -308
- package/lib/implements/threaddb/core/app.ts +0 -206
- package/lib/implements/threaddb/core/core.ts +0 -230
- package/lib/implements/threaddb/core/db.ts +0 -249
- package/lib/implements/threaddb/core/event.ts +0 -54
- package/lib/implements/threaddb/core/head.ts +0 -89
- package/lib/implements/threaddb/core/identity.ts +0 -171
- package/lib/implements/threaddb/core/logstore.ts +0 -137
- package/lib/implements/threaddb/core/options.ts +0 -14
- package/lib/implements/threaddb/core/record.ts +0 -54
- package/lib/implements/threaddb/db/collection.ts +0 -1910
- package/lib/implements/threaddb/db/db.ts +0 -698
- package/lib/implements/threaddb/db/json2Query.ts +0 -192
- package/lib/implements/threaddb/db/query.ts +0 -524
- package/lib/implements/threaddb/dbclient.ts +0 -543
- package/lib/implements/threaddb/dbmanager.ts +0 -1906
- package/lib/implements/threaddb/lsstoreds/addr_book.ts +0 -549
- package/lib/implements/threaddb/lsstoreds/cache.ts +0 -36
- package/lib/implements/threaddb/lsstoreds/cyclic_batch.ts +0 -87
- package/lib/implements/threaddb/lsstoreds/global.ts +0 -151
- package/lib/implements/threaddb/lsstoreds/headbook.ts +0 -373
- package/lib/implements/threaddb/lsstoreds/keybook.ts +0 -297
- package/lib/implements/threaddb/lsstoreds/logstore.ts +0 -29
- package/lib/implements/threaddb/lsstoreds/metadata.ts +0 -223
- package/lib/implements/threaddb/net/define.ts +0 -149
- package/lib/implements/threaddb/net/grpcClient.ts +0 -589
- package/lib/implements/threaddb/net/grpcserver.ts +0 -146
- package/lib/implements/threaddb/net/net.ts +0 -2047
- package/lib/implements/threaddb/pb/lstore.proto +0 -38
- package/lib/implements/threaddb/pb/lstore.ts +0 -393
- package/lib/implements/threaddb/pb/lstore_pb.d.ts +0 -433
- package/lib/implements/threaddb/pb/lstore_pb.js +0 -1085
- package/lib/implements/threaddb/pb/net.proto +0 -194
- package/lib/implements/threaddb/pb/net_pb.d.ts +0 -2349
- package/lib/implements/threaddb/pb/net_pb.js +0 -5525
- package/lib/implements/threaddb/pb/proto-custom-types.ts +0 -212
- package/lib/implements/util/client.ts +0 -72
- package/lib/implements/util/manager.ts +0 -146
- package/lib/implements/wallet/manager.ts +0 -671
- package/lib/index.ts +0 -57
- package/lib/interfaces/DCContext.ts +0 -51
- package/lib/interfaces/aiproxy-interface.ts +0 -145
- package/lib/interfaces/auth-interface.ts +0 -118
- package/lib/interfaces/cache-interface.ts +0 -22
- package/lib/interfaces/client-interface.ts +0 -11
- package/lib/interfaces/comment-interface.ts +0 -167
- package/lib/interfaces/components/news-component.ts +0 -0
- package/lib/interfaces/database-interface.ts +0 -169
- package/lib/interfaces/file-interface.ts +0 -120
- package/lib/interfaces/index.ts +0 -10
- package/lib/interfaces/keyvalue-interface.ts +0 -156
- package/lib/interfaces/message-interface.ts +0 -22
- package/lib/interfaces/util-interface.ts +0 -31
- package/lib/modules/aiproxy-module.ts +0 -246
- package/lib/modules/auth-module.ts +0 -753
- package/lib/modules/cache-module.ts +0 -99
- package/lib/modules/client-module.ts +0 -71
- package/lib/modules/comment-module.ts +0 -429
- package/lib/modules/components/news-components.ts +0 -390
- package/lib/modules/database-module.ts +0 -598
- package/lib/modules/file-module.ts +0 -291
- package/lib/modules/index.ts +0 -13
- package/lib/modules/keyvalue-module.ts +0 -379
- package/lib/modules/message-module.ts +0 -107
- package/lib/modules/util-module.ts +0 -148
- package/lib/polyfills/process-env-browser.ts +0 -1
- package/lib/proto/datasource.ts +0 -93
- package/lib/proto/dcnet.proto +0 -1601
- package/lib/proto/dcnet_proto.d.ts +0 -22857
- package/lib/proto/dcnet_proto.js +0 -55204
- package/lib/proto/dcnet_proto_sparse.js +0 -55166
- package/lib/proto/oidfetch.proto +0 -25
- package/lib/proto/oidfetch_proto.d.ts +0 -585
- package/lib/proto/oidfetch_proto.js +0 -1247
- package/lib/serverless/babel-browser.ts +0 -39
- package/lib/serverless/base_entity.ts +0 -78
- package/lib/serverless/base_repository.ts +0 -414
- package/lib/serverless/browser_schema_extractor.ts +0 -283
- package/lib/serverless/decorator_factory.ts +0 -322
- package/lib/util/BrowserLineReader.ts +0 -73
- package/lib/util/base64.ts +0 -105
- package/lib/util/bcrypt.ts +0 -206
- package/lib/util/curve25519Encryption.ts +0 -418
- package/lib/util/dccrypt.ts +0 -73
- package/lib/util/logger.ts +0 -104
- package/lib/util/utils.ts +0 -289
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
package net.pb;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Log represents a thread log.
|
|
8
|
-
message Log {
|
|
9
|
-
// ID of the log.
|
|
10
|
-
bytes ID = 1; // TS类型: ProtoPeerID
|
|
11
|
-
// pubKey of the log.
|
|
12
|
-
bytes pubKey = 2; // TS类型: ProtoPubKey
|
|
13
|
-
// addrs of the log.
|
|
14
|
-
repeated bytes addrs = 3; // TS类型: ProtoAddr
|
|
15
|
-
// head of the log.
|
|
16
|
-
bytes head = 4 ; // TS类型: ProtoCid
|
|
17
|
-
// position of the log
|
|
18
|
-
int64 counter = 5; // TS类型: BigInt
|
|
19
|
-
|
|
20
|
-
// Record is a thread record containing link data.
|
|
21
|
-
message Record {
|
|
22
|
-
// recordNode is the top-level node's raw data.
|
|
23
|
-
bytes recordNode = 1;
|
|
24
|
-
// eventNode is the event node's raw data.
|
|
25
|
-
bytes eventNode = 2;
|
|
26
|
-
// headerNode is the header node's raw data.
|
|
27
|
-
bytes headerNode = 3;
|
|
28
|
-
// bodyNode is the body node's raw data.
|
|
29
|
-
bytes bodyNode = 4;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// GetLogsRequest is used to request thread logs.
|
|
34
|
-
message GetLogsRequest {
|
|
35
|
-
// this was the message header.
|
|
36
|
-
reserved 1;
|
|
37
|
-
// body is the message body.
|
|
38
|
-
Body body = 2;
|
|
39
|
-
|
|
40
|
-
message Body {
|
|
41
|
-
// threadID is the target thread's ID.
|
|
42
|
-
bytes threadID = 1; // TS类型: ProtoThreadID
|
|
43
|
-
// serviceKey for the thread.
|
|
44
|
-
bytes serviceKey = 2 ;// TS类型: ProtoKey
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// GetLogsReply is the response from a GetLogsRequest.
|
|
49
|
-
message GetLogsReply {
|
|
50
|
-
// logs are the result of the request.
|
|
51
|
-
repeated Log logs = 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// PushLogRequest is used to push a thread log to a peer.
|
|
55
|
-
message PushLogRequest {
|
|
56
|
-
// this was the message header.
|
|
57
|
-
reserved 1;
|
|
58
|
-
// body is the message body.
|
|
59
|
-
Body body = 2;
|
|
60
|
-
|
|
61
|
-
message Body {
|
|
62
|
-
// threadID is the target thread's ID.
|
|
63
|
-
bytes threadID = 1; // TS类型: ProtoThreadID
|
|
64
|
-
// serviceKey for the thread.
|
|
65
|
-
bytes serviceKey = 2 ;// TS类型: ProtoKey
|
|
66
|
-
// readKey for the thread.
|
|
67
|
-
bytes readKey = 3 ;// TS类型: ProtoKey
|
|
68
|
-
// log is the actual log payload.
|
|
69
|
-
Log log = 4;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// PushLogReply is the response from a PushLogRequest.
|
|
74
|
-
message PushLogReply {}
|
|
75
|
-
|
|
76
|
-
// GetRecordsRequest is used to request records from a log address.
|
|
77
|
-
message GetRecordsRequest {
|
|
78
|
-
// this was the message header.
|
|
79
|
-
reserved 1;
|
|
80
|
-
// body is the message body.
|
|
81
|
-
Body body = 2;
|
|
82
|
-
|
|
83
|
-
message Body {
|
|
84
|
-
// threadID is the target thread's ID.
|
|
85
|
-
bytes threadID = 1 ; // TS类型: ProtoThreadID
|
|
86
|
-
// serviceKey for the thread.
|
|
87
|
-
bytes serviceKey = 2 ;// TS类型: ProtoKey
|
|
88
|
-
// List of requested logs.
|
|
89
|
-
repeated LogEntry logs = 3;
|
|
90
|
-
|
|
91
|
-
// LogEntry represents a single log.
|
|
92
|
-
message LogEntry {
|
|
93
|
-
// logID of this entry.
|
|
94
|
-
bytes logID = 1 ; // TS类型: ProtoPeerID
|
|
95
|
-
// offset tells the recipient at which point to consider records new for the reply.
|
|
96
|
-
bytes offset = 2 ; // TS类型: ProtoCid
|
|
97
|
-
// limit indicates the max number of records to return.
|
|
98
|
-
int32 limit = 3;
|
|
99
|
-
// counter indicates the position of record
|
|
100
|
-
int64 counter = 4;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// GetRecordsReply contains records requested with a GetRecordsRequest.
|
|
106
|
-
message GetRecordsReply {
|
|
107
|
-
// records are the result of the request.
|
|
108
|
-
repeated LogEntry logs = 1;
|
|
109
|
-
|
|
110
|
-
// LogEntry represents a single log.
|
|
111
|
-
message LogEntry {
|
|
112
|
-
// logID of this entry.
|
|
113
|
-
bytes logID = 1 ; // TS类型: ProtoPeerID
|
|
114
|
-
// records returned for this entry.
|
|
115
|
-
repeated Log.Record records = 2;
|
|
116
|
-
// log contains new log info that was missing from the request.
|
|
117
|
-
Log log = 3;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// PushRecordRequest is used to push a log record to a peer.
|
|
122
|
-
message PushRecordRequest {
|
|
123
|
-
// this was the message header.
|
|
124
|
-
reserved 1;
|
|
125
|
-
// body is the message body.
|
|
126
|
-
Body body = 2;
|
|
127
|
-
// position of the record
|
|
128
|
-
int64 counter = 3;
|
|
129
|
-
|
|
130
|
-
message Body {
|
|
131
|
-
// threadID is the target thread's ID.
|
|
132
|
-
bytes threadID = 1 ; // TS类型: ProtoThreadID
|
|
133
|
-
// logID is the target log's ID.
|
|
134
|
-
bytes logID = 2 ; // TS类型: ProtoPeerID
|
|
135
|
-
// record is the actual record payload.
|
|
136
|
-
Log.Record record = 3;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// PushRecordReply is the response from a PushRecordRequest.
|
|
141
|
-
message PushRecordReply {}
|
|
142
|
-
|
|
143
|
-
// ExchangeEdgesRequest is used to exchange address/heads edges with a peer.
|
|
144
|
-
message ExchangeEdgesRequest {
|
|
145
|
-
// this was the message header.
|
|
146
|
-
reserved 1;
|
|
147
|
-
// body is the message body.
|
|
148
|
-
Body body = 2;
|
|
149
|
-
|
|
150
|
-
message Body {
|
|
151
|
-
// threads is a list of requested thread IDs with its local edges.
|
|
152
|
-
repeated ThreadEntry threads = 1;
|
|
153
|
-
|
|
154
|
-
message ThreadEntry {
|
|
155
|
-
// threadID is the target thread's ID.
|
|
156
|
-
bytes threadID = 1 ; // TS类型: ProtoThreadID
|
|
157
|
-
// addressEdge is the current hash of peers addresses stored on a requester.
|
|
158
|
-
uint64 addressEdge = 2;
|
|
159
|
-
// headsEdge is the current hash of the log's heads stored on a requester.
|
|
160
|
-
uint64 headsEdge = 3;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// ExchangeEdgesReply contains edges requested with an ExchangeEdgesRequest.
|
|
166
|
-
message ExchangeEdgesReply {
|
|
167
|
-
// edges contains edge information about requested threads.
|
|
168
|
-
repeated ThreadEdges edges = 1;
|
|
169
|
-
|
|
170
|
-
message ThreadEdges {
|
|
171
|
-
// threadID is the requested thread's ID.
|
|
172
|
-
bytes threadID = 1 ; // TS类型: ProtoThreadID
|
|
173
|
-
// deprecated, use default values for addressEdge and headsEdge
|
|
174
|
-
bool exists = 2;
|
|
175
|
-
// addressEdge is the current hash of peers addresses stored on a respondent.
|
|
176
|
-
uint64 addressEdge = 3;
|
|
177
|
-
// headsEdge is the current hash of the log's heads stored on a respondent.
|
|
178
|
-
uint64 headsEdge = 4;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// Service is the peer-to-peer network API for thread orchestration.
|
|
183
|
-
service Service {
|
|
184
|
-
// GetLogs from a peer.
|
|
185
|
-
rpc GetLogs(GetLogsRequest) returns (GetLogsReply) {}
|
|
186
|
-
// PushLog to a peer.
|
|
187
|
-
rpc PushLog(PushLogRequest) returns (PushLogReply) {}
|
|
188
|
-
// GetRecords from a peer.
|
|
189
|
-
rpc GetRecords(GetRecordsRequest) returns (GetRecordsReply) {}
|
|
190
|
-
// PushRecord to a peer.
|
|
191
|
-
rpc PushRecord(PushRecordRequest) returns (PushRecordReply) {}
|
|
192
|
-
// ExchangeEdges with a peer.
|
|
193
|
-
rpc ExchangeEdges(ExchangeEdgesRequest) returns (ExchangeEdgesReply) {}
|
|
194
|
-
}
|