Skip to content

Commit 9267f06

Browse files
authored
fix: encode enums correctly (#156)
Updates protons and regenerates protobuf code to encode enums correctly
1 parent 28a9df7 commit 9267f06

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
"generate": "protons src/pb/ipns.proto"
162162
},
163163
"dependencies": {
164-
"@libp2p/crypto": "^0.22.10",
164+
"@libp2p/crypto": "^0.22.12",
165165
"@libp2p/interfaces": "^1.3.20",
166166
"@libp2p/logger": "^1.1.3",
167167
"@libp2p/peer-id": "^1.1.9",
@@ -170,7 +170,7 @@
170170
"err-code": "^3.0.1",
171171
"interface-datastore": "^6.0.2",
172172
"multiformats": "^9.4.5",
173-
"protons-runtime": "^1.0.3",
173+
"protons-runtime": "^1.0.4",
174174
"timestamp-nano": "^1.0.0",
175175
"uint8arrays": "^3.0.0"
176176
},
@@ -179,7 +179,7 @@
179179
"@types/debug": "^4.1.5",
180180
"aegir": "^37.0.11",
181181
"npm-run-all": "^4.1.5",
182-
"protons": "3.0.3",
182+
"protons": "3.0.4",
183183
"rimraf": "^3.0.2",
184184
"util": "^0.12.3"
185185
}

src/pb/ipns.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ export namespace IpnsEntry {
2121
EOL = 'EOL'
2222
}
2323

24+
enum __ValidityTypeValues {
25+
EOL = 0
26+
}
27+
2428
export namespace ValidityType {
2529
export const codec = () => {
26-
return enumeration<typeof ValidityType>(ValidityType)
30+
return enumeration<typeof ValidityType>(__ValidityTypeValues)
2731
}
2832
}
2933

0 commit comments

Comments
 (0)