@helia/ipns 9.2.1-35b081c7 → 9.2.1-73a28eda
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 +12 -49
- package/dist/index.min.js +5 -16
- package/dist/index.min.js.map +4 -4
- package/dist/src/errors.d.ts +33 -5
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +33 -20
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +53 -91
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -52
- package/dist/src/index.js.map +1 -1
- package/dist/src/ipns/publisher.d.ts +5 -9
- package/dist/src/ipns/publisher.d.ts.map +1 -1
- package/dist/src/ipns/publisher.js +30 -22
- package/dist/src/ipns/publisher.js.map +1 -1
- package/dist/src/ipns/republisher.d.ts +3 -5
- package/dist/src/ipns/republisher.d.ts.map +1 -1
- package/dist/src/ipns/republisher.js +18 -9
- package/dist/src/ipns/republisher.js.map +1 -1
- package/dist/src/ipns/resolver.d.ts +6 -5
- package/dist/src/ipns/resolver.d.ts.map +1 -1
- package/dist/src/ipns/resolver.js +32 -78
- package/dist/src/ipns/resolver.js.map +1 -1
- package/dist/src/ipns.d.ts +6 -4
- package/dist/src/ipns.d.ts.map +1 -1
- package/dist/src/ipns.js +33 -4
- package/dist/src/ipns.js.map +1 -1
- package/dist/src/pb/ipns.d.ts +62 -0
- package/dist/src/pb/ipns.d.ts.map +1 -0
- package/dist/src/pb/ipns.js +203 -0
- package/dist/src/pb/ipns.js.map +1 -0
- package/dist/src/pb/metadata.d.ts +1 -1
- package/dist/src/pb/metadata.d.ts.map +1 -1
- package/dist/src/records.d.ts +155 -0
- package/dist/src/records.d.ts.map +1 -0
- package/dist/src/records.js +88 -0
- package/dist/src/records.js.map +1 -0
- package/dist/src/routing/pubsub.d.ts +3 -0
- package/dist/src/routing/pubsub.d.ts.map +1 -1
- package/dist/src/routing/pubsub.js +15 -10
- package/dist/src/routing/pubsub.js.map +1 -1
- package/dist/src/selector.d.ts +14 -0
- package/dist/src/selector.d.ts.map +1 -0
- package/dist/src/selector.js +47 -0
- package/dist/src/selector.js.map +1 -0
- package/dist/src/utils.d.ts +29 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +308 -0
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validator.d.ts +18 -0
- package/dist/src/validator.d.ts.map +1 -0
- package/dist/src/validator.js +58 -0
- package/dist/src/validator.js.map +1 -0
- package/package.json +18 -17
- package/src/errors.ts +40 -25
- package/src/index.ts +54 -92
- package/src/ipns/publisher.ts +34 -29
- package/src/ipns/republisher.ts +24 -13
- package/src/ipns/resolver.ts +40 -88
- package/src/ipns.ts +44 -7
- package/src/pb/ipns.proto +39 -0
- package/src/pb/ipns.ts +280 -0
- package/src/pb/metadata.ts +1 -1
- package/src/records.ts +273 -0
- package/src/routing/pubsub.ts +17 -10
- package/src/selector.ts +55 -0
- package/src/utils.ts +371 -2
- package/src/validator.ts +67 -0
package/dist/src/errors.d.ts
CHANGED
|
@@ -1,25 +1,53 @@
|
|
|
1
1
|
export declare class RecordsFailedValidationError extends Error {
|
|
2
2
|
static name: string;
|
|
3
|
-
|
|
3
|
+
name: string;
|
|
4
4
|
}
|
|
5
5
|
export declare class UnsupportedMultibasePrefixError extends Error {
|
|
6
6
|
static name: string;
|
|
7
|
-
|
|
7
|
+
name: string;
|
|
8
8
|
}
|
|
9
9
|
export declare class UnsupportedMultihashCodecError extends Error {
|
|
10
10
|
static name: string;
|
|
11
|
-
|
|
11
|
+
name: string;
|
|
12
12
|
}
|
|
13
13
|
export declare class InvalidValueError extends Error {
|
|
14
14
|
static name: string;
|
|
15
|
-
|
|
15
|
+
name: string;
|
|
16
16
|
}
|
|
17
17
|
export declare class InvalidTopicError extends Error {
|
|
18
18
|
static name: string;
|
|
19
|
-
|
|
19
|
+
name: string;
|
|
20
20
|
}
|
|
21
21
|
export declare class RecordNotFoundError extends Error {
|
|
22
22
|
static name: string;
|
|
23
23
|
name: string;
|
|
24
24
|
}
|
|
25
|
+
export declare class SignatureCreationError extends Error {
|
|
26
|
+
static name: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class SignatureVerificationError extends Error {
|
|
30
|
+
static name: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class RecordExpiredError extends Error {
|
|
34
|
+
static name: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class UnsupportedValidityError extends Error {
|
|
38
|
+
static name: string;
|
|
39
|
+
name: string;
|
|
40
|
+
}
|
|
41
|
+
export declare class RecordTooLargeError extends Error {
|
|
42
|
+
static name: string;
|
|
43
|
+
name: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class InvalidRecordDataError extends Error {
|
|
46
|
+
static name: string;
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
export declare class InvalidEmbeddedPublicKeyError extends Error {
|
|
50
|
+
static name: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}
|
|
25
53
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/src/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,MAAM,CAAC,IAAI,SAAiC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,MAAM,CAAC,IAAI,SAAiC;IAC5C,IAAI,SAAiC;CACtC;AAED,qBAAa,+BAAgC,SAAQ,KAAK;IACxD,MAAM,CAAC,IAAI,SAAoC;IAC/C,IAAI,SAAoC;CACzC;AAED,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,MAAM,CAAC,IAAI,SAAmC;IAC9C,IAAI,SAAmC;CACxC;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,MAAM,CAAC,IAAI,SAAsB;IACjC,IAAI,SAAsB;CAC3B;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,MAAM,CAAC,IAAI,SAAsB;IACjC,IAAI,SAAsB;CAC3B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,MAAM,CAAC,IAAI,SAAwB;IACnC,IAAI,SAAwB;CAC7B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAC,IAAI,SAA2B;IACtC,IAAI,SAA2B;CAChC;AAED,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,MAAM,CAAC,IAAI,SAA+B;IAC1C,IAAI,SAA+B;CACpC;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,MAAM,CAAC,IAAI,SAAuB;IAClC,IAAI,SAAuB;CAC5B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,MAAM,CAAC,IAAI,SAA6B;IACxC,IAAI,SAA6B;CAClC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,MAAM,CAAC,IAAI,SAAwB;IACnC,IAAI,SAAwB;CAC7B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAC,IAAI,SAA2B;IACtC,IAAI,SAA2B;CAChC;AAED,qBAAa,6BAA8B,SAAQ,KAAK;IACtD,MAAM,CAAC,IAAI,SAAkC;IAC7C,IAAI,SAAkC;CACvC"}
|
package/dist/src/errors.js
CHANGED
|
@@ -1,40 +1,53 @@
|
|
|
1
1
|
export class RecordsFailedValidationError extends Error {
|
|
2
2
|
static name = 'RecordsFailedValidationError';
|
|
3
|
-
|
|
4
|
-
super(message);
|
|
5
|
-
this.name = 'RecordsFailedValidationError';
|
|
6
|
-
}
|
|
3
|
+
name = 'RecordsFailedValidationError';
|
|
7
4
|
}
|
|
8
5
|
export class UnsupportedMultibasePrefixError extends Error {
|
|
9
6
|
static name = 'UnsupportedMultibasePrefixError';
|
|
10
|
-
|
|
11
|
-
super(message);
|
|
12
|
-
this.name = 'UnsupportedMultibasePrefixError';
|
|
13
|
-
}
|
|
7
|
+
name = 'UnsupportedMultibasePrefixError';
|
|
14
8
|
}
|
|
15
9
|
export class UnsupportedMultihashCodecError extends Error {
|
|
16
10
|
static name = 'UnsupportedMultihashCodecError';
|
|
17
|
-
|
|
18
|
-
super(message);
|
|
19
|
-
this.name = 'UnsupportedMultihashCodecError';
|
|
20
|
-
}
|
|
11
|
+
name = 'UnsupportedMultihashCodecError';
|
|
21
12
|
}
|
|
22
13
|
export class InvalidValueError extends Error {
|
|
23
14
|
static name = 'InvalidValueError';
|
|
24
|
-
|
|
25
|
-
super(message);
|
|
26
|
-
this.name = 'InvalidValueError';
|
|
27
|
-
}
|
|
15
|
+
name = 'InvalidValueError';
|
|
28
16
|
}
|
|
29
17
|
export class InvalidTopicError extends Error {
|
|
30
18
|
static name = 'InvalidTopicError';
|
|
31
|
-
|
|
32
|
-
super(message);
|
|
33
|
-
this.name = 'InvalidTopicError';
|
|
34
|
-
}
|
|
19
|
+
name = 'InvalidTopicError';
|
|
35
20
|
}
|
|
36
21
|
export class RecordNotFoundError extends Error {
|
|
37
22
|
static name = 'RecordNotFoundError';
|
|
38
23
|
name = 'RecordNotFoundError';
|
|
39
24
|
}
|
|
25
|
+
export class SignatureCreationError extends Error {
|
|
26
|
+
static name = 'SignatureCreationError';
|
|
27
|
+
name = 'SignatureCreationError';
|
|
28
|
+
}
|
|
29
|
+
export class SignatureVerificationError extends Error {
|
|
30
|
+
static name = 'SignatureVerificationError';
|
|
31
|
+
name = 'SignatureVerificationError';
|
|
32
|
+
}
|
|
33
|
+
export class RecordExpiredError extends Error {
|
|
34
|
+
static name = 'RecordExpiredError';
|
|
35
|
+
name = 'RecordExpiredError';
|
|
36
|
+
}
|
|
37
|
+
export class UnsupportedValidityError extends Error {
|
|
38
|
+
static name = 'UnsupportedValidityError';
|
|
39
|
+
name = 'UnsupportedValidityError';
|
|
40
|
+
}
|
|
41
|
+
export class RecordTooLargeError extends Error {
|
|
42
|
+
static name = 'RecordTooLargeError';
|
|
43
|
+
name = 'RecordTooLargeError';
|
|
44
|
+
}
|
|
45
|
+
export class InvalidRecordDataError extends Error {
|
|
46
|
+
static name = 'InvalidRecordDataError';
|
|
47
|
+
name = 'InvalidRecordDataError';
|
|
48
|
+
}
|
|
49
|
+
export class InvalidEmbeddedPublicKeyError extends Error {
|
|
50
|
+
static name = 'InvalidEmbeddedPublicKeyError';
|
|
51
|
+
name = 'InvalidEmbeddedPublicKeyError';
|
|
52
|
+
}
|
|
40
53
|
//# sourceMappingURL=errors.js.map
|
package/dist/src/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,MAAM,CAAC,IAAI,GAAG,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,MAAM,CAAC,IAAI,GAAG,8BAA8B,CAAA;IAC5C,IAAI,GAAG,8BAA8B,CAAA;;AAGvC,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IACxD,MAAM,CAAC,IAAI,GAAG,iCAAiC,CAAA;IAC/C,IAAI,GAAG,iCAAiC,CAAA;;AAG1C,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACvD,MAAM,CAAC,IAAI,GAAG,gCAAgC,CAAA;IAC9C,IAAI,GAAG,gCAAgC,CAAA;;AAGzC,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,MAAM,CAAC,IAAI,GAAG,mBAAmB,CAAA;IACjC,IAAI,GAAG,mBAAmB,CAAA;;AAG5B,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C,MAAM,CAAC,IAAI,GAAG,mBAAmB,CAAA;IACjC,IAAI,GAAG,mBAAmB,CAAA;;AAG5B,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,MAAM,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,IAAI,GAAG,qBAAqB,CAAA;;AAG9B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,IAAI,GAAG,wBAAwB,CAAA;;AAGjC,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,MAAM,CAAC,IAAI,GAAG,4BAA4B,CAAA;IAC1C,IAAI,GAAG,4BAA4B,CAAA;;AAGrC,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,MAAM,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,IAAI,GAAG,oBAAoB,CAAA;;AAG7B,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD,MAAM,CAAC,IAAI,GAAG,0BAA0B,CAAA;IACxC,IAAI,GAAG,0BAA0B,CAAA;;AAGnC,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,MAAM,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,IAAI,GAAG,qBAAqB,CAAA;;AAG9B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,IAAI,GAAG,wBAAwB,CAAA;;AAGjC,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACtD,MAAM,CAAC,IAAI,GAAG,+BAA+B,CAAA;IAC7C,IAAI,GAAG,+BAA+B,CAAA"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
* const { publicKey } = await name.publish('key-1', cid)
|
|
24
24
|
*
|
|
25
25
|
* // resolve the name
|
|
26
|
-
* const result
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
27
|
+
* console.info(result.record.value) // /ipfs/QmFoo
|
|
28
|
+
* }
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* @example Publishing a recursive record
|
|
@@ -53,8 +53,9 @@
|
|
|
53
53
|
* const { publicKey: recursivePublicKey } = await name.publish('key-2', publicKey)
|
|
54
54
|
*
|
|
55
55
|
* // resolve the name recursively - it resolves until a CID is found
|
|
56
|
-
* const result
|
|
57
|
-
*
|
|
56
|
+
* for await (const result of name.resolve(recursivePublicKey)) {
|
|
57
|
+
* console.info(result.record.value) // /ipfs/QmFoo../foo.txt
|
|
58
|
+
* }
|
|
58
59
|
* ```
|
|
59
60
|
*
|
|
60
61
|
* @example Publishing a record with a path
|
|
@@ -82,9 +83,9 @@
|
|
|
82
83
|
* const { publicKey } = await name.publish('key-1', `/ipfs/${finalDirCid}/foo.txt`)
|
|
83
84
|
*
|
|
84
85
|
* // resolve the name
|
|
85
|
-
* const result
|
|
86
|
-
*
|
|
87
|
-
*
|
|
86
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
87
|
+
* console.info(result.record.value) // /ipfs/QmFoo../foo.txt
|
|
88
|
+
* }
|
|
88
89
|
* ```
|
|
89
90
|
*
|
|
90
91
|
* @example Using custom PubSub router
|
|
@@ -135,58 +136,19 @@
|
|
|
135
136
|
* const { publicKey } = await name.publish('key-1', cid)
|
|
136
137
|
*
|
|
137
138
|
* // resolve the name
|
|
138
|
-
* const result
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @example Republishing an existing IPNS record
|
|
142
|
-
*
|
|
143
|
-
* It is sometimes useful to be able to republish an existing IPNS record
|
|
144
|
-
* without needing the private key. This allows you to extend the availability
|
|
145
|
-
* of a record that was created elsewhere.
|
|
146
|
-
*
|
|
147
|
-
* ```TypeScript
|
|
148
|
-
* import { createHelia } from 'helia'
|
|
149
|
-
* import { ipns, ipnsValidator } from '@helia/ipns'
|
|
150
|
-
* import { delegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
|
|
151
|
-
* import { CID } from 'multiformats/cid'
|
|
152
|
-
* import { multihashToIPNSRoutingKey, marshalIPNSRecord } from 'ipns'
|
|
153
|
-
* import { defaultLogger } from '@libp2p/logger'
|
|
154
|
-
*
|
|
155
|
-
* const helia = await createHelia()
|
|
156
|
-
* const name = ipns(helia)
|
|
157
|
-
*
|
|
158
|
-
* const ipnsName = 'k51qzi5uqu5dktsyfv7xz8h631pri4ct7osmb43nibxiojpttxzoft6hdyyzg4'
|
|
159
|
-
* const parsedCid: CID<unknown, 114, 0 | 18, 1> = CID.parse(ipnsName)
|
|
160
|
-
* const delegatedClient = delegatedRoutingV1HttpApiClient({
|
|
161
|
-
* url: 'https://delegated-ipfs.dev'
|
|
162
|
-
* })({
|
|
163
|
-
* logger: defaultLogger()
|
|
164
|
-
* })
|
|
165
|
-
* const record = await delegatedClient.getIPNS(parsedCid)
|
|
166
|
-
*
|
|
167
|
-
* const routingKey = multihashToIPNSRoutingKey(parsedCid.multihash)
|
|
168
|
-
* const marshaledRecord = marshalIPNSRecord(record)
|
|
169
|
-
*
|
|
170
|
-
* // validate that they key corresponds to the record
|
|
171
|
-
* await ipnsValidator(routingKey, marshaledRecord)
|
|
172
|
-
*
|
|
173
|
-
* // publish record to routing
|
|
174
|
-
* await Promise.all(
|
|
175
|
-
* name.routers.map(async r => {
|
|
176
|
-
* await r.put(routingKey, marshaledRecord)
|
|
177
|
-
* })
|
|
178
|
-
* )
|
|
139
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
140
|
+
* console.info(result.record.value)
|
|
141
|
+
* }
|
|
179
142
|
* ```
|
|
180
143
|
*/
|
|
181
|
-
import { ipnsValidator } from 'ipns/validator';
|
|
182
144
|
import { CID } from 'multiformats/cid';
|
|
183
145
|
import type { IPNSResolverComponents } from './ipns/resolver.ts';
|
|
146
|
+
import type { IPNSRecord } from './records.ts';
|
|
184
147
|
import type { IPNSRouting, IPNSRoutingProgressEvents } from './routing/index.ts';
|
|
185
|
-
import type { Routing, HeliaEvents } from '@helia/interface';
|
|
186
|
-
import type {
|
|
187
|
-
import type {
|
|
148
|
+
import type { Routing, HeliaEvents, Keychain, PublicKey } from '@helia/interface';
|
|
149
|
+
import type { ComponentLogger, TypedEventEmitter } from '@libp2p/interface';
|
|
150
|
+
import type { AbortOptions } from 'abort-error';
|
|
188
151
|
import type { Datastore } from 'interface-datastore';
|
|
189
|
-
import type { IPNSRecord } from 'ipns';
|
|
190
152
|
import type { MultihashDigest } from 'multiformats/hashes/interface';
|
|
191
153
|
import type { ProgressEvent, ProgressOptions } from 'progress-events';
|
|
192
154
|
export type PublishProgressEvents = ProgressEvent<'ipns:publish:start'> | ProgressEvent<'ipns:publish:success', IPNSRecord> | ProgressEvent<'ipns:publish:error', Error>;
|
|
@@ -194,20 +156,28 @@ export type ResolveProgressEvents = ProgressEvent<'ipns:resolve:start', unknown>
|
|
|
194
156
|
export type DatastoreProgressEvents = ProgressEvent<'ipns:routing:datastore:put'> | ProgressEvent<'ipns:routing:datastore:get'> | ProgressEvent<'ipns:routing:datastore:list'> | ProgressEvent<'ipns:routing:datastore:error', Error>;
|
|
195
157
|
export interface PublishOptions extends AbortOptions, ProgressOptions<PublishProgressEvents | IPNSRoutingProgressEvents> {
|
|
196
158
|
/**
|
|
197
|
-
* Time duration of the signature validity in ms
|
|
159
|
+
* Time duration of the signature validity in ms
|
|
160
|
+
*
|
|
161
|
+
* @default 172_800_000
|
|
198
162
|
*/
|
|
199
163
|
lifetime?: number;
|
|
200
164
|
/**
|
|
201
|
-
* Only publish to a local datastore
|
|
165
|
+
* Only publish to a local datastore
|
|
166
|
+
*
|
|
167
|
+
* @default false
|
|
202
168
|
*/
|
|
203
169
|
offline?: boolean;
|
|
204
170
|
/**
|
|
205
171
|
* By default a IPNS V1 and a V2 signature is added to every record. Pass
|
|
206
|
-
* false here to only add a V2 signature.
|
|
172
|
+
* false here to only add a V2 signature.
|
|
173
|
+
*
|
|
174
|
+
* @default true
|
|
207
175
|
*/
|
|
208
176
|
v1Compatible?: boolean;
|
|
209
177
|
/**
|
|
210
|
-
* The TTL of the record in ms
|
|
178
|
+
* The TTL of the record in ms
|
|
179
|
+
*
|
|
180
|
+
* @default 300_000
|
|
211
181
|
*/
|
|
212
182
|
ttl?: number;
|
|
213
183
|
}
|
|
@@ -230,28 +200,22 @@ export interface ResolveOptions extends AbortOptions, ProgressOptions<ResolvePro
|
|
|
230
200
|
nocache?: boolean;
|
|
231
201
|
}
|
|
232
202
|
export interface ResolveResult {
|
|
233
|
-
/**
|
|
234
|
-
* The CID that was resolved
|
|
235
|
-
*/
|
|
236
|
-
cid: CID;
|
|
237
|
-
/**
|
|
238
|
-
* Any path component that was part of the resolved record
|
|
239
|
-
*/
|
|
240
|
-
path?: string;
|
|
241
|
-
}
|
|
242
|
-
export interface IPNSResolveResult extends ResolveResult {
|
|
243
203
|
/**
|
|
244
204
|
* The resolved record
|
|
245
205
|
*/
|
|
246
206
|
record: IPNSRecord;
|
|
247
207
|
}
|
|
248
|
-
export interface
|
|
208
|
+
export interface PublishResult {
|
|
249
209
|
/**
|
|
250
210
|
* The published record
|
|
251
211
|
*/
|
|
252
212
|
record: IPNSRecord;
|
|
253
213
|
/**
|
|
254
|
-
* The
|
|
214
|
+
* The IPNS name that can be used to resolve this record
|
|
215
|
+
*/
|
|
216
|
+
name: string;
|
|
217
|
+
/**
|
|
218
|
+
* The public key that was used to sign and publish the record
|
|
255
219
|
*/
|
|
256
220
|
publicKey: PublicKey;
|
|
257
221
|
}
|
|
@@ -263,7 +227,7 @@ export interface IPNSResolver {
|
|
|
263
227
|
* Ed25519, secp256k1 or RSA PeerId and recursively resolves the IPNS record
|
|
264
228
|
* corresponding to that key until a value is found.
|
|
265
229
|
*/
|
|
266
|
-
resolve(key: CID<unknown, 0x72
|
|
230
|
+
resolve(key: CID<unknown, 0x72> | MultihashDigest, options?: ResolveOptions): AsyncGenerator<ResolveResult>;
|
|
267
231
|
}
|
|
268
232
|
export interface IPNS {
|
|
269
233
|
/**
|
|
@@ -274,12 +238,14 @@ export interface IPNS {
|
|
|
274
238
|
* Creates and publishes an IPNS record that will resolve the passed value
|
|
275
239
|
* signed by a key stored in the libp2p keychain under the passed key name.
|
|
276
240
|
*
|
|
241
|
+
* If the key does not exist, a new Ed25519 key will be created. To use a
|
|
242
|
+
* different key types, ensure the key is created and stored in the keychain
|
|
243
|
+
* before invoking this method.
|
|
244
|
+
*
|
|
277
245
|
* It is possible to create a recursive IPNS record by passing:
|
|
278
246
|
*
|
|
279
|
-
* - A
|
|
280
|
-
* - A
|
|
281
|
-
* - A CID with the libp2p-key codec and Identity or SHA256 hash algorithms
|
|
282
|
-
* - A Multihash with the Identity or SHA256 hash algorithms
|
|
247
|
+
* - A CID with the libp2p-key codec
|
|
248
|
+
* - A Multihash
|
|
283
249
|
* - A string IPNS key (e.g. `/ipns/Qmfoo`)
|
|
284
250
|
*
|
|
285
251
|
* @example
|
|
@@ -298,35 +264,32 @@ export interface IPNS {
|
|
|
298
264
|
* console.info(result) // { answer: ... }
|
|
299
265
|
* ```
|
|
300
266
|
*/
|
|
301
|
-
publish(keyName: string, value: CID | PublicKey | MultihashDigest
|
|
267
|
+
publish(keyName: string, value: CID | PublicKey | MultihashDigest | string, options?: PublishOptions): Promise<PublishResult>;
|
|
302
268
|
/**
|
|
303
|
-
* Accepts a
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
269
|
+
* Accepts a multihash of a public key, a libp2p-key CID containing the
|
|
270
|
+
* multihash of a public key, or an IPNS name in it's string representation
|
|
271
|
+
* and recursively resolves IPNS records until a non-recursive record is found
|
|
272
|
+
* (e.g. the value can be parsed as a string that does not start with
|
|
273
|
+
* `/ipns/`).
|
|
308
274
|
*/
|
|
309
|
-
resolve(
|
|
275
|
+
resolve(name: CID<unknown, 0x72> | PublicKey | MultihashDigest | string, options?: ResolveOptions): AsyncGenerator<ResolveResult>;
|
|
310
276
|
/**
|
|
311
277
|
* Stop republishing of an IPNS record
|
|
312
278
|
*
|
|
313
|
-
* This will delete the last signed IPNS record from the datastore
|
|
314
|
-
* key will remain in the keychain.
|
|
279
|
+
* This will delete the last signed IPNS record from the datastore.
|
|
315
280
|
*
|
|
316
281
|
* Note that the record may still be resolved by other peers until it expires
|
|
317
|
-
* or is no longer valid.
|
|
282
|
+
* or is otherwise no longer valid.
|
|
318
283
|
*/
|
|
319
284
|
unpublish(keyName: string, options?: AbortOptions): Promise<void>;
|
|
320
285
|
}
|
|
321
286
|
export type { IPNSRouting } from './routing/index.ts';
|
|
322
|
-
export type { IPNSRecord } from '
|
|
287
|
+
export type { IPNSRecord } from './records.ts';
|
|
323
288
|
export interface IPNSComponents {
|
|
324
289
|
datastore: Datastore;
|
|
325
290
|
routing: Routing;
|
|
326
291
|
logger: ComponentLogger;
|
|
327
|
-
|
|
328
|
-
keychain: Keychain;
|
|
329
|
-
}>;
|
|
292
|
+
keychain: Keychain;
|
|
330
293
|
events: TypedEventEmitter<HeliaEvents>;
|
|
331
294
|
}
|
|
332
295
|
export interface IPNSOptions {
|
|
@@ -356,6 +319,5 @@ export interface IPNSResolverOptions {
|
|
|
356
319
|
}
|
|
357
320
|
export declare function ipns(components: IPNSComponents, options?: IPNSOptions): IPNS;
|
|
358
321
|
export declare function ipnsResolver(components: IPNSResolverComponents, options?: IPNSResolverOptions): IPNSResolver;
|
|
359
|
-
export {
|
|
360
|
-
export { ipnsSelector } from 'ipns/selector';
|
|
322
|
+
export type { IPNSRoutingProgressEvents };
|
|
361
323
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 -23,9 +23,9 @@
|
|
|
23
23
|
* const { publicKey } = await name.publish('key-1', cid)
|
|
24
24
|
*
|
|
25
25
|
* // resolve the name
|
|
26
|
-
* const result
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
27
|
+
* console.info(result.record.value) // /ipfs/QmFoo
|
|
28
|
+
* }
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* @example Publishing a recursive record
|
|
@@ -53,8 +53,9 @@
|
|
|
53
53
|
* const { publicKey: recursivePublicKey } = await name.publish('key-2', publicKey)
|
|
54
54
|
*
|
|
55
55
|
* // resolve the name recursively - it resolves until a CID is found
|
|
56
|
-
* const result
|
|
57
|
-
*
|
|
56
|
+
* for await (const result of name.resolve(recursivePublicKey)) {
|
|
57
|
+
* console.info(result.record.value) // /ipfs/QmFoo../foo.txt
|
|
58
|
+
* }
|
|
58
59
|
* ```
|
|
59
60
|
*
|
|
60
61
|
* @example Publishing a record with a path
|
|
@@ -82,9 +83,9 @@
|
|
|
82
83
|
* const { publicKey } = await name.publish('key-1', `/ipfs/${finalDirCid}/foo.txt`)
|
|
83
84
|
*
|
|
84
85
|
* // resolve the name
|
|
85
|
-
* const result
|
|
86
|
-
*
|
|
87
|
-
*
|
|
86
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
87
|
+
* console.info(result.record.value) // /ipfs/QmFoo../foo.txt
|
|
88
|
+
* }
|
|
88
89
|
* ```
|
|
89
90
|
*
|
|
90
91
|
* @example Using custom PubSub router
|
|
@@ -135,50 +136,11 @@
|
|
|
135
136
|
* const { publicKey } = await name.publish('key-1', cid)
|
|
136
137
|
*
|
|
137
138
|
* // resolve the name
|
|
138
|
-
* const result
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @example Republishing an existing IPNS record
|
|
142
|
-
*
|
|
143
|
-
* It is sometimes useful to be able to republish an existing IPNS record
|
|
144
|
-
* without needing the private key. This allows you to extend the availability
|
|
145
|
-
* of a record that was created elsewhere.
|
|
146
|
-
*
|
|
147
|
-
* ```TypeScript
|
|
148
|
-
* import { createHelia } from 'helia'
|
|
149
|
-
* import { ipns, ipnsValidator } from '@helia/ipns'
|
|
150
|
-
* import { delegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
|
|
151
|
-
* import { CID } from 'multiformats/cid'
|
|
152
|
-
* import { multihashToIPNSRoutingKey, marshalIPNSRecord } from 'ipns'
|
|
153
|
-
* import { defaultLogger } from '@libp2p/logger'
|
|
154
|
-
*
|
|
155
|
-
* const helia = await createHelia()
|
|
156
|
-
* const name = ipns(helia)
|
|
157
|
-
*
|
|
158
|
-
* const ipnsName = 'k51qzi5uqu5dktsyfv7xz8h631pri4ct7osmb43nibxiojpttxzoft6hdyyzg4'
|
|
159
|
-
* const parsedCid: CID<unknown, 114, 0 | 18, 1> = CID.parse(ipnsName)
|
|
160
|
-
* const delegatedClient = delegatedRoutingV1HttpApiClient({
|
|
161
|
-
* url: 'https://delegated-ipfs.dev'
|
|
162
|
-
* })({
|
|
163
|
-
* logger: defaultLogger()
|
|
164
|
-
* })
|
|
165
|
-
* const record = await delegatedClient.getIPNS(parsedCid)
|
|
166
|
-
*
|
|
167
|
-
* const routingKey = multihashToIPNSRoutingKey(parsedCid.multihash)
|
|
168
|
-
* const marshaledRecord = marshalIPNSRecord(record)
|
|
169
|
-
*
|
|
170
|
-
* // validate that they key corresponds to the record
|
|
171
|
-
* await ipnsValidator(routingKey, marshaledRecord)
|
|
172
|
-
*
|
|
173
|
-
* // publish record to routing
|
|
174
|
-
* await Promise.all(
|
|
175
|
-
* name.routers.map(async r => {
|
|
176
|
-
* await r.put(routingKey, marshaledRecord)
|
|
177
|
-
* })
|
|
178
|
-
* )
|
|
139
|
+
* for await (const result of name.resolve(publicKey)) {
|
|
140
|
+
* console.info(result.record.value)
|
|
141
|
+
* }
|
|
179
142
|
* ```
|
|
180
143
|
*/
|
|
181
|
-
import { ipnsValidator } from 'ipns/validator';
|
|
182
144
|
import { CID } from 'multiformats/cid';
|
|
183
145
|
import { IPNSResolver as IPNSResolverClass } from "./ipns/resolver.js";
|
|
184
146
|
import { IPNS as IPNSClass } from "./ipns.js";
|
|
@@ -200,6 +162,4 @@ export function ipnsResolver(components, options = {}) {
|
|
|
200
162
|
localStore: store
|
|
201
163
|
});
|
|
202
164
|
}
|
|
203
|
-
export { ipnsValidator };
|
|
204
|
-
export { ipnsSelector } from 'ipns/selector';
|
|
205
165
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8IG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAoN5D,MAAM,UAAU,IAAI,CAAE,UAA0B,EAAE,UAAuB,EAAE;IACzE,OAAO,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,YAAY,CAAE,UAAkC,EAAE,UAA+B,EAAE;IACjG,MAAM,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC,CAAA;IACxG,MAAM,OAAO,GAAG;QACd,iBAAiB,CAAC,KAAK,CAAC;QACxB,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC;QACzB,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;KAC3B,CAAA;IAED,OAAO,IAAI,iBAAiB,CAAC,UAAU,EAAE;QACvC,OAAO;QACP,UAAU,EAAE,KAAK;KAClB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { IPNSPublishResult, PublishOptions } from '../index.ts';
|
|
1
|
+
import type { PublishResult, PublishOptions } from '../index.ts';
|
|
3
2
|
import type { LocalStore } from '../local-store.ts';
|
|
4
3
|
import type { IPNSRouting } from '../routing/index.ts';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
4
|
+
import type { Keychain } from '@helia/interface';
|
|
5
|
+
import type { AbortOptions, ComponentLogger } from '@libp2p/interface';
|
|
7
6
|
import type { Datastore } from 'interface-datastore';
|
|
8
|
-
import type { MultihashDigest } from 'multiformats/hashes/interface';
|
|
9
7
|
export interface IPNSPublisherComponents {
|
|
10
8
|
datastore: Datastore;
|
|
11
9
|
logger: ComponentLogger;
|
|
12
|
-
|
|
13
|
-
keychain: Keychain;
|
|
14
|
-
}>;
|
|
10
|
+
keychain: Keychain;
|
|
15
11
|
}
|
|
16
12
|
export interface IPNSPublisherInit {
|
|
17
13
|
localStore: LocalStore;
|
|
@@ -23,7 +19,7 @@ export declare class IPNSPublisher {
|
|
|
23
19
|
private readonly localStore;
|
|
24
20
|
private readonly keychain;
|
|
25
21
|
constructor(components: IPNSPublisherComponents, init: IPNSPublisherInit);
|
|
26
|
-
publish(keyName: string, value:
|
|
22
|
+
publish(keyName: string, value: string, options?: PublishOptions): Promise<PublishResult>;
|
|
27
23
|
unpublish(keyName: string, options?: AbortOptions): Promise<void>;
|
|
28
24
|
}
|
|
29
25
|
//# sourceMappingURL=publisher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publisher.d.ts","sourceRoot":"","sources":["../../../src/ipns/publisher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publisher.d.ts","sourceRoot":"","sources":["../../../src/ipns/publisher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,eAAe,CAAA;IACvB,QAAQ,EAAE,QAAQ,CAAA;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,WAAW,EAAE,CAAA;CACvB;AAED,qBAAa,aAAa;;IACxB,SAAgB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEtB,UAAU,EAAE,uBAAuB,EAAE,IAAI,EAAE,iBAAiB;IAMnE,OAAO,CAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IA6D9F,SAAS,CAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAMzE"}
|