@pkcprotocol/pkc-js 0.0.131 → 0.0.133

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.
Files changed (98) hide show
  1. package/README.md +17 -7
  2. package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +2 -0
  3. package/dist/browser/clients/rpc-client/schema.d.ts +24 -0
  4. package/dist/browser/community/schema.d.ts +193 -0
  5. package/dist/browser/community/schema.js +4 -0
  6. package/dist/browser/community/schema.js.map +1 -1
  7. package/dist/browser/errors.d.ts +9 -1
  8. package/dist/browser/errors.js +9 -1
  9. package/dist/browser/errors.js.map +1 -1
  10. package/dist/browser/generated-version.d.ts +1 -1
  11. package/dist/browser/generated-version.js +1 -1
  12. package/dist/browser/index-with-compile-cache.d.ts +32 -0
  13. package/dist/browser/index.d.ts +64 -0
  14. package/dist/browser/pages/schema.d.ts +44 -0
  15. package/dist/browser/pkc-error.d.ts +1 -1
  16. package/dist/browser/publications/comment/comment.d.ts +1 -0
  17. package/dist/browser/publications/comment/comment.js +2 -0
  18. package/dist/browser/publications/comment/comment.js.map +1 -1
  19. package/dist/browser/publications/comment/schema.d.ts +133 -1
  20. package/dist/browser/publications/comment/schema.js +21 -6
  21. package/dist/browser/publications/comment/schema.js.map +1 -1
  22. package/dist/browser/publications/comment/types.d.ts +2 -1
  23. package/dist/browser/publications/community-edit/schema.d.ts +8 -0
  24. package/dist/browser/pubsub-messages/schema.d.ts +37 -0
  25. package/dist/browser/rpc/src/lib/pkc-js/index.d.ts +32 -0
  26. package/dist/browser/rpc/src/schema.d.ts +192 -0
  27. package/dist/browser/runtime/node/community/db-handler.js +3 -2
  28. package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
  29. package/dist/browser/runtime/node/community/local-community/editing.js +60 -7
  30. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  31. package/dist/browser/runtime/node/community/local-community/publication-validation.js +41 -17
  32. package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
  33. package/dist/browser/runtime/node/polyfill.js +3 -1
  34. package/dist/browser/runtime/node/polyfill.js.map +1 -1
  35. package/dist/browser/schema/schema-util.d.ts +82 -0
  36. package/dist/browser/schema.d.ts +256 -0
  37. package/dist/browser/signer/signatures.js +18 -6
  38. package/dist/browser/signer/signatures.js.map +1 -1
  39. package/dist/browser/test/test-util.d.ts +40 -0
  40. package/dist/browser/version.js +1 -1
  41. package/dist/bundled/bundle-manifest.json +434 -211
  42. package/dist/bundled/challenges.js +1 -1
  43. package/dist/bundled/chunks/{helia-for-pkc-C7_eLx63.js → helia-for-pkc-B6cVl9Fj.js} +2 -2
  44. package/dist/bundled/chunks/{local-community-CtL1aSwt.js → local-community-CEsw9IC3.js} +1 -1
  45. package/dist/bundled/chunks/{local-community-RlYLG5QV.js → local-community-JxRohlLp.js} +114 -47
  46. package/dist/bundled/chunks/node-DsWFSaNV.js +36843 -0
  47. package/dist/bundled/chunks/{page-sort-scoring-CaoGFyhT.js → page-sort-scoring-iqMGLuRC.js} +1 -1
  48. package/dist/bundled/chunks/{rpc-local-community-BXt7eK9l.js → rpc-local-community-jndojGZl.js} +56870 -33780
  49. package/dist/bundled/chunks/{src-B07ldGHS.js → src-BggJ_InF.js} +435 -149
  50. package/dist/bundled/chunks/{src-629pKfxo.js → src-BsiPSkhv.js} +2 -2
  51. package/dist/bundled/chunks/{src-BOzgM7Fp.js → src-evzEHW9W.js} +26 -9
  52. package/dist/bundled/chunks/{util-CaL93qd4.js → util-Bna9pur0.js} +32 -9
  53. package/dist/bundled/chunks/{util-cD0RAlzC.js → util-CYgZRMVL.js} +1 -1
  54. package/dist/bundled/chunks/{validate-package-factories-DWI4TSli.js → validate-package-factories-FeyM9Tw1.js} +2 -2
  55. package/dist/bundled/index.js +1 -1
  56. package/dist/bundled/page-sorts.js +1 -1
  57. package/dist/bundled/rpc/src/index.js +4 -4
  58. package/dist/node/clients/rpc-client/rpc-schema-util.d.ts +2 -0
  59. package/dist/node/clients/rpc-client/schema.d.ts +24 -0
  60. package/dist/node/community/schema.d.ts +193 -0
  61. package/dist/node/community/schema.js +4 -0
  62. package/dist/node/community/schema.js.map +1 -1
  63. package/dist/node/errors.d.ts +9 -1
  64. package/dist/node/errors.js +9 -1
  65. package/dist/node/errors.js.map +1 -1
  66. package/dist/node/generated-version.d.ts +1 -1
  67. package/dist/node/generated-version.js +1 -1
  68. package/dist/node/index-with-compile-cache.d.ts +32 -0
  69. package/dist/node/index.d.ts +64 -0
  70. package/dist/node/pages/schema.d.ts +44 -0
  71. package/dist/node/pkc-error.d.ts +1 -1
  72. package/dist/node/publications/comment/comment.d.ts +1 -0
  73. package/dist/node/publications/comment/comment.js +2 -0
  74. package/dist/node/publications/comment/comment.js.map +1 -1
  75. package/dist/node/publications/comment/schema.d.ts +133 -1
  76. package/dist/node/publications/comment/schema.js +21 -6
  77. package/dist/node/publications/comment/schema.js.map +1 -1
  78. package/dist/node/publications/comment/types.d.ts +2 -1
  79. package/dist/node/publications/community-edit/schema.d.ts +8 -0
  80. package/dist/node/pubsub-messages/schema.d.ts +37 -0
  81. package/dist/node/rpc/src/lib/pkc-js/index.d.ts +32 -0
  82. package/dist/node/rpc/src/schema.d.ts +192 -0
  83. package/dist/node/runtime/node/community/db-handler.js +3 -2
  84. package/dist/node/runtime/node/community/db-handler.js.map +1 -1
  85. package/dist/node/runtime/node/community/local-community/editing.js +60 -7
  86. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  87. package/dist/node/runtime/node/community/local-community/publication-validation.js +41 -17
  88. package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
  89. package/dist/node/runtime/node/polyfill.js +3 -1
  90. package/dist/node/runtime/node/polyfill.js.map +1 -1
  91. package/dist/node/schema/schema-util.d.ts +82 -0
  92. package/dist/node/schema.d.ts +256 -0
  93. package/dist/node/signer/signatures.js +18 -6
  94. package/dist/node/signer/signatures.js.map +1 -1
  95. package/dist/node/test/test-util.d.ts +40 -0
  96. package/dist/node/version.js +1 -1
  97. package/package.json +18 -18
  98. package/dist/bundled/chunks/node-DFp6m62Y.js +0 -9770
