@helia/ipns 10.2.0 → 10.2.1-bdbda7ae
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 +8 -8
- package/dist/index.min.js +9 -9
- package/dist/index.min.js.map +4 -4
- package/dist/src/pb/ipns.d.ts +14 -3
- package/dist/src/pb/ipns.d.ts.map +1 -1
- package/dist/src/pb/ipns.js +28 -28
- package/dist/src/pb/ipns.js.map +1 -1
- package/dist/src/pb/metadata.d.ts +8 -3
- package/dist/src/pb/metadata.d.ts.map +1 -1
- package/dist/src/pb/metadata.js +16 -16
- package/dist/src/pb/metadata.js.map +1 -1
- package/package.json +4 -4
- package/src/pb/ipns.ts +45 -33
- package/src/pb/metadata.ts +27 -21
- package/dist/typedoc-urls.json +0 -90
package/src/pb/metadata.ts
CHANGED
|
@@ -15,7 +15,7 @@ enum __UpkeepValues {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export namespace Upkeep {
|
|
18
|
-
export const codec = (): Codec<Upkeep> => {
|
|
18
|
+
export const codec = (): Codec<Upkeep, Upkeep> => {
|
|
19
19
|
return enumeration<Upkeep>(__UpkeepValues)
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -26,12 +26,18 @@ export interface IPNSPublishMetadata {
|
|
|
26
26
|
upkeep: Upkeep
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export interface IPNSPublishMetadataInput {
|
|
30
|
+
keyName?: string
|
|
31
|
+
lifetime?: number
|
|
32
|
+
upkeep?: Upkeep
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
export namespace IPNSPublishMetadata {
|
|
30
|
-
let _codec: Codec<IPNSPublishMetadata>
|
|
36
|
+
let _codec: Codec<IPNSPublishMetadata, IPNSPublishMetadataInput>
|
|
31
37
|
|
|
32
|
-
export const codec = (): Codec<IPNSPublishMetadata> => {
|
|
38
|
+
export const codec = (): Codec<IPNSPublishMetadata, IPNSPublishMetadataInput> => {
|
|
33
39
|
if (_codec == null) {
|
|
34
|
-
_codec = message<IPNSPublishMetadata>((obj, w, opts = {}) => {
|
|
40
|
+
_codec = message<IPNSPublishMetadata, IPNSPublishMetadataInput>((obj, w, opts = {}) => {
|
|
35
41
|
if (opts.lengthDelimited !== false) {
|
|
36
42
|
w.fork()
|
|
37
43
|
}
|
|
@@ -54,41 +60,41 @@ export namespace IPNSPublishMetadata {
|
|
|
54
60
|
if (opts.lengthDelimited !== false) {
|
|
55
61
|
w.ldelim()
|
|
56
62
|
}
|
|
57
|
-
}, (
|
|
63
|
+
}, (r, length) => {
|
|
58
64
|
const obj: any = {
|
|
59
65
|
keyName: '',
|
|
60
66
|
lifetime: 0,
|
|
61
67
|
upkeep: Upkeep.reissue
|
|
62
68
|
}
|
|
63
69
|
|
|
64
|
-
const end = length == null ?
|
|
70
|
+
const end = length == null ? r.len : r.pos + length
|
|
65
71
|
|
|
66
|
-
while (
|
|
67
|
-
const tag =
|
|
72
|
+
while (r.pos < end) {
|
|
73
|
+
const tag = r.uint32()
|
|
68
74
|
|
|
69
75
|
switch (tag >>> 3) {
|
|
70
76
|
case 1: {
|
|
71
|
-
obj.keyName =
|
|
77
|
+
obj.keyName = r.string()
|
|
72
78
|
break
|
|
73
79
|
}
|
|
74
80
|
case 2: {
|
|
75
|
-
obj.lifetime =
|
|
81
|
+
obj.lifetime = r.uint32()
|
|
76
82
|
break
|
|
77
83
|
}
|
|
78
84
|
case 3: {
|
|
79
|
-
obj.upkeep = Upkeep.codec().decode(
|
|
85
|
+
obj.upkeep = Upkeep.codec().decode(r)
|
|
80
86
|
break
|
|
81
87
|
}
|
|
82
88
|
default: {
|
|
83
|
-
|
|
89
|
+
r.skipType(tag & 7)
|
|
84
90
|
break
|
|
85
91
|
}
|
|
86
92
|
}
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
return obj
|
|
90
|
-
}, function * (
|
|
91
|
-
const end = length == null ?
|
|
96
|
+
}, function * (r, length, prefix) {
|
|
97
|
+
const end = length == null ? r.len : r.pos + length
|
|
92
98
|
|
|
93
99
|
if (prefix !== '.') {
|
|
94
100
|
yield {
|
|
@@ -98,33 +104,33 @@ export namespace IPNSPublishMetadata {
|
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
106
|
|
|
101
|
-
while (
|
|
102
|
-
const tag =
|
|
107
|
+
while (r.pos < end) {
|
|
108
|
+
const tag = r.uint32()
|
|
103
109
|
|
|
104
110
|
switch (tag >>> 3) {
|
|
105
111
|
case 1: {
|
|
106
112
|
yield {
|
|
107
113
|
field: `${prefix}keyName`,
|
|
108
|
-
value:
|
|
114
|
+
value: r.string()
|
|
109
115
|
}
|
|
110
116
|
break
|
|
111
117
|
}
|
|
112
118
|
case 2: {
|
|
113
119
|
yield {
|
|
114
120
|
field: `${prefix}lifetime`,
|
|
115
|
-
value:
|
|
121
|
+
value: r.uint32()
|
|
116
122
|
}
|
|
117
123
|
break
|
|
118
124
|
}
|
|
119
125
|
case 3: {
|
|
120
126
|
yield {
|
|
121
127
|
field: `${prefix}upkeep`,
|
|
122
|
-
value: Upkeep.codec().decode(
|
|
128
|
+
value: Upkeep.codec().decode(r)
|
|
123
129
|
}
|
|
124
130
|
break
|
|
125
131
|
}
|
|
126
132
|
default: {
|
|
127
|
-
|
|
133
|
+
r.skipType(tag & 7)
|
|
128
134
|
break
|
|
129
135
|
}
|
|
130
136
|
}
|
|
@@ -158,7 +164,7 @@ export namespace IPNSPublishMetadata {
|
|
|
158
164
|
value: Upkeep
|
|
159
165
|
}
|
|
160
166
|
|
|
161
|
-
export function encode (obj:
|
|
167
|
+
export function encode (obj: IPNSPublishMetadataInput): Uint8Array<ArrayBuffer> {
|
|
162
168
|
return encodeMessage(obj, IPNSPublishMetadata.codec())
|
|
163
169
|
}
|
|
164
170
|
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"codec": "https://ipfs.github.io/helia/functions/_helia_ipns.IPNSEntry.ValidityType.codec.html",
|
|
3
|
-
"ValidityType": "https://ipfs.github.io/helia/enums/_helia_ipns.IPNSEntry.ValidityType.html",
|
|
4
|
-
"IPNSEntryDataFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryDataFieldEvent.html",
|
|
5
|
-
"IPNSEntryPublicKeyFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryPublicKeyFieldEvent.html",
|
|
6
|
-
"IPNSEntrySequenceFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntrySequenceFieldEvent.html",
|
|
7
|
-
"IPNSEntrySignatureV1FieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntrySignatureV1FieldEvent.html",
|
|
8
|
-
"IPNSEntrySignatureV2FieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntrySignatureV2FieldEvent.html",
|
|
9
|
-
"IPNSEntryTtlFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryTtlFieldEvent.html",
|
|
10
|
-
"IPNSEntryValidityFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryValidityFieldEvent.html",
|
|
11
|
-
"IPNSEntryValidityTypeFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryValidityTypeFieldEvent.html",
|
|
12
|
-
"IPNSEntryValueFieldEvent": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.IPNSEntryValueFieldEvent.html",
|
|
13
|
-
"decode": "https://ipfs.github.io/helia/functions/_helia_ipns.IPNSEntry.decode.html",
|
|
14
|
-
"encode": "https://ipfs.github.io/helia/functions/_helia_ipns.IPNSEntry.encode.html",
|
|
15
|
-
"stream": "https://ipfs.github.io/helia/functions/_helia_ipns.IPNSEntry.stream.html",
|
|
16
|
-
"InvalidEmbeddedPublicKeyError": "https://ipfs.github.io/helia/classes/_helia_ipns.InvalidEmbeddedPublicKeyError.html",
|
|
17
|
-
"InvalidRecordDataError": "https://ipfs.github.io/helia/classes/_helia_ipns.InvalidRecordDataError.html",
|
|
18
|
-
"InvalidTopicError": "https://ipfs.github.io/helia/classes/_helia_ipns.InvalidTopicError.html",
|
|
19
|
-
"InvalidValueError": "https://ipfs.github.io/helia/classes/_helia_ipns.InvalidValueError.html",
|
|
20
|
-
"RecordExpiredError": "https://ipfs.github.io/helia/classes/_helia_ipns.RecordExpiredError.html",
|
|
21
|
-
"RecordNotFoundError": "https://ipfs.github.io/helia/classes/_helia_ipns.RecordNotFoundError.html",
|
|
22
|
-
"RecordObsoleteError": "https://ipfs.github.io/helia/classes/_helia_ipns.RecordObsoleteError.html",
|
|
23
|
-
"RecordsFailedValidationError": "https://ipfs.github.io/helia/classes/_helia_ipns.RecordsFailedValidationError.html",
|
|
24
|
-
"RecordTooLargeError": "https://ipfs.github.io/helia/classes/_helia_ipns.RecordTooLargeError.html",
|
|
25
|
-
"SignatureCreationError": "https://ipfs.github.io/helia/classes/_helia_ipns.SignatureCreationError.html",
|
|
26
|
-
"SignatureVerificationError": "https://ipfs.github.io/helia/classes/_helia_ipns.SignatureVerificationError.html",
|
|
27
|
-
"UnsupportedValidityError": "https://ipfs.github.io/helia/classes/_helia_ipns.UnsupportedValidityError.html",
|
|
28
|
-
"CreateIPNSRecordOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.CreateIPNSRecordOptions.html",
|
|
29
|
-
"IPNS": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNS.html",
|
|
30
|
-
".:IPNS": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNS.html",
|
|
31
|
-
"IPNSComponents": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSComponents.html",
|
|
32
|
-
".:IPNSComponents": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSComponents.html",
|
|
33
|
-
"IPNSEntry": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSEntry.html",
|
|
34
|
-
"IPNSOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSOptions.html",
|
|
35
|
-
".:IPNSOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSOptions.html",
|
|
36
|
-
"IPNSPublishResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSPublishResult.html",
|
|
37
|
-
".:IPNSPublishResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSPublishResult.html",
|
|
38
|
-
"IPNSRecordData": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSRecordData.html",
|
|
39
|
-
".:IPNSRecordData": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSRecordData.html",
|
|
40
|
-
"IPNSResolveOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolveOptions.html",
|
|
41
|
-
".:IPNSResolveOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolveOptions.html",
|
|
42
|
-
"IPNSResolver": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolver.html",
|
|
43
|
-
".:IPNSResolver": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolver.html",
|
|
44
|
-
"IPNSResolveResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolveResult.html",
|
|
45
|
-
".:IPNSResolveResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolveResult.html",
|
|
46
|
-
"IPNSResolverOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolverOptions.html",
|
|
47
|
-
".:IPNSResolverOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSResolverOptions.html",
|
|
48
|
-
"IPNSRouting": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSRouting.html",
|
|
49
|
-
"IPNSRoutingGetOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSRoutingGetOptions.html",
|
|
50
|
-
"IPNSRoutingPutOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.IPNSRoutingPutOptions.html",
|
|
51
|
-
"PublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PublishOptions.html",
|
|
52
|
-
".:PublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PublishOptions.html",
|
|
53
|
-
"PublishResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PublishResult.html",
|
|
54
|
-
"PubSub": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubSub.html",
|
|
55
|
-
"PubSubEvents": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubSubEvents.html",
|
|
56
|
-
"PubSubMessage": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubSubMessage.html",
|
|
57
|
-
"PubsubRoutingComponents": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubsubRoutingComponents.html",
|
|
58
|
-
"PubSubSubscription": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubSubSubscription.html",
|
|
59
|
-
"PubSubSubscriptionChangeData": "https://ipfs.github.io/helia/interfaces/_helia_ipns.PubSubSubscriptionChangeData.html",
|
|
60
|
-
"RepublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.RepublishOptions.html",
|
|
61
|
-
".:RepublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.RepublishOptions.html",
|
|
62
|
-
"RepublishResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.RepublishResult.html",
|
|
63
|
-
".:RepublishResult": "https://ipfs.github.io/helia/interfaces/_helia_ipns.RepublishResult.html",
|
|
64
|
-
"UnpublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.UnpublishOptions.html",
|
|
65
|
-
".:UnpublishOptions": "https://ipfs.github.io/helia/interfaces/_helia_ipns.UnpublishOptions.html",
|
|
66
|
-
"DatastoreProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.DatastoreProgressEvents.html",
|
|
67
|
-
".:DatastoreProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.DatastoreProgressEvents.html",
|
|
68
|
-
"HeliaRoutingProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.HeliaRoutingProgressEvents.html",
|
|
69
|
-
"IPNSRoutingProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.IPNSRoutingProgressEvents.html",
|
|
70
|
-
"PublishProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.PublishProgressEvents.html",
|
|
71
|
-
".:PublishProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.PublishProgressEvents.html",
|
|
72
|
-
"PubSubProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.PubSubProgressEvents.html",
|
|
73
|
-
"ResolveProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.ResolveProgressEvents.html",
|
|
74
|
-
".:ResolveProgressEvents": "https://ipfs.github.io/helia/types/_helia_ipns.ResolveProgressEvents.html",
|
|
75
|
-
"UpkeepPolicy": "https://ipfs.github.io/helia/types/_helia_ipns.UpkeepPolicy.html",
|
|
76
|
-
".:UpkeepPolicy": "https://ipfs.github.io/helia/types/_helia_ipns.UpkeepPolicy.html",
|
|
77
|
-
"createIPNSRecord": "https://ipfs.github.io/helia/functions/_helia_ipns.createIPNSRecord.html",
|
|
78
|
-
"heliaIPNSRouting": "https://ipfs.github.io/helia/functions/_helia_ipns.heliaIPNSRouting.html",
|
|
79
|
-
"ipns": "https://ipfs.github.io/helia/functions/_helia_ipns.ipns.html",
|
|
80
|
-
".:ipns": "https://ipfs.github.io/helia/functions/_helia_ipns.ipns.html",
|
|
81
|
-
"ipnsResolver": "https://ipfs.github.io/helia/functions/_helia_ipns.ipnsResolver.html",
|
|
82
|
-
".:ipnsResolver": "https://ipfs.github.io/helia/functions/_helia_ipns.ipnsResolver.html",
|
|
83
|
-
"ipnsSelector": "https://ipfs.github.io/helia/functions/_helia_ipns.ipnsSelector.html",
|
|
84
|
-
"ipnsValidator": "https://ipfs.github.io/helia/functions/_helia_ipns.ipnsValidator.html",
|
|
85
|
-
"isLocalStoreRouting": "https://ipfs.github.io/helia/functions/_helia_ipns.isLocalStoreRouting.html",
|
|
86
|
-
"multihashFromIPNSRoutingKey": "https://ipfs.github.io/helia/functions/_helia_ipns.multihashFromIPNSRoutingKey.html",
|
|
87
|
-
"multihashToIPNSRoutingKey": "https://ipfs.github.io/helia/functions/_helia_ipns.multihashToIPNSRoutingKey.html",
|
|
88
|
-
"pubSubIPNSRouting": "https://ipfs.github.io/helia/functions/_helia_ipns.pubSubIPNSRouting.html",
|
|
89
|
-
"routerName": "https://ipfs.github.io/helia/functions/_helia_ipns.routerName.html"
|
|
90
|
-
}
|