@ceramicnetwork/streamid 2.14.0 → 2.15.0-rc.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.
- package/lib/event-id.d.ts +27 -0
- package/lib/event-id.d.ts.map +1 -0
- package/lib/event-id.js +159 -0
- package/lib/event-id.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CID } from 'multiformats/cid';
|
|
2
|
+
export declare class EventID {
|
|
3
|
+
protected readonly _tag: symbol;
|
|
4
|
+
private readonly _networkID;
|
|
5
|
+
private readonly _separator;
|
|
6
|
+
private readonly _controller;
|
|
7
|
+
private readonly _init;
|
|
8
|
+
private readonly _eventHeight;
|
|
9
|
+
private readonly _event;
|
|
10
|
+
static isInstance(instance: any): instance is EventID;
|
|
11
|
+
constructor(networkID: number, separator: Uint8Array, controller: Uint8Array, init: Uint8Array, eventHeight: number, event: CID);
|
|
12
|
+
static create(networkID: number | string, separator: string | Uint8Array, controller: string, init: CID | string, eventHeight: number, event: CID | string): EventID;
|
|
13
|
+
get bytes(): Uint8Array;
|
|
14
|
+
static fromBytes(bytes: Uint8Array): EventID;
|
|
15
|
+
static fromString(str: string): EventID;
|
|
16
|
+
toString(): string;
|
|
17
|
+
equals(other: EventID): boolean;
|
|
18
|
+
toUrl(): string;
|
|
19
|
+
get networkID(): number;
|
|
20
|
+
get separator(): Uint8Array;
|
|
21
|
+
get controller(): Uint8Array;
|
|
22
|
+
get init(): Uint8Array;
|
|
23
|
+
get eventHeight(): number;
|
|
24
|
+
get event(): CID;
|
|
25
|
+
[Symbol.toPrimitive](): string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=event-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-id.d.ts","sourceRoot":"","sources":["../src/event-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AA8Bt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I,KAAK,IAAI,GAAG,CAEf;IAYD,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM;CAG/B"}
|
package/lib/event-id.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { CID } from 'multiformats/cid';
|
|
11
|
+
import { base36 } from 'multiformats/bases/base36';
|
|
12
|
+
import { hash as sha256 } from '@stablelib/sha256';
|
|
13
|
+
import varint from 'varint';
|
|
14
|
+
import * as cbor from 'cborg';
|
|
15
|
+
import * as u8a from 'uint8arrays';
|
|
16
|
+
import { STREAMID_CODEC } from './constants.js';
|
|
17
|
+
import { Memoize } from 'mapmoize';
|
|
18
|
+
const TAG = Symbol.for('@ceramicnetwork/streamid/EventID');
|
|
19
|
+
const EVENT_ID_CODEC = 0x05;
|
|
20
|
+
const STREAMID_CODEC_LEN = 2;
|
|
21
|
+
const EVENT_ID_CODEC_LEN = 1;
|
|
22
|
+
const NETWORK = {
|
|
23
|
+
mainnet: 0x00,
|
|
24
|
+
'testnet-clay': 0x01,
|
|
25
|
+
'dev-unstable': 0x02,
|
|
26
|
+
inmemory: 0xff,
|
|
27
|
+
};
|
|
28
|
+
function networkByName(net) {
|
|
29
|
+
const netId = NETWORK[net];
|
|
30
|
+
if (!netId && netId !== 0)
|
|
31
|
+
throw new Error('Not a valid network name');
|
|
32
|
+
return netId;
|
|
33
|
+
}
|
|
34
|
+
export class EventID {
|
|
35
|
+
constructor(networkID, separator, controller, init, eventHeight, event) {
|
|
36
|
+
this._tag = TAG;
|
|
37
|
+
this._networkID = networkID;
|
|
38
|
+
this._separator = separator;
|
|
39
|
+
this._controller = controller;
|
|
40
|
+
this._init = init;
|
|
41
|
+
this._eventHeight = eventHeight;
|
|
42
|
+
this._event = event;
|
|
43
|
+
}
|
|
44
|
+
static isInstance(instance) {
|
|
45
|
+
return typeof instance === 'object' && '_tag' in instance && instance._tag === TAG;
|
|
46
|
+
}
|
|
47
|
+
static create(networkID, separator, controller, init, eventHeight, event) {
|
|
48
|
+
const networkIDInt = typeof networkID === 'string' ? networkByName(networkID) : networkID;
|
|
49
|
+
const separatorAllBytes = typeof separator === 'string' ? u8a.fromString(separator) : separator;
|
|
50
|
+
const separatorBytes = sha256(separatorAllBytes).slice(-8);
|
|
51
|
+
const controllerBytes = sha256(u8a.fromString(controller)).slice(-8);
|
|
52
|
+
const initCid = typeof init === 'string' ? CID.parse(init) : init;
|
|
53
|
+
const initBytes = initCid.bytes.slice(-4);
|
|
54
|
+
const eventCid = typeof event === 'string' ? CID.parse(event) : event;
|
|
55
|
+
return new EventID(networkIDInt, separatorBytes, controllerBytes, initBytes, eventHeight, eventCid);
|
|
56
|
+
}
|
|
57
|
+
get bytes() {
|
|
58
|
+
const streamCodec = varint.encode(STREAMID_CODEC);
|
|
59
|
+
const eventIDCodec = varint.encode(EVENT_ID_CODEC);
|
|
60
|
+
const networkID = varint.encode(this._networkID);
|
|
61
|
+
const eventHeight = cbor.encode(this._eventHeight);
|
|
62
|
+
const event = this._event.bytes;
|
|
63
|
+
return u8a.concat([
|
|
64
|
+
streamCodec,
|
|
65
|
+
eventIDCodec,
|
|
66
|
+
networkID,
|
|
67
|
+
this._separator,
|
|
68
|
+
this._controller,
|
|
69
|
+
this._init,
|
|
70
|
+
eventHeight,
|
|
71
|
+
event,
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
static fromBytes(bytes) {
|
|
75
|
+
try {
|
|
76
|
+
const netOffset = STREAMID_CODEC_LEN + EVENT_ID_CODEC_LEN;
|
|
77
|
+
const networkID = varint.decode(bytes, netOffset);
|
|
78
|
+
const sepOffset = varint.decode.bytes + netOffset;
|
|
79
|
+
const conOffset = sepOffset + 8;
|
|
80
|
+
const seperator = bytes.slice(sepOffset, conOffset);
|
|
81
|
+
const initOffest = conOffset + 8;
|
|
82
|
+
const controller = bytes.slice(conOffset, initOffest);
|
|
83
|
+
const ehOffset = initOffest + 4;
|
|
84
|
+
const init = bytes.slice(initOffest, ehOffset);
|
|
85
|
+
const remaining = bytes.slice(ehOffset);
|
|
86
|
+
const eventHeight = cbor.decode(bytes.slice(ehOffset, ehOffset + remaining.length - 36));
|
|
87
|
+
const event = CID.decode(remaining.slice(remaining.length - 36));
|
|
88
|
+
return new EventID(networkID, seperator, controller, init, eventHeight, event);
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
throw new Error(`Invalid EventID: ${e.message}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
static fromString(str) {
|
|
95
|
+
const bytes = base36.decode(str);
|
|
96
|
+
return this.fromBytes(bytes);
|
|
97
|
+
}
|
|
98
|
+
toString() {
|
|
99
|
+
return base36.encode(this.bytes);
|
|
100
|
+
}
|
|
101
|
+
equals(other) {
|
|
102
|
+
if (EventID.isInstance(other)) {
|
|
103
|
+
return (this._networkID === other._networkID &&
|
|
104
|
+
u8a.equals(this._separator, other._separator) &&
|
|
105
|
+
u8a.equals(this._controller, other._controller) &&
|
|
106
|
+
u8a.equals(this._init, other._init) &&
|
|
107
|
+
this._eventHeight === other._eventHeight &&
|
|
108
|
+
this._event.equals(other._event));
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
toUrl() {
|
|
115
|
+
return `ceramic://${this.toString()}`;
|
|
116
|
+
}
|
|
117
|
+
get networkID() {
|
|
118
|
+
return this._networkID;
|
|
119
|
+
}
|
|
120
|
+
get separator() {
|
|
121
|
+
return this._separator;
|
|
122
|
+
}
|
|
123
|
+
get controller() {
|
|
124
|
+
return this._controller;
|
|
125
|
+
}
|
|
126
|
+
get init() {
|
|
127
|
+
return this._controller;
|
|
128
|
+
}
|
|
129
|
+
get eventHeight() {
|
|
130
|
+
return this._eventHeight;
|
|
131
|
+
}
|
|
132
|
+
get event() {
|
|
133
|
+
return this._event;
|
|
134
|
+
}
|
|
135
|
+
[Symbol.for('nodejs.util.inspect.custom')]() {
|
|
136
|
+
return `EventID(${this.toString()})`;
|
|
137
|
+
}
|
|
138
|
+
[Symbol.toPrimitive]() {
|
|
139
|
+
return this.toString();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
__decorate([
|
|
143
|
+
Memoize(),
|
|
144
|
+
__metadata("design:type", Uint8Array),
|
|
145
|
+
__metadata("design:paramtypes", [])
|
|
146
|
+
], EventID.prototype, "bytes", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
Memoize(),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", []),
|
|
151
|
+
__metadata("design:returntype", String)
|
|
152
|
+
], EventID.prototype, "toString", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
Memoize(),
|
|
155
|
+
__metadata("design:type", Function),
|
|
156
|
+
__metadata("design:paramtypes", []),
|
|
157
|
+
__metadata("design:returntype", String)
|
|
158
|
+
], EventID.prototype, "toUrl", null);
|
|
159
|
+
//# sourceMappingURL=event-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-id.js","sourceRoot":"","sources":["../src/event-id.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACt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YAAY;gBACxC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CACjC,CAAA;SACF;aAAM;YACL,OAAO,KAAK,CAAA;SACb;IACH,CAAC;IAMD,KAAK;QACH,OAAO,aAAa,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAA;IACvC,CAAC;IAKD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAKD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAKD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IAKD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IAKD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAKD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAKD,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACxC,OAAO,WAAW,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAA;IACtC,CAAC;IAKD,CAAC,MAAM,CAAC,WAAW,CAAC;QAClB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAA;IACxB,CAAC;CACF;AA1IC;IADC,OAAO,EAAE;8BACG,UAAU;;oCAgBtB;AAqCD;IADC,OAAO,EAAE;;;;uCAGT;AAwBD;IADC,OAAO,EAAE;;;;oCAGT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceramicnetwork/streamid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0-rc.0",
|
|
4
4
|
"description": "Ceramic Stream Ids",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ceramic",
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"license": "(Apache-2.0 OR MIT)",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ipld/dag-cbor": "^7.0.0",
|
|
34
|
+
"@stablelib/sha256": "^1.0.1",
|
|
35
|
+
"cborg": "^1.10.2",
|
|
34
36
|
"mapmoize": "^1.2.1",
|
|
35
37
|
"multiformats": "^11.0.1",
|
|
36
38
|
"uint8arrays": "^4.0.3",
|
|
@@ -39,5 +41,5 @@
|
|
|
39
41
|
"publishConfig": {
|
|
40
42
|
"access": "public"
|
|
41
43
|
},
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "78402c958d33194d3ce392ea7c6987b961d82eff"
|
|
43
45
|
}
|