@@ -443,6 +443,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
443
443
  postCid?: string | undefined;
444
444
  quotedCids?: string[] | undefined;
445
445
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
446
+ gallery?: {
447
+ [x: string]: unknown;
448
+ url: string;
449
+ htmlTagName: "img" | "video" | "audio";
450
+ width?: number | undefined;
451
+ height?: number | undefined;
452
+ alt?: string | undefined;
453
+ }[] | undefined;
446
454
  author?: {
447
455
  [x: string]: unknown;
448
456
  name?: string | undefined;
@@ -512,6 +520,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
512
520
  postCid?: string | undefined;
513
521
  quotedCids?: string[] | undefined;
514
522
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
523
+ gallery?: {
524
+ [x: string]: unknown;
525
+ url: string;
526
+ htmlTagName: "img" | "video" | "audio";
527
+ width?: number | undefined;
528
+ height?: number | undefined;
529
+ alt?: string | undefined;
530
+ }[] | undefined;
515
531
  author?: {
516
532
  [x: string]: unknown;
517
533
  name?: string | undefined;
@@ -695,6 +711,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
695
711
  postCid?: string | undefined;
696
712
  quotedCids?: string[] | undefined;
697
713
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
714
+ gallery?: {
715
+ [x: string]: unknown;
716
+ url: string;
717
+ htmlTagName: "img" | "video" | "audio";
718
+ width?: number | undefined;
719
+ height?: number | undefined;
720
+ alt?: string | undefined;
721
+ }[] | undefined;
698
722
  author?: {
699
723
  [x: string]: unknown;
700
724
  name?: string | undefined;
@@ -884,6 +908,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
884
908
  postCid?: string | undefined;
885
909
  quotedCids?: string[] | undefined;
886
910
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
911
+ gallery?: {
912
+ [x: string]: unknown;
913
+ url: string;
914
+ htmlTagName: "img" | "video" | "audio";
915
+ width?: number | undefined;
916
+ height?: number | undefined;
917
+ alt?: string | undefined;
918
+ }[] | undefined;
887
919
  author?: {
888
920
  [x: string]: unknown;
889
921
  name?: string | undefined;
@@ -1001,6 +1033,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
1001
1033
  postCid?: string | undefined;
1002
1034
  quotedCids?: string[] | undefined;
1003
1035
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
1036
+ gallery?: {
1037
+ [x: string]: unknown;
1038
+ url: string;
1039
+ htmlTagName: "img" | "video" | "audio";
1040
+ width?: number | undefined;
1041
+ height?: number | undefined;
1042
+ alt?: string | undefined;
1043
+ }[] | undefined;
1004
1044
  author?: {
1005
1045
  [x: string]: unknown;
1006
1046
  name?: string | undefined;
@@ -1070,6 +1110,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
1070
1110
  postCid?: string | undefined;
1071
1111
  quotedCids?: string[] | undefined;
1072
1112
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
1113
+ gallery?: {
1114
+ [x: string]: unknown;
1115
+ url: string;
1116
+ htmlTagName: "img" | "video" | "audio";
1117
+ width?: number | undefined;
1118
+ height?: number | undefined;
1119
+ alt?: string | undefined;
1120
+ }[] | undefined;
1073
1121
  author?: {
1074
1122
  [x: string]: unknown;
1075
1123
  name?: string | undefined;
@@ -1253,6 +1301,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
1253
1301
  postCid?: string | undefined;
1254
1302
  quotedCids?: string[] | undefined;
1255
1303
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
1304
+ gallery?: {
1305
+ [x: string]: unknown;
1306
+ url: string;
1307
+ htmlTagName: "img" | "video" | "audio";
1308
+ width?: number | undefined;
1309
+ height?: number | undefined;
1310
+ alt?: string | undefined;
1311
+ }[] | undefined;
1256
1312
  author?: {
1257
1313
  [x: string]: unknown;
1258
1314
  name?: string | undefined;
@@ -1442,6 +1498,14 @@ export declare const PKCUserOptionBaseSchema: z.ZodObject<{
1442
1498
  postCid?: string | undefined;
1443
1499
  quotedCids?: string[] | undefined;
1444
1500
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
1501
+ gallery?: {
1502
+ [x: string]: unknown;
1503
+ url: string;
1504
+ htmlTagName: "img" | "video" | "audio";
1505
+ width?: number | undefined;
1506
+ height?: number | undefined;
1507
+ alt?: string | undefined;
1508
+ }[] | undefined;
1445
1509
  author?: {
1446
1510
  [x: string]: unknown;
1447
1511
  name?: string | undefined;
@@ -1902,6 +1966,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
1902
1966
  postCid?: string | undefined;
1903
1967
  quotedCids?: string[] | undefined;
1904
1968
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
1969
+ gallery?: {
1970
+ [x: string]: unknown;
1971
+ url: string;
1972
+ htmlTagName: "img" | "video" | "audio";
1973
+ width?: number | undefined;
1974
+ height?: number | undefined;
1975
+ alt?: string | undefined;
1976
+ }[] | undefined;
1905
1977
  author?: {
1906
1978
  [x: string]: unknown;
1907
1979
  name?: string | undefined;
@@ -1971,6 +2043,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
1971
2043
  postCid?: string | undefined;
1972
2044
  quotedCids?: string[] | undefined;
1973
2045
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2046
+ gallery?: {
2047
+ [x: string]: unknown;
2048
+ url: string;
2049
+ htmlTagName: "img" | "video" | "audio";
2050
+ width?: number | undefined;
2051
+ height?: number | undefined;
2052
+ alt?: string | undefined;
2053
+ }[] | undefined;
1974
2054
  author?: {
1975
2055
  [x: string]: unknown;
1976
2056
  name?: string | undefined;
@@ -2154,6 +2234,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2154
2234
  postCid?: string | undefined;
2155
2235
  quotedCids?: string[] | undefined;
2156
2236
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2237
+ gallery?: {
2238
+ [x: string]: unknown;
2239
+ url: string;
2240
+ htmlTagName: "img" | "video" | "audio";
2241
+ width?: number | undefined;
2242
+ height?: number | undefined;
2243
+ alt?: string | undefined;
2244
+ }[] | undefined;
2157
2245
  author?: {
2158
2246
  [x: string]: unknown;
2159
2247
  name?: string | undefined;
@@ -2343,6 +2431,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2343
2431
  postCid?: string | undefined;
2344
2432
  quotedCids?: string[] | undefined;
2345
2433
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2434
+ gallery?: {
2435
+ [x: string]: unknown;
2436
+ url: string;
2437
+ htmlTagName: "img" | "video" | "audio";
2438
+ width?: number | undefined;
2439
+ height?: number | undefined;
2440
+ alt?: string | undefined;
2441
+ }[] | undefined;
2346
2442
  author?: {
2347
2443
  [x: string]: unknown;
2348
2444
  name?: string | undefined;
@@ -2460,6 +2556,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2460
2556
  postCid?: string | undefined;
2461
2557
  quotedCids?: string[] | undefined;
2462
2558
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2559
+ gallery?: {
2560
+ [x: string]: unknown;
2561
+ url: string;
2562
+ htmlTagName: "img" | "video" | "audio";
2563
+ width?: number | undefined;
2564
+ height?: number | undefined;
2565
+ alt?: string | undefined;
2566
+ }[] | undefined;
2463
2567
  author?: {
2464
2568
  [x: string]: unknown;
2465
2569
  name?: string | undefined;
@@ -2529,6 +2633,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2529
2633
  postCid?: string | undefined;
2530
2634
  quotedCids?: string[] | undefined;
2531
2635
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2636
+ gallery?: {
2637
+ [x: string]: unknown;
2638
+ url: string;
2639
+ htmlTagName: "img" | "video" | "audio";
2640
+ width?: number | undefined;
2641
+ height?: number | undefined;
2642
+ alt?: string | undefined;
2643
+ }[] | undefined;
2532
2644
  author?: {
2533
2645
  [x: string]: unknown;
2534
2646
  name?: string | undefined;
@@ -2712,6 +2824,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2712
2824
  postCid?: string | undefined;
2713
2825
  quotedCids?: string[] | undefined;
2714
2826
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
2827
+ gallery?: {
2828
+ [x: string]: unknown;
2829
+ url: string;
2830
+ htmlTagName: "img" | "video" | "audio";
2831
+ width?: number | undefined;
2832
+ height?: number | undefined;
2833
+ alt?: string | undefined;
2834
+ }[] | undefined;
2715
2835
  author?: {
2716
2836
  [x: string]: unknown;
2717
2837
  name?: string | undefined;
@@ -2901,6 +3021,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
2901
3021
  postCid?: string | undefined;
2902
3022
  quotedCids?: string[] | undefined;
2903
3023
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
3024
+ gallery?: {
3025
+ [x: string]: unknown;
3026
+ url: string;
3027
+ htmlTagName: "img" | "video" | "audio";
3028
+ width?: number | undefined;
3029
+ height?: number | undefined;
3030
+ alt?: string | undefined;
3031
+ }[] | undefined;
2904
3032
  author?: {
2905
3033
  [x: string]: unknown;
2906
3034
  name?: string | undefined;
@@ -3215,6 +3343,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
3215
3343
  postCid?: string | undefined;
3216
3344
  quotedCids?: string[] | undefined;
3217
3345
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
3346
+ gallery?: {
3347
+ [x: string]: unknown;
3348
+ url: string;
3349
+ htmlTagName: "img" | "video" | "audio";
3350
+ width?: number | undefined;
3351
+ height?: number | undefined;
3352
+ alt?: string | undefined;
3353
+ }[] | undefined;
3218
3354
  author?: {
3219
3355
  [x: string]: unknown;
3220
3356
  name?: string | undefined;
@@ -3284,6 +3420,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
3284
3420
  postCid?: string | undefined;
3285
3421
  quotedCids?: string[] | undefined;
3286
3422
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
3423
+ gallery?: {
3424
+ [x: string]: unknown;
3425
+ url: string;
3426
+ htmlTagName: "img" | "video" | "audio";
3427
+ width?: number | undefined;
3428
+ height?: number | undefined;
3429
+ alt?: string | undefined;
3430
+ }[] | undefined;
3287
3431
  author?: {
3288
3432
  [x: string]: unknown;
3289
3433
  name?: string | undefined;
@@ -3467,6 +3611,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
3467
3611
  postCid?: string | undefined;
3468
3612
  quotedCids?: string[] | undefined;
3469
3613
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
3614
+ gallery?: {
3615
+ [x: string]: unknown;
3616
+ url: string;
3617
+ htmlTagName: "img" | "video" | "audio";
3618
+ width?: number | undefined;
3619
+ height?: number | undefined;
3620
+ alt?: string | undefined;
3621
+ }[] | undefined;
3470
3622
  author?: {
3471
3623
  [x: string]: unknown;
3472
3624
  name?: string | undefined;
@@ -3656,6 +3808,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
3656
3808
  postCid?: string | undefined;
3657
3809
  quotedCids?: string[] | undefined;
3658
3810
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
3811
+ gallery?: {
3812
+ [x: string]: unknown;
3813
+ url: string;
3814
+ htmlTagName: "img" | "video" | "audio";
3815
+ width?: number | undefined;
3816
+ height?: number | undefined;
3817
+ alt?: string | undefined;
3818
+ }[] | undefined;
3659
3819
  author?: {
3660
3820
  [x: string]: unknown;
3661
3821
  name?: string | undefined;
@@ -3961,6 +4121,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
3961
4121
  postCid?: string | undefined;
3962
4122
  quotedCids?: string[] | undefined;
3963
4123
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
4124
+ gallery?: {
4125
+ [x: string]: unknown;
4126
+ url: string;
4127
+ htmlTagName: "img" | "video" | "audio";
4128
+ width?: number | undefined;
4129
+ height?: number | undefined;
4130
+ alt?: string | undefined;
4131
+ }[] | undefined;
3964
4132
  author?: {
3965
4133
  [x: string]: unknown;
3966
4134
  name?: string | undefined;
@@ -4030,6 +4198,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
4030
4198
  postCid?: string | undefined;
4031
4199
  quotedCids?: string[] | undefined;
4032
4200
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
4201
+ gallery?: {
4202
+ [x: string]: unknown;
4203
+ url: string;
4204
+ htmlTagName: "img" | "video" | "audio";
4205
+ width?: number | undefined;
4206
+ height?: number | undefined;
4207
+ alt?: string | undefined;
4208
+ }[] | undefined;
4033
4209
  author?: {
4034
4210
  [x: string]: unknown;
4035
4211
  name?: string | undefined;
@@ -4213,6 +4389,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
4213
4389
  postCid?: string | undefined;
4214
4390
  quotedCids?: string[] | undefined;
4215
4391
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
4392
+ gallery?: {
4393
+ [x: string]: unknown;
4394
+ url: string;
4395
+ htmlTagName: "img" | "video" | "audio";
4396
+ width?: number | undefined;
4397
+ height?: number | undefined;
4398
+ alt?: string | undefined;
4399
+ }[] | undefined;
4216
4400
  author?: {
4217
4401
  [x: string]: unknown;
4218
4402
  name?: string | undefined;
@@ -4402,6 +4586,14 @@ export declare const PKCUserOptionsSchema: z.ZodPipe<z.ZodObject<{
4402
4586
  postCid?: string | undefined;
4403
4587
  quotedCids?: string[] | undefined;
4404
4588
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
4589
+ gallery?: {
4590
+ [x: string]: unknown;
4591
+ url: string;
4592
+ htmlTagName: "img" | "video" | "audio";
4593
+ width?: number | undefined;
4594
+ height?: number | undefined;
4595
+ alt?: string | undefined;
4596
+ }[] | undefined;
4405
4597
  author?: {
4406
4598
  [x: string]: unknown;
4407
4599
  name?: string | undefined;
@@ -4868,6 +5060,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
4868
5060
  postCid?: string | undefined;
4869
5061
  quotedCids?: string[] | undefined;
4870
5062
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5063
+ gallery?: {
5064
+ [x: string]: unknown;
5065
+ url: string;
5066
+ htmlTagName: "img" | "video" | "audio";
5067
+ width?: number | undefined;
5068
+ height?: number | undefined;
5069
+ alt?: string | undefined;
5070
+ }[] | undefined;
4871
5071
  author?: {
4872
5072
  [x: string]: unknown;
4873
5073
  name?: string | undefined;
@@ -4937,6 +5137,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
4937
5137
  postCid?: string | undefined;
4938
5138
  quotedCids?: string[] | undefined;
4939
5139
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5140
+ gallery?: {
5141
+ [x: string]: unknown;
5142
+ url: string;
5143
+ htmlTagName: "img" | "video" | "audio";
5144
+ width?: number | undefined;
5145
+ height?: number | undefined;
5146
+ alt?: string | undefined;
5147
+ }[] | undefined;
4940
5148
  author?: {
4941
5149
  [x: string]: unknown;
4942
5150
  name?: string | undefined;
@@ -5120,6 +5328,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5120
5328
  postCid?: string | undefined;
5121
5329
  quotedCids?: string[] | undefined;
5122
5330
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5331
+ gallery?: {
5332
+ [x: string]: unknown;
5333
+ url: string;
5334
+ htmlTagName: "img" | "video" | "audio";
5335
+ width?: number | undefined;
5336
+ height?: number | undefined;
5337
+ alt?: string | undefined;
5338
+ }[] | undefined;
5123
5339
  author?: {
5124
5340
  [x: string]: unknown;
5125
5341
  name?: string | undefined;
@@ -5309,6 +5525,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5309
5525
  postCid?: string | undefined;
5310
5526
  quotedCids?: string[] | undefined;
5311
5527
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5528
+ gallery?: {
5529
+ [x: string]: unknown;
5530
+ url: string;
5531
+ htmlTagName: "img" | "video" | "audio";
5532
+ width?: number | undefined;
5533
+ height?: number | undefined;
5534
+ alt?: string | undefined;
5535
+ }[] | undefined;
5312
5536
  author?: {
5313
5537
  [x: string]: unknown;
5314
5538
  name?: string | undefined;
@@ -5426,6 +5650,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5426
5650
  postCid?: string | undefined;
5427
5651
  quotedCids?: string[] | undefined;
5428
5652
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5653
+ gallery?: {
5654
+ [x: string]: unknown;
5655
+ url: string;
5656
+ htmlTagName: "img" | "video" | "audio";
5657
+ width?: number | undefined;
5658
+ height?: number | undefined;
5659
+ alt?: string | undefined;
5660
+ }[] | undefined;
5429
5661
  author?: {
5430
5662
  [x: string]: unknown;
5431
5663
  name?: string | undefined;
@@ -5495,6 +5727,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5495
5727
  postCid?: string | undefined;
5496
5728
  quotedCids?: string[] | undefined;
5497
5729
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5730
+ gallery?: {
5731
+ [x: string]: unknown;
5732
+ url: string;
5733
+ htmlTagName: "img" | "video" | "audio";
5734
+ width?: number | undefined;
5735
+ height?: number | undefined;
5736
+ alt?: string | undefined;
5737
+ }[] | undefined;
5498
5738
  author?: {
5499
5739
  [x: string]: unknown;
5500
5740
  name?: string | undefined;
@@ -5678,6 +5918,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5678
5918
  postCid?: string | undefined;
5679
5919
  quotedCids?: string[] | undefined;
5680
5920
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
5921
+ gallery?: {
5922
+ [x: string]: unknown;
5923
+ url: string;
5924
+ htmlTagName: "img" | "video" | "audio";
5925
+ width?: number | undefined;
5926
+ height?: number | undefined;
5927
+ alt?: string | undefined;
5928
+ }[] | undefined;
5681
5929
  author?: {
5682
5930
  [x: string]: unknown;
5683
5931
  name?: string | undefined;
@@ -5867,6 +6115,14 @@ export declare const PKCParsedOptionsSchema: z.ZodObject<{
5867
6115
  postCid?: string | undefined;
5868
6116
  quotedCids?: string[] | undefined;
5869
6117
  crosspost?: import("./publications/comment/schema.js").Crosspost | undefined;
6118
+ gallery?: {
6119
+ [x: string]: unknown;
6120
+ url: string;
6121
+ htmlTagName: "img" | "video" | "audio";
6122
+ width?: number | undefined;
6123
+ height?: number | undefined;
6124
+ alt?: string | undefined;
6125
+ }[] | undefined;
5870
6126
  author?: {
5871
6127
  [x: string]: unknown;
5872
6128
  name?: string | undefined;
@@ -614,23 +614,35 @@ export async function verifyCommentUpdate({ update, resolveAuthorNames, clientsM
614
614
  if (!jsonValidation.valid)
615
615
  return jsonValidation;
616
616
  }
617
+ // The checks below run before the cache lookup: pages verify with validateUpdateSignature: false, so a cached
618
+ // update.signature.signature says nothing about the cid or the edit the community attached this time
619
+ if (update.cid !== comment.cid)
620
+ return { valid: false, reason: messages.ERR_COMMENT_UPDATE_DIFFERENT_CID_THAN_COMMENT };
621
+ const edit = "edit" in update ? update.edit : undefined;
622
+ if (edit) {
623
+ if (edit.signature.publicKey !== comment.signature.publicKey)
624
+ return { valid: false, reason: messages.ERR_AUTHOR_EDIT_IS_NOT_SIGNED_BY_AUTHOR };
625
+ // Otherwise a community could attach the author's genuine edit (or deletion) of one comment to another of their comments
626
+ if (edit.commentCid !== update.cid)
627
+ return { valid: false, reason: messages.ERR_COMMENT_UPDATE_EDIT_IS_FOR_A_DIFFERENT_COMMENT };
628
+ // signedPropertyNames is not itself signed, so a community could drop "deleted" from it and add deleted: true
629
+ if (!_allFieldsOfRecordInSignedPropertyNames(edit))
630
+ return { valid: false, reason: messages.ERR_COMMENT_UPDATE_EDIT_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES };
631
+ }
617
632
  const cacheKey = sha256(update.signature.signature +
618
633
  community.publicKey +
619
634
  community.name +
620
635
  JSON.stringify(comment) +
636
+ JSON.stringify(edit ?? null) + // binds the cached edit signature verification to this exact edit
621
637
  validatePages +
622
638
  validateUpdateSignature);
623
639
  if (clientsManager._pkc._memCaches.commentUpdateVerificationCache.get(cacheKey))
624
640
  return { valid: true };
625
- if ("edit" in update && update.edit) {
626
- if (update.edit.signature.publicKey !== comment.signature.publicKey)
627
- return { valid: false, reason: messages.ERR_AUTHOR_EDIT_IS_NOT_SIGNED_BY_AUTHOR };
628
- const editSignatureValidation = await _validateSignatureOfPKCRecord(update.edit);
641
+ if (edit) {
642
+ const editSignatureValidation = await _validateSignatureOfPKCRecord(edit);
629
643
  if (!editSignatureValidation.valid)
630
644
  return { valid: false, reason: messages.ERR_COMMENT_UPDATE_EDIT_SIGNATURE_IS_INVALID };
631
645
  }
632
- if (update.cid !== comment.cid)
633
- return { valid: false, reason: messages.ERR_COMMENT_UPDATE_DIFFERENT_CID_THAN_COMMENT };
634
646
  if ("replies" in update && update.replies && validatePages) {
635
647
  // Validate update.replies
636
648
  const replyPageKeys = keys(update.replies.pages);