@hashgraphonline/standards-sdk 0.1.144 → 0.1.145
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/dist/cjs/hcs-10/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-10/sdk.d.ts +8 -0
- package/dist/cjs/hcs-10/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-11/client.d.ts +2 -2
- package/dist/cjs/hcs-11/client.d.ts.map +1 -1
- package/dist/cjs/hcs-11/person-builder.d.ts +1 -0
- package/dist/cjs/hcs-11/person-builder.d.ts.map +1 -1
- package/dist/cjs/hcs-11/types.d.ts +1 -0
- package/dist/cjs/hcs-11/types.d.ts.map +1 -1
- package/dist/cjs/hcs-12/rendering/resource-manager.d.ts.map +1 -1
- package/dist/cjs/hcs-14/issuers/hiero.d.ts.map +1 -1
- package/dist/cjs/hcs-15/browser.d.ts +2 -0
- package/dist/cjs/hcs-15/browser.d.ts.map +1 -1
- package/dist/cjs/hcs-15/sdk.d.ts +7 -1
- package/dist/cjs/hcs-15/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-15/tx.d.ts +4 -0
- package/dist/cjs/hcs-15/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-15/types.d.ts +16 -1
- package/dist/cjs/hcs-15/types.d.ts.map +1 -1
- package/dist/cjs/hcs-16/browser.d.ts +11 -2
- package/dist/cjs/hcs-16/browser.d.ts.map +1 -1
- package/dist/cjs/hcs-16/sdk.d.ts +62 -1
- package/dist/cjs/hcs-16/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-16/tx.d.ts +21 -3
- package/dist/cjs/hcs-16/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-17/base-client.d.ts +1 -0
- package/dist/cjs/hcs-17/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-17/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-17/tx.d.ts +2 -0
- package/dist/cjs/hcs-17/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-17/types.d.ts +4 -0
- package/dist/cjs/hcs-17/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/base-client.d.ts +14 -1
- package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/feedback.d.ts +2 -0
- package/dist/cjs/services/registry-broker/client/feedback.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/private-key-signer.d.ts +1 -0
- package/dist/cjs/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/schemas.d.ts +998 -577
- package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/types.d.ts +20 -1
- package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
- package/dist/cjs/standards-sdk.cjs +2 -2
- package/dist/cjs/standards-sdk.cjs.map +1 -1
- package/dist/cjs/utils/crypto-abstraction.d.ts.map +1 -1
- package/dist/cjs/utils/crypto-env.d.ts.map +1 -1
- package/dist/cjs/utils/dynamic-import.d.ts +5 -1
- package/dist/cjs/utils/dynamic-import.d.ts.map +1 -1
- package/dist/cjs/utils/hash-adapter.d.ts.map +1 -1
- package/dist/es/hcs-10/base-client.d.ts.map +1 -1
- package/dist/es/hcs-10/sdk.d.ts +8 -0
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/hcs-11/client.d.ts +2 -2
- package/dist/es/hcs-11/client.d.ts.map +1 -1
- package/dist/es/hcs-11/person-builder.d.ts +1 -0
- package/dist/es/hcs-11/person-builder.d.ts.map +1 -1
- package/dist/es/hcs-11/types.d.ts +1 -0
- package/dist/es/hcs-11/types.d.ts.map +1 -1
- package/dist/es/hcs-12/rendering/resource-manager.d.ts.map +1 -1
- package/dist/es/hcs-14/issuers/hiero.d.ts.map +1 -1
- package/dist/es/hcs-15/browser.d.ts +2 -0
- package/dist/es/hcs-15/browser.d.ts.map +1 -1
- package/dist/es/hcs-15/sdk.d.ts +7 -1
- package/dist/es/hcs-15/sdk.d.ts.map +1 -1
- package/dist/es/hcs-15/tx.d.ts +4 -0
- package/dist/es/hcs-15/tx.d.ts.map +1 -1
- package/dist/es/hcs-15/types.d.ts +16 -1
- package/dist/es/hcs-15/types.d.ts.map +1 -1
- package/dist/es/hcs-16/browser.d.ts +11 -2
- package/dist/es/hcs-16/browser.d.ts.map +1 -1
- package/dist/es/hcs-16/sdk.d.ts +62 -1
- package/dist/es/hcs-16/sdk.d.ts.map +1 -1
- package/dist/es/hcs-16/tx.d.ts +21 -3
- package/dist/es/hcs-16/tx.d.ts.map +1 -1
- package/dist/es/hcs-17/base-client.d.ts +1 -0
- package/dist/es/hcs-17/base-client.d.ts.map +1 -1
- package/dist/es/hcs-17/sdk.d.ts.map +1 -1
- package/dist/es/hcs-17/tx.d.ts +2 -0
- package/dist/es/hcs-17/tx.d.ts.map +1 -1
- package/dist/es/hcs-17/types.d.ts +4 -0
- package/dist/es/hcs-17/types.d.ts.map +1 -1
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/base-client.d.ts +14 -1
- package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/feedback.d.ts +2 -0
- package/dist/es/services/registry-broker/client/feedback.d.ts.map +1 -0
- package/dist/es/services/registry-broker/private-key-signer.d.ts +1 -0
- package/dist/es/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/es/services/registry-broker/schemas.d.ts +998 -577
- package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/es/services/registry-broker/types.d.ts +20 -1
- package/dist/es/services/registry-broker/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +141 -135
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es10.js +70 -90
- package/dist/es/standards-sdk.es10.js.map +1 -1
- package/dist/es/standards-sdk.es100.js +229 -26
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +109 -228
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +15 -94
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +80 -30
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +27 -80
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +136 -25
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +27 -140
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +20 -27
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +156 -18
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +198 -148
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es11.js +121 -45
- package/dist/es/standards-sdk.es11.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +747 -166
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +9 -786
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +567 -13
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +576 -541
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +12 -601
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +2 -13
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +87 -2
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +37 -80
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +2 -39
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +231 -2
- package/dist/es/standards-sdk.es119.js.map +1 -1
- package/dist/es/standards-sdk.es12.js +60 -159
- package/dist/es/standards-sdk.es12.js.map +1 -1
- package/dist/es/standards-sdk.es120.js +1110 -193
- package/dist/es/standards-sdk.es120.js.map +1 -1
- package/dist/es/standards-sdk.es121.js +225 -1059
- package/dist/es/standards-sdk.es121.js.map +1 -1
- package/dist/es/standards-sdk.es122.js +419 -303
- package/dist/es/standards-sdk.es122.js.map +1 -1
- package/dist/es/standards-sdk.es123.js +351 -418
- package/dist/es/standards-sdk.es123.js.map +1 -1
- package/dist/es/standards-sdk.es124.js +872 -347
- package/dist/es/standards-sdk.es124.js.map +1 -1
- package/dist/es/standards-sdk.es125.js +182 -854
- package/dist/es/standards-sdk.es125.js.map +1 -1
- package/dist/es/standards-sdk.es126.js +1512 -153
- package/dist/es/standards-sdk.es126.js.map +1 -1
- package/dist/es/standards-sdk.es127.js +157 -1547
- package/dist/es/standards-sdk.es127.js.map +1 -1
- package/dist/es/standards-sdk.es128.js +192 -162
- package/dist/es/standards-sdk.es128.js.map +1 -1
- package/dist/es/standards-sdk.es129.js +61 -164
- package/dist/es/standards-sdk.es129.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +200 -60
- package/dist/es/standards-sdk.es13.js.map +1 -1
- package/dist/es/standards-sdk.es130.js +102 -85
- package/dist/es/standards-sdk.es130.js.map +1 -1
- package/dist/es/standards-sdk.es131.js +222 -96
- package/dist/es/standards-sdk.es131.js.map +1 -1
- package/dist/es/standards-sdk.es132.js +153 -220
- package/dist/es/standards-sdk.es132.js.map +1 -1
- package/dist/es/standards-sdk.es133.js +104 -162
- package/dist/es/standards-sdk.es133.js.map +1 -1
- package/dist/es/standards-sdk.es134.js +296 -92
- package/dist/es/standards-sdk.es134.js.map +1 -1
- package/dist/es/standards-sdk.es135.js +432 -294
- package/dist/es/standards-sdk.es135.js.map +1 -1
- package/dist/es/standards-sdk.es136.js +14 -363
- package/dist/es/standards-sdk.es136.js.map +1 -1
- package/dist/es/standards-sdk.es137.js +79 -15
- package/dist/es/standards-sdk.es137.js.map +1 -1
- package/dist/es/standards-sdk.es138.js +79 -59
- package/dist/es/standards-sdk.es138.js.map +1 -1
- package/dist/es/standards-sdk.es139.js +152 -80
- package/dist/es/standards-sdk.es139.js.map +1 -1
- package/dist/es/standards-sdk.es14.js +149 -178
- package/dist/es/standards-sdk.es14.js.map +1 -1
- package/dist/es/standards-sdk.es140.js +7 -159
- package/dist/es/standards-sdk.es140.js.map +1 -1
- package/dist/es/standards-sdk.es141.js +86 -7
- package/dist/es/standards-sdk.es141.js.map +1 -1
- package/dist/es/standards-sdk.es142.js +44 -65
- package/dist/es/standards-sdk.es142.js.map +1 -1
- package/dist/es/standards-sdk.es143.js +30 -65
- package/dist/es/standards-sdk.es143.js.map +1 -1
- package/dist/es/standards-sdk.es144.js +34 -28
- package/dist/es/standards-sdk.es144.js.map +1 -1
- package/dist/es/standards-sdk.es145.js +28 -138
- package/dist/es/standards-sdk.es145.js.map +1 -1
- package/dist/es/standards-sdk.es146.js +133 -37
- package/dist/es/standards-sdk.es146.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +34 -12281
- package/dist/es/standards-sdk.es147.js.map +1 -1
- package/dist/es/standards-sdk.es148.js +12284 -12
- package/dist/es/standards-sdk.es148.js.map +1 -1
- package/dist/es/standards-sdk.es149.js +958 -56
- package/dist/es/standards-sdk.es149.js.map +1 -1
- package/dist/es/standards-sdk.es15.js +152 -151
- package/dist/es/standards-sdk.es15.js.map +1 -1
- package/dist/es/standards-sdk.es150.js +48 -74
- package/dist/es/standards-sdk.es150.js.map +1 -1
- package/dist/es/standards-sdk.es151.js +72 -160
- package/dist/es/standards-sdk.es151.js.map +1 -1
- package/dist/es/standards-sdk.es152.js +13 -318
- package/dist/es/standards-sdk.es152.js.map +1 -1
- package/dist/es/standards-sdk.es153.js +120 -294
- package/dist/es/standards-sdk.es153.js.map +1 -1
- package/dist/es/standards-sdk.es154.js +191 -322
- package/dist/es/standards-sdk.es154.js.map +1 -1
- package/dist/es/standards-sdk.es155.js +294 -279
- package/dist/es/standards-sdk.es155.js.map +1 -1
- package/dist/es/standards-sdk.es156.js +440 -63
- package/dist/es/standards-sdk.es156.js.map +1 -1
- package/dist/es/standards-sdk.es157.js +331 -871
- package/dist/es/standards-sdk.es157.js.map +1 -1
- package/dist/es/standards-sdk.es158.js +68 -231
- package/dist/es/standards-sdk.es158.js.map +1 -1
- package/dist/es/standards-sdk.es159.js +218 -223
- package/dist/es/standards-sdk.es159.js.map +1 -1
- package/dist/es/standards-sdk.es16.js +917 -136
- package/dist/es/standards-sdk.es16.js.map +1 -1
- package/dist/es/standards-sdk.es160.js +247 -0
- package/dist/es/standards-sdk.es160.js.map +1 -0
- package/dist/es/standards-sdk.es17.js +23 -944
- package/dist/es/standards-sdk.es17.js.map +1 -1
- package/dist/es/standards-sdk.es18.js +2422 -24
- package/dist/es/standards-sdk.es18.js.map +1 -1
- package/dist/es/standards-sdk.es19.js +817 -2071
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es2.js +654 -189
- package/dist/es/standards-sdk.es2.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +205 -1091
- package/dist/es/standards-sdk.es20.js.map +1 -1
- package/dist/es/standards-sdk.es21.js +858 -221
- package/dist/es/standards-sdk.es21.js.map +1 -1
- package/dist/es/standards-sdk.es22.js +179 -903
- package/dist/es/standards-sdk.es22.js.map +1 -1
- package/dist/es/standards-sdk.es23.js +164 -179
- package/dist/es/standards-sdk.es23.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +62 -118
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +377 -52
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +36 -394
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +901 -50
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +134 -902
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +7 -134
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es3.js +63 -680
- package/dist/es/standards-sdk.es3.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +344 -7
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +302 -287
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +94 -322
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +458 -101
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +132 -451
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +216 -130
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +273 -195
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +148 -87
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +183 -320
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +238 -161
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es4.js +425 -63
- package/dist/es/standards-sdk.es4.js.map +1 -1
- package/dist/es/standards-sdk.es40.js +136 -254
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +225 -176
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +199 -261
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +237 -199
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +209 -201
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +305 -201
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +371 -261
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +316 -371
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +404 -336
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +83 -449
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +232 -354
- package/dist/es/standards-sdk.es5.js.map +1 -1
- package/dist/es/standards-sdk.es50.js +179 -89
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +231 -165
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +25 -262
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +56 -26
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +12 -57
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +49 -12
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +115 -43
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +42 -115
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +52 -43
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +36 -50
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es6.js +125 -246
- package/dist/es/standards-sdk.es6.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +207 -39
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +24 -200
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +87 -25
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +3 -51
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +100 -3
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +61 -62
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +17 -98
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +77 -19
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +458 -77
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +106 -240
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +28 -183
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es70.js +170 -286
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +71 -207
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +71 -72
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +143 -71
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +62 -136
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +380 -45
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +222 -130
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +320 -444
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +88 -370
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +125 -89
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +80 -29
- package/dist/es/standards-sdk.es8.js.map +1 -1
- package/dist/es/standards-sdk.es80.js +8 -125
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +45 -6
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +98 -44
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +331 -84
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +93 -160
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +55 -275
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +43 -55
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +145 -22
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +34 -47
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +22 -57
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es9.js +104 -80
- package/dist/es/standards-sdk.es9.js.map +1 -1
- package/dist/es/standards-sdk.es90.js +23 -28
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +238 -23
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +265 -152
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +95 -68
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +124 -136
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +42 -138
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +259 -42
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +82 -243
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +48 -47
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +29 -100
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/crypto-abstraction.d.ts.map +1 -1
- package/dist/es/utils/crypto-env.d.ts.map +1 -1
- package/dist/es/utils/dynamic-import.d.ts +5 -1
- package/dist/es/utils/dynamic-import.d.ts.map +1 -1
- package/dist/es/utils/hash-adapter.d.ts.map +1 -1
- package/package.json +8 -7
- package/dist/cjs/patches/topic-autorenew-patch.d.ts +0 -2
- package/dist/cjs/patches/topic-autorenew-patch.d.ts.map +0 -1
- package/dist/es/patches/topic-autorenew-patch.d.ts +0 -2
- package/dist/es/patches/topic-autorenew-patch.d.ts.map +0 -1
|
@@ -1,432 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
class MCPServerBuilder {
|
|
1
|
+
import { Logger } from "./standards-sdk.es105.js";
|
|
2
|
+
class FloraBuilder {
|
|
4
3
|
constructor() {
|
|
5
4
|
this.config = {
|
|
6
|
-
|
|
5
|
+
version: "1.0",
|
|
6
|
+
type: 3
|
|
7
7
|
};
|
|
8
|
-
this.socials = [];
|
|
9
8
|
this.logger = Logger.getInstance({
|
|
10
|
-
module: "
|
|
9
|
+
module: "FloraBuilder"
|
|
11
10
|
});
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
* @param name The display name for the MCP server profile
|
|
17
|
-
*/
|
|
18
|
-
setName(name) {
|
|
19
|
-
this.config.name = name;
|
|
12
|
+
setDisplayName(displayName) {
|
|
13
|
+
this.config.display_name = displayName;
|
|
20
14
|
return this;
|
|
21
15
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Sets the alias for the MCP server
|
|
24
|
-
*
|
|
25
|
-
* @param alias Alternative identifier for the MCP server
|
|
26
|
-
*/
|
|
27
|
-
setAlias(alias) {
|
|
28
|
-
this.config.alias = alias;
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Sets the bio/description for the MCP server profile
|
|
33
|
-
*
|
|
34
|
-
* @param bio Brief description or biography for the MCP server
|
|
35
|
-
*/
|
|
36
16
|
setBio(bio) {
|
|
37
17
|
this.config.bio = bio;
|
|
38
18
|
return this;
|
|
39
19
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*/
|
|
43
|
-
setDescription(description) {
|
|
44
|
-
return this.setBio(description);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Sets the version of the MCP server
|
|
48
|
-
*
|
|
49
|
-
* @param version The MCP server version (e.g., "2024-06-01")
|
|
50
|
-
*/
|
|
51
|
-
setVersion(version) {
|
|
52
|
-
if (!this.config.mcpServer) {
|
|
53
|
-
this.config.mcpServer = {};
|
|
54
|
-
}
|
|
55
|
-
this.config.mcpServer.version = version;
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Sets the connection information for the MCP server
|
|
60
|
-
*
|
|
61
|
-
* @param url Base URL for the MCP server (e.g., "https://mcp.example.com")
|
|
62
|
-
* @param transport Transport type ("stdio" or "sse")
|
|
63
|
-
*/
|
|
64
|
-
setConnectionInfo(url, transport) {
|
|
65
|
-
if (!this.config.mcpServer) {
|
|
66
|
-
this.config.mcpServer = {};
|
|
67
|
-
}
|
|
68
|
-
const connectionInfo = {
|
|
69
|
-
url,
|
|
70
|
-
transport
|
|
71
|
-
};
|
|
72
|
-
this.config.mcpServer.connectionInfo = connectionInfo;
|
|
73
|
-
return this;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Sets the detailed description for the MCP server capabilities
|
|
77
|
-
*
|
|
78
|
-
* @param description Detailed description of server functionality
|
|
79
|
-
*/
|
|
80
|
-
setServerDescription(description) {
|
|
81
|
-
if (!this.config.mcpServer) {
|
|
82
|
-
this.config.mcpServer = {};
|
|
83
|
-
}
|
|
84
|
-
this.config.mcpServer.description = description;
|
|
85
|
-
return this;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Sets the services/capabilities provided by the MCP server
|
|
89
|
-
*
|
|
90
|
-
* @param services Array of service types offered by this MCP server
|
|
91
|
-
*/
|
|
92
|
-
setServices(services) {
|
|
93
|
-
if (!this.config.mcpServer) {
|
|
94
|
-
this.config.mcpServer = {};
|
|
95
|
-
}
|
|
96
|
-
this.config.mcpServer.services = services;
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Sets the minimum host version requirements
|
|
101
|
-
*
|
|
102
|
-
* @param minVersion Minimum host version required (e.g., "2024-11-05")
|
|
103
|
-
*/
|
|
104
|
-
setHostRequirements(minVersion) {
|
|
105
|
-
if (!this.config.mcpServer) {
|
|
106
|
-
this.config.mcpServer = {};
|
|
107
|
-
}
|
|
108
|
-
const hostInfo = {
|
|
109
|
-
minVersion
|
|
110
|
-
};
|
|
111
|
-
this.config.mcpServer.host = hostInfo;
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Sets the MCP capabilities supported by the server
|
|
116
|
-
*
|
|
117
|
-
* @param capabilities Array of capability strings (e.g., ["resources.get", "tools.invoke"])
|
|
118
|
-
*/
|
|
119
|
-
setCapabilities(capabilities) {
|
|
120
|
-
if (!this.config.mcpServer) {
|
|
121
|
-
this.config.mcpServer = {};
|
|
122
|
-
}
|
|
123
|
-
this.config.mcpServer.capabilities = capabilities;
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Adds a resource that the MCP server exposes
|
|
128
|
-
*
|
|
129
|
-
* @param name Resource name identifier (e.g., "hcs_topics")
|
|
130
|
-
* @param description Human-readable description of the resource
|
|
131
|
-
*/
|
|
132
|
-
addResource(name, description) {
|
|
133
|
-
if (!this.config.mcpServer) {
|
|
134
|
-
this.config.mcpServer = {};
|
|
135
|
-
}
|
|
136
|
-
if (!this.config.mcpServer.resources) {
|
|
137
|
-
this.config.mcpServer.resources = [];
|
|
138
|
-
}
|
|
139
|
-
const resource = {
|
|
140
|
-
name,
|
|
141
|
-
description
|
|
142
|
-
};
|
|
143
|
-
this.config.mcpServer.resources.push(resource);
|
|
144
|
-
return this;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Sets all resources the MCP server exposes (replaces existing resources)
|
|
148
|
-
*
|
|
149
|
-
* @param resources Array of resource objects with name and description
|
|
150
|
-
*/
|
|
151
|
-
setResources(resources) {
|
|
152
|
-
if (!this.config.mcpServer) {
|
|
153
|
-
this.config.mcpServer = {};
|
|
154
|
-
}
|
|
155
|
-
this.config.mcpServer.resources = resources;
|
|
156
|
-
return this;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Adds a tool that the MCP server provides
|
|
160
|
-
*
|
|
161
|
-
* @param name Tool name identifier (e.g., "topic_submit")
|
|
162
|
-
* @param description Human-readable description of what the tool does
|
|
163
|
-
*/
|
|
164
|
-
addTool(name, description) {
|
|
165
|
-
if (!this.config.mcpServer) {
|
|
166
|
-
this.config.mcpServer = {};
|
|
167
|
-
}
|
|
168
|
-
if (!this.config.mcpServer.tools) {
|
|
169
|
-
this.config.mcpServer.tools = [];
|
|
170
|
-
}
|
|
171
|
-
const tool = {
|
|
172
|
-
name,
|
|
173
|
-
description
|
|
174
|
-
};
|
|
175
|
-
this.config.mcpServer.tools.push(tool);
|
|
176
|
-
return this;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Sets all tools the MCP server provides (replaces existing tools)
|
|
180
|
-
*
|
|
181
|
-
* @param tools Array of tool objects with name and description
|
|
182
|
-
*/
|
|
183
|
-
setTools(tools) {
|
|
184
|
-
if (!this.config.mcpServer) {
|
|
185
|
-
this.config.mcpServer = {};
|
|
186
|
-
}
|
|
187
|
-
this.config.mcpServer.tools = tools;
|
|
20
|
+
setMembers(members) {
|
|
21
|
+
this.config.members = members;
|
|
188
22
|
return this;
|
|
189
23
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
*
|
|
193
|
-
* @param maintainer Organization or entity maintaining this MCP server
|
|
194
|
-
*/
|
|
195
|
-
setMaintainer(maintainer) {
|
|
196
|
-
if (!this.config.mcpServer) {
|
|
197
|
-
this.config.mcpServer = {};
|
|
198
|
-
}
|
|
199
|
-
this.config.mcpServer.maintainer = maintainer;
|
|
24
|
+
setThreshold(threshold) {
|
|
25
|
+
this.config.threshold = threshold;
|
|
200
26
|
return this;
|
|
201
27
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
*/
|
|
207
|
-
setRepository(repository) {
|
|
208
|
-
if (!this.config.mcpServer) {
|
|
209
|
-
this.config.mcpServer = {};
|
|
210
|
-
}
|
|
211
|
-
this.config.mcpServer.repository = repository;
|
|
28
|
+
setTopics(topics) {
|
|
29
|
+
this.config.topics = topics;
|
|
30
|
+
this.config.inboundTopicId = topics.communication;
|
|
31
|
+
this.config.outboundTopicId = topics.transaction;
|
|
212
32
|
return this;
|
|
213
33
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
*
|
|
217
|
-
* @param docs URL to server documentation
|
|
218
|
-
*/
|
|
219
|
-
setDocs(docs) {
|
|
220
|
-
if (!this.config.mcpServer) {
|
|
221
|
-
this.config.mcpServer = {};
|
|
222
|
-
}
|
|
223
|
-
this.config.mcpServer.docs = docs;
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Sets the verification information for the MCP server
|
|
228
|
-
*
|
|
229
|
-
* @param verification Complete verification object
|
|
230
|
-
*/
|
|
231
|
-
setVerification(verification) {
|
|
232
|
-
if (!this.config.mcpServer) {
|
|
233
|
-
this.config.mcpServer = {};
|
|
234
|
-
}
|
|
235
|
-
this.config.mcpServer.verification = verification;
|
|
236
|
-
return this;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Adds DNS-based verification of endpoint ownership
|
|
240
|
-
*
|
|
241
|
-
* For DNS verification, the MCP server owner must add a DNS TXT record to their domain with:
|
|
242
|
-
* - Name: By default, `_hedera` or a custom name specified in `dnsField` (automatically prefixed with `_`)
|
|
243
|
-
* - Value: Equal to their Hedera account ID (e.g., `0.0.12345678`)
|
|
244
|
-
*
|
|
245
|
-
* Example DNS record:
|
|
246
|
-
* ```
|
|
247
|
-
* _hedera.example.com. 3600 IN TXT "0.0.12345678"
|
|
248
|
-
* ```
|
|
249
|
-
*
|
|
250
|
-
* @param domain The fully qualified domain name to check (e.g., "example.com")
|
|
251
|
-
* @param dnsField Optional custom DNS TXT record name (defaults to "hedera")
|
|
252
|
-
*/
|
|
253
|
-
addVerificationDNS(domain, dnsField) {
|
|
254
|
-
if (!this.config.mcpServer) {
|
|
255
|
-
this.config.mcpServer = {};
|
|
256
|
-
}
|
|
257
|
-
const verification = {
|
|
258
|
-
type: VerificationType.DNS,
|
|
259
|
-
value: domain,
|
|
260
|
-
dns_field: dnsField
|
|
261
|
-
};
|
|
262
|
-
this.config.mcpServer.verification = verification;
|
|
263
|
-
return this;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Adds signature-based verification of endpoint ownership
|
|
267
|
-
*
|
|
268
|
-
* For signature verification:
|
|
269
|
-
* 1. The message to be signed must be the server URL exactly as it appears in the connectionInfo.url field
|
|
270
|
-
* 2. The signature must be created using the ED25519 key associated with the Hedera account
|
|
271
|
-
* 3. The signature must be encoded as a hexadecimal string with no `0x` prefix
|
|
272
|
-
*
|
|
273
|
-
* @param signature Hex-encoded ED25519 signature of the server URL
|
|
274
|
-
*/
|
|
275
|
-
addVerificationSignature(signature) {
|
|
276
|
-
if (!this.config.mcpServer) {
|
|
277
|
-
this.config.mcpServer = {};
|
|
278
|
-
}
|
|
279
|
-
const verification = {
|
|
280
|
-
type: VerificationType.SIGNATURE,
|
|
281
|
-
value: signature
|
|
282
|
-
};
|
|
283
|
-
this.config.mcpServer.verification = verification;
|
|
34
|
+
setPolicies(policies) {
|
|
35
|
+
this.config.policies = policies;
|
|
284
36
|
return this;
|
|
285
37
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
*
|
|
289
|
-
* For challenge verification:
|
|
290
|
-
* 1. The MCP server must expose an endpoint that responds to HTTP GET requests
|
|
291
|
-
* 2. The endpoint path defaults to "/hedera-verification" or can be customized with challengePath
|
|
292
|
-
* 3. The server must respond with a JSON object containing:
|
|
293
|
-
* ```json
|
|
294
|
-
* {
|
|
295
|
-
* "accountId": "0.0.12345678",
|
|
296
|
-
* "timestamp": 1620000000000,
|
|
297
|
-
* "signature": "a1b2c3d4e5f6..."
|
|
298
|
-
* }
|
|
299
|
-
* ```
|
|
300
|
-
* 4. The signature must be an ED25519 signature of the UTF-8 encoded string `{accountId}:{timestamp}`
|
|
301
|
-
*
|
|
302
|
-
* @param challengePath Optional custom challenge endpoint path (defaults to "hedera-verification")
|
|
303
|
-
*/
|
|
304
|
-
addVerificationChallenge(challengePath) {
|
|
305
|
-
if (!this.config.mcpServer) {
|
|
306
|
-
this.config.mcpServer = {};
|
|
307
|
-
}
|
|
308
|
-
const verification = {
|
|
309
|
-
type: VerificationType.CHALLENGE,
|
|
310
|
-
value: "",
|
|
311
|
-
challenge_path: challengePath
|
|
312
|
-
};
|
|
313
|
-
this.config.mcpServer.verification = verification;
|
|
38
|
+
setMetadata(metadata) {
|
|
39
|
+
this.config.metadata = metadata;
|
|
314
40
|
return this;
|
|
315
41
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
* @param platform Social media platform (e.g., "twitter", "github")
|
|
320
|
-
* @param handle Username on the platform (e.g., "@username", "username")
|
|
321
|
-
*/
|
|
322
|
-
addSocial(platform, handle) {
|
|
323
|
-
const existingSocial = this.socials.find((s) => s.platform === platform);
|
|
324
|
-
if (!existingSocial) {
|
|
325
|
-
const socialLink = {
|
|
326
|
-
platform,
|
|
327
|
-
handle
|
|
328
|
-
};
|
|
329
|
-
this.socials.push(socialLink);
|
|
330
|
-
} else {
|
|
331
|
-
existingSocial.handle = handle;
|
|
42
|
+
addMetadata(key, value) {
|
|
43
|
+
if (!this.config.metadata) {
|
|
44
|
+
this.config.metadata = {};
|
|
332
45
|
}
|
|
46
|
+
this.config.metadata[key] = value;
|
|
333
47
|
return this;
|
|
334
48
|
}
|
|
335
|
-
/**
|
|
336
|
-
* Sets all social media links for the profile (replaces existing links)
|
|
337
|
-
*
|
|
338
|
-
* @param socials Array of social media links
|
|
339
|
-
*/
|
|
340
|
-
setSocials(socials) {
|
|
341
|
-
this.socials = socials;
|
|
342
|
-
return this;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Sets the profile picture for the MCP server
|
|
346
|
-
*
|
|
347
|
-
* @param pfpBuffer Buffer containing the profile picture data
|
|
348
|
-
* @param pfpFileName Filename for the profile picture including extension
|
|
349
|
-
*/
|
|
350
|
-
setProfilePicture(pfpBuffer, pfpFileName) {
|
|
351
|
-
this.config.pfpBuffer = pfpBuffer;
|
|
352
|
-
this.config.pfpFileName = pfpFileName;
|
|
353
|
-
return this;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Sets a reference to an existing profile picture
|
|
357
|
-
*
|
|
358
|
-
* @param pfpTopicId Topic ID containing the profile picture (for reuse)
|
|
359
|
-
*/
|
|
360
|
-
setExistingProfilePicture(pfpTopicId) {
|
|
361
|
-
this.config.existingPfpTopicId = pfpTopicId;
|
|
362
|
-
return this;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Sets the network type (mainnet or testnet)
|
|
366
|
-
*
|
|
367
|
-
* @param network Network type ("mainnet" or "testnet")
|
|
368
|
-
*/
|
|
369
|
-
setNetworkType(network) {
|
|
370
|
-
this.config.network = network;
|
|
371
|
-
return this;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Sets an existing account to use for the MCP server
|
|
375
|
-
*
|
|
376
|
-
* @param accountId Hedera account ID (e.g., "0.0.12345678")
|
|
377
|
-
* @param privateKey ED25519 private key as a string
|
|
378
|
-
*/
|
|
379
|
-
setExistingAccount(accountId, privateKey) {
|
|
380
|
-
this.config.existingAccount = {
|
|
381
|
-
accountId,
|
|
382
|
-
privateKey
|
|
383
|
-
};
|
|
384
|
-
return this;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Builds and validates the MCP server configuration
|
|
388
|
-
*
|
|
389
|
-
* @returns Complete MCPServerConfig object ready for use
|
|
390
|
-
* @throws Error if required fields are missing
|
|
391
|
-
*/
|
|
392
49
|
build() {
|
|
393
|
-
if (!this.config.
|
|
394
|
-
throw new Error("
|
|
395
|
-
}
|
|
396
|
-
if (!this.config.network) {
|
|
397
|
-
throw new Error("Network type is required");
|
|
398
|
-
}
|
|
399
|
-
if (!this.config.mcpServer) {
|
|
400
|
-
throw new Error("MCP server details are required");
|
|
401
|
-
}
|
|
402
|
-
if (!this.config.mcpServer.version) {
|
|
403
|
-
throw new Error("MCP server version is required");
|
|
404
|
-
}
|
|
405
|
-
if (!this.config.mcpServer.connectionInfo) {
|
|
406
|
-
throw new Error("MCP server connection info is required");
|
|
50
|
+
if (!this.config.display_name) {
|
|
51
|
+
throw new Error("Flora display name is required");
|
|
407
52
|
}
|
|
408
|
-
if (!this.config.
|
|
409
|
-
throw new Error("
|
|
53
|
+
if (!this.config.members || this.config.members.length === 0) {
|
|
54
|
+
throw new Error("Flora must have at least one member");
|
|
410
55
|
}
|
|
411
|
-
if (!this.config.
|
|
412
|
-
throw new Error("
|
|
56
|
+
if (!this.config.threshold || this.config.threshold < 1) {
|
|
57
|
+
throw new Error("Flora threshold must be at least 1");
|
|
413
58
|
}
|
|
414
|
-
if (
|
|
415
|
-
|
|
59
|
+
if (this.config.threshold > this.config.members.length) {
|
|
60
|
+
throw new Error("Flora threshold cannot exceed number of members");
|
|
416
61
|
}
|
|
417
|
-
if (!this.config.
|
|
418
|
-
|
|
62
|
+
if (!this.config.topics) {
|
|
63
|
+
throw new Error("Flora topics are required");
|
|
419
64
|
}
|
|
420
|
-
if (this.
|
|
421
|
-
|
|
422
|
-
...this.config,
|
|
423
|
-
socials: this.socials
|
|
424
|
-
};
|
|
65
|
+
if (!this.config.inboundTopicId || !this.config.outboundTopicId) {
|
|
66
|
+
throw new Error("Flora inbound and outbound topic IDs are required");
|
|
425
67
|
}
|
|
426
68
|
return this.config;
|
|
427
69
|
}
|
|
428
70
|
}
|
|
429
71
|
export {
|
|
430
|
-
|
|
72
|
+
FloraBuilder
|
|
431
73
|
};
|
|
432
74
|
//# sourceMappingURL=standards-sdk.es26.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es26.js","sources":["../../src/hcs-11/mcp-server-builder.ts"],"sourcesContent":["import {\n MCPServerConfig,\n MCPServerDetails,\n MCPServerConnectionInfo,\n MCPServerVerification,\n MCPServerHost,\n MCPServerResource,\n MCPServerTool,\n MCPServerCapability,\n SocialPlatform,\n VerificationType,\n SocialLink,\n} from './types';\nimport { Logger, ILogger } from '../utils/logger';\nimport { NetworkType } from '../utils/types';\n\n/**\n * MCPServerBuilder is a builder class for creating MCP server configurations.\n * It provides a fluent interface for setting various properties of the MCP server.\n *\n * Example usage:\n * ```typescript\n * const mcpBuilder = new MCPServerBuilder();\n * mcpBuilder.setName('My MCP Server');\n * mcpBuilder.setServerDescription('This is my MCP server for AI integration');\n * mcpBuilder.setVersion('2024-06-01');\n * mcpBuilder.setConnectionInfo('https://mcp.example.com', 'sse');\n * mcpBuilder.setServices([MCPServerCapability.TOOL_PROVIDER, MCPServerCapability.API_INTEGRATION]);\n * mcpBuilder.setNetworkType('mainnet');\n * mcpBuilder.addVerificationDNS('example.com', 'mcp-verify');\n * const serverConfig = mcpBuilder.build();\n * ```\n */\nexport class MCPServerBuilder {\n private config: Partial<MCPServerConfig> = {\n mcpServer: {} as MCPServerDetails,\n };\n private socials: SocialLink[] = [];\n private logger: ILogger;\n\n constructor() {\n this.logger = Logger.getInstance({\n module: 'MCPServerBuilder',\n });\n }\n\n /**\n * Sets the display name of the MCP server\n *\n * @param name The display name for the MCP server profile\n */\n setName(name: string): this {\n this.config.name = name;\n return this;\n }\n\n /**\n * Sets the alias for the MCP server\n *\n * @param alias Alternative identifier for the MCP server\n */\n setAlias(alias: string): this {\n this.config.alias = alias;\n return this;\n }\n\n /**\n * Sets the bio/description for the MCP server profile\n *\n * @param bio Brief description or biography for the MCP server\n */\n setBio(bio: string): this {\n this.config.bio = bio;\n return this;\n }\n\n /**\n * @deprecated Use setBio instead\n */\n setDescription(description: string): this {\n return this.setBio(description);\n }\n\n /**\n * Sets the version of the MCP server\n *\n * @param version The MCP server version (e.g., \"2024-06-01\")\n */\n setVersion(version: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.version = version;\n return this;\n }\n\n /**\n * Sets the connection information for the MCP server\n *\n * @param url Base URL for the MCP server (e.g., \"https://mcp.example.com\")\n * @param transport Transport type (\"stdio\" or \"sse\")\n */\n setConnectionInfo(url: string, transport: 'stdio' | 'sse'): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n const connectionInfo: MCPServerConnectionInfo = {\n url,\n transport,\n };\n\n this.config.mcpServer.connectionInfo = connectionInfo;\n return this;\n }\n\n /**\n * Sets the detailed description for the MCP server capabilities\n *\n * @param description Detailed description of server functionality\n */\n setServerDescription(description: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.description = description;\n return this;\n }\n\n /**\n * Sets the services/capabilities provided by the MCP server\n *\n * @param services Array of service types offered by this MCP server\n */\n setServices(services: MCPServerCapability[]): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.services = services;\n return this;\n }\n\n /**\n * Sets the minimum host version requirements\n *\n * @param minVersion Minimum host version required (e.g., \"2024-11-05\")\n */\n setHostRequirements(minVersion?: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n const hostInfo: MCPServerHost = {\n minVersion,\n };\n\n this.config.mcpServer.host = hostInfo;\n return this;\n }\n\n /**\n * Sets the MCP capabilities supported by the server\n *\n * @param capabilities Array of capability strings (e.g., [\"resources.get\", \"tools.invoke\"])\n */\n setCapabilities(capabilities: string[]): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.capabilities = capabilities;\n return this;\n }\n\n /**\n * Adds a resource that the MCP server exposes\n *\n * @param name Resource name identifier (e.g., \"hcs_topics\")\n * @param description Human-readable description of the resource\n */\n addResource(name: string, description: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n if (!this.config.mcpServer.resources) {\n this.config.mcpServer.resources = [];\n }\n\n const resource: MCPServerResource = {\n name,\n description,\n };\n\n this.config.mcpServer.resources.push(resource);\n return this;\n }\n\n /**\n * Sets all resources the MCP server exposes (replaces existing resources)\n *\n * @param resources Array of resource objects with name and description\n */\n setResources(resources: MCPServerResource[]): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n this.config.mcpServer.resources = resources;\n return this;\n }\n\n /**\n * Adds a tool that the MCP server provides\n *\n * @param name Tool name identifier (e.g., \"topic_submit\")\n * @param description Human-readable description of what the tool does\n */\n addTool(name: string, description: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n if (!this.config.mcpServer.tools) {\n this.config.mcpServer.tools = [];\n }\n\n const tool: MCPServerTool = {\n name,\n description,\n };\n\n this.config.mcpServer.tools.push(tool);\n return this;\n }\n\n /**\n * Sets all tools the MCP server provides (replaces existing tools)\n *\n * @param tools Array of tool objects with name and description\n */\n setTools(tools: MCPServerTool[]): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n this.config.mcpServer.tools = tools;\n return this;\n }\n\n /**\n * Sets information about who maintains the MCP server\n *\n * @param maintainer Organization or entity maintaining this MCP server\n */\n setMaintainer(maintainer: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.maintainer = maintainer;\n return this;\n }\n\n /**\n * Sets the URL to the source code repository\n *\n * @param repository URL to source code repository\n */\n setRepository(repository: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.repository = repository;\n return this;\n }\n\n /**\n * Sets the URL to the server documentation\n *\n * @param docs URL to server documentation\n */\n setDocs(docs: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n this.config.mcpServer.docs = docs;\n return this;\n }\n\n /**\n * Sets the verification information for the MCP server\n *\n * @param verification Complete verification object\n */\n setVerification(verification: MCPServerVerification): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n this.config.mcpServer.verification = verification;\n return this;\n }\n\n /**\n * Adds DNS-based verification of endpoint ownership\n *\n * For DNS verification, the MCP server owner must add a DNS TXT record to their domain with:\n * - Name: By default, `_hedera` or a custom name specified in `dnsField` (automatically prefixed with `_`)\n * - Value: Equal to their Hedera account ID (e.g., `0.0.12345678`)\n *\n * Example DNS record:\n * ```\n * _hedera.example.com. 3600 IN TXT \"0.0.12345678\"\n * ```\n *\n * @param domain The fully qualified domain name to check (e.g., \"example.com\")\n * @param dnsField Optional custom DNS TXT record name (defaults to \"hedera\")\n */\n addVerificationDNS(domain: string, dnsField?: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n const verification: MCPServerVerification = {\n type: VerificationType.DNS,\n value: domain,\n dns_field: dnsField,\n };\n\n this.config.mcpServer.verification = verification;\n return this;\n }\n\n /**\n * Adds signature-based verification of endpoint ownership\n *\n * For signature verification:\n * 1. The message to be signed must be the server URL exactly as it appears in the connectionInfo.url field\n * 2. The signature must be created using the ED25519 key associated with the Hedera account\n * 3. The signature must be encoded as a hexadecimal string with no `0x` prefix\n *\n * @param signature Hex-encoded ED25519 signature of the server URL\n */\n addVerificationSignature(signature: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n const verification: MCPServerVerification = {\n type: VerificationType.SIGNATURE,\n value: signature,\n };\n\n this.config.mcpServer.verification = verification;\n return this;\n }\n\n /**\n * Adds challenge-based verification of endpoint ownership\n *\n * For challenge verification:\n * 1. The MCP server must expose an endpoint that responds to HTTP GET requests\n * 2. The endpoint path defaults to \"/hedera-verification\" or can be customized with challengePath\n * 3. The server must respond with a JSON object containing:\n * ```json\n * {\n * \"accountId\": \"0.0.12345678\",\n * \"timestamp\": 1620000000000,\n * \"signature\": \"a1b2c3d4e5f6...\"\n * }\n * ```\n * 4. The signature must be an ED25519 signature of the UTF-8 encoded string `{accountId}:{timestamp}`\n *\n * @param challengePath Optional custom challenge endpoint path (defaults to \"hedera-verification\")\n */\n addVerificationChallenge(challengePath?: string): this {\n if (!this.config.mcpServer) {\n this.config.mcpServer = {} as MCPServerDetails;\n }\n\n const verification: MCPServerVerification = {\n type: VerificationType.CHALLENGE,\n value: '',\n challenge_path: challengePath,\n };\n\n this.config.mcpServer.verification = verification;\n return this;\n }\n\n /**\n * Adds a social media link to the profile\n *\n * @param platform Social media platform (e.g., \"twitter\", \"github\")\n * @param handle Username on the platform (e.g., \"@username\", \"username\")\n */\n addSocial(platform: SocialPlatform, handle: string): this {\n const existingSocial = this.socials.find(s => s.platform === platform);\n\n if (!existingSocial) {\n const socialLink: SocialLink = {\n platform,\n handle,\n };\n\n this.socials.push(socialLink);\n } else {\n existingSocial.handle = handle;\n }\n\n return this;\n }\n\n /**\n * Sets all social media links for the profile (replaces existing links)\n *\n * @param socials Array of social media links\n */\n setSocials(socials: SocialLink[]): this {\n this.socials = socials;\n return this;\n }\n\n /**\n * Sets the profile picture for the MCP server\n *\n * @param pfpBuffer Buffer containing the profile picture data\n * @param pfpFileName Filename for the profile picture including extension\n */\n setProfilePicture(pfpBuffer: Buffer, pfpFileName: string): this {\n this.config.pfpBuffer = pfpBuffer;\n this.config.pfpFileName = pfpFileName;\n return this;\n }\n\n /**\n * Sets a reference to an existing profile picture\n *\n * @param pfpTopicId Topic ID containing the profile picture (for reuse)\n */\n setExistingProfilePicture(pfpTopicId: string): this {\n this.config.existingPfpTopicId = pfpTopicId;\n return this;\n }\n\n /**\n * Sets the network type (mainnet or testnet)\n *\n * @param network Network type (\"mainnet\" or \"testnet\")\n */\n setNetworkType(network: NetworkType): this {\n this.config.network = network;\n return this;\n }\n\n /**\n * Sets an existing account to use for the MCP server\n *\n * @param accountId Hedera account ID (e.g., \"0.0.12345678\")\n * @param privateKey ED25519 private key as a string\n */\n setExistingAccount(accountId: string, privateKey: string): this {\n this.config.existingAccount = {\n accountId,\n privateKey,\n };\n return this;\n }\n\n /**\n * Builds and validates the MCP server configuration\n *\n * @returns Complete MCPServerConfig object ready for use\n * @throws Error if required fields are missing\n */\n build(): MCPServerConfig {\n if (!this.config.name) {\n throw new Error('MCP server name is required');\n }\n\n if (!this.config.network) {\n throw new Error('Network type is required');\n }\n\n if (!this.config.mcpServer) {\n throw new Error('MCP server details are required');\n }\n\n if (!this.config.mcpServer.version) {\n throw new Error('MCP server version is required');\n }\n\n if (!this.config.mcpServer.connectionInfo) {\n throw new Error('MCP server connection info is required');\n }\n\n if (\n !this.config.mcpServer.services ||\n this.config.mcpServer.services.length === 0\n ) {\n throw new Error('At least one MCP service type is required');\n }\n\n if (!this.config.mcpServer.description) {\n throw new Error('MCP server description is required');\n }\n\n if (!this.config.bio) {\n this.logger.warn('No bio provided for MCP server profile');\n }\n\n if (!this.config.pfpBuffer && !this.config.existingPfpTopicId) {\n this.logger.warn('No profile picture provided or referenced');\n }\n\n if (this.socials.length > 0) {\n return {\n ...(this.config as MCPServerConfig),\n socials: this.socials,\n };\n }\n\n return this.config as MCPServerConfig;\n }\n}\n"],"names":[],"mappings":";;AAiCO,MAAM,iBAAiB;AAAA,EAO5B,cAAc;AANd,SAAQ,SAAmC;AAAA,MACzC,WAAW,CAAA;AAAA,IAAC;AAEd,SAAQ,UAAwB,CAAA;AAI9B,SAAK,S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OAAO,UAAU,aAAa;AACtC,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACtD;AAEA,QAAI,CAAC,KAAK,OAAO,KAAK;AACpB,WAAK,OAAO,KAAK,wCAAwC;AAAA,IAC3D;AAEA,QAAI,CAAC,KAAK,OAAO,aAAa,CAAC,KAAK,OAAO,oBAAoB;AAC7D,WAAK,OAAO,KAAK,2CAA2C;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,SAAS,GAAG;AAC3B,aAAO;AAAA,QACL,GAAI,KAAK;AAAA,QACT,SAAS,KAAK;AAAA,MAAA;AAAA,IAElB;AAEA,WAAO,KAAK;AAAA,EACd;AACF;"}
|
|
1
|
+
{"version":3,"file":"standards-sdk.es26.js","sources":["../../src/hcs-11/flora-builder.ts"],"sourcesContent":["import { FloraProfile, FloraMember } from '../hcs-16/types';\nimport { ILogger, Logger } from '../utils/logger';\nimport { NetworkType } from '../utils/types';\n\n/**\n * FloraBuilder is a builder class for creating Flora profile configurations.\n * It provides a fluent interface for setting various properties of the Flora.\n */\nexport class FloraBuilder {\n private config: Partial<FloraProfile> = {\n version: '1.0',\n type: 3,\n };\n private logger: ILogger;\n\n constructor() {\n this.logger = Logger.getInstance({\n module: 'FloraBuilder',\n });\n }\n\n setDisplayName(displayName: string): this {\n this.config.display_name = displayName;\n return this;\n }\n\n setBio(bio: string): this {\n this.config.bio = bio;\n return this;\n }\n\n setMembers(members: FloraMember[]): this {\n this.config.members = members;\n return this;\n }\n\n setThreshold(threshold: number): this {\n this.config.threshold = threshold;\n return this;\n }\n\n setTopics(topics: {\n communication: string;\n transaction: string;\n state: string;\n }): this {\n this.config.topics = topics;\n this.config.inboundTopicId = topics.communication;\n this.config.outboundTopicId = topics.transaction;\n return this;\n }\n\n setPolicies(policies?: Record<string, string>): this {\n this.config.policies = policies;\n return this;\n }\n\n setMetadata(metadata: Record<string, any>): this {\n this.config.metadata = metadata;\n return this;\n }\n\n addMetadata(key: string, value: any): this {\n if (!this.config.metadata) {\n this.config.metadata = {};\n }\n this.config.metadata[key] = value;\n return this;\n }\n\n build(): FloraProfile {\n if (!this.config.display_name) {\n throw new Error('Flora display name is required');\n }\n\n if (!this.config.members || this.config.members.length === 0) {\n throw new Error('Flora must have at least one member');\n }\n\n if (!this.config.threshold || this.config.threshold < 1) {\n throw new Error('Flora threshold must be at least 1');\n }\n\n if (this.config.threshold > this.config.members.length) {\n throw new Error('Flora threshold cannot exceed number of members');\n }\n\n if (!this.config.topics) {\n throw new Error('Flora topics are required');\n }\n\n if (!this.config.inboundTopicId || !this.config.outboundTopicId) {\n throw new Error('Flora inbound and outbound topic IDs are required');\n }\n\n return this.config as FloraProfile;\n }\n}\n"],"names":[],"mappings":";AAQO,MAAM,aAAa;AAAA,EAOxB,cAAc;AANd,SAAQ,SAAgC;AAAA,MACtC,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAKN,SAAK,SAAS,OAAO,YAAY;AAAA,MAC/B,QAAQ;AAAA,IAAA,CACT;AAAA,EACH;AAAA,EAEA,eAAe,aAA2B;AACxC,SAAK,OAAO,eAAe;AAC3B,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,KAAmB;AACxB,SAAK,OAAO,MAAM;AAClB,WAAO;AAAA,EACT;AAAA,EAEA,WAAW,SAA8B;AACvC,SAAK,OAAO,UAAU;AACtB,WAAO;AAAA,EACT;AAAA,EAEA,aAAa,WAAyB;AACpC,SAAK,OAAO,YAAY;AACxB,WAAO;AAAA,EACT;AAAA,EAEA,UAAU,QAID;AACP,SAAK,OAAO,SAAS;AACrB,SAAK,OAAO,iBAAiB,OAAO;AACpC,SAAK,OAAO,kBAAkB,OAAO;AACrC,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAyC;AACnD,SAAK,OAAO,WAAW;AACvB,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAqC;AAC/C,SAAK,OAAO,WAAW;AACvB,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,KAAa,OAAkB;AACzC,QAAI,CA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