@hashgraphonline/standards-sdk 0.1.141 → 0.1.143-feat-adapter-registry.canary.fb173dc.54
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 +24 -1
- package/dist/cjs/hcs-11/client.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/validation/schemas.d.ts +8 -8
- package/dist/cjs/hcs-16/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-17/types.d.ts.map +1 -1
- package/dist/cjs/hcs-20/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-20/types.d.ts +9 -8
- package/dist/cjs/hcs-20/types.d.ts.map +1 -1
- package/dist/cjs/hcs-21/base-client.d.ts +14 -12
- package/dist/cjs/hcs-21/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-21/browser.d.ts +17 -7
- package/dist/cjs/hcs-21/browser.d.ts.map +1 -1
- package/dist/cjs/hcs-21/index.d.ts +1 -0
- package/dist/cjs/hcs-21/index.d.ts.map +1 -1
- package/dist/cjs/hcs-21/sdk.d.ts +70 -6
- package/dist/cjs/hcs-21/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-21/tx.d.ts +6 -2
- package/dist/cjs/hcs-21/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-21/types.d.ts +751 -66
- package/dist/cjs/hcs-21/types.d.ts.map +1 -1
- package/dist/cjs/hcs-21/verify.d.ts +6 -0
- package/dist/cjs/hcs-21/verify.d.ts.map +1 -0
- package/dist/cjs/inscribe/inscriber.d.ts +3 -1
- package/dist/cjs/inscribe/inscriber.d.ts.map +1 -1
- package/dist/cjs/inscribe/quote-cache.d.ts.map +1 -1
- package/dist/cjs/inscribe/types.d.ts +7 -0
- package/dist/cjs/inscribe/types.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/adapters.d.ts +20 -0
- package/dist/cjs/services/registry-broker/client/adapters.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/agents.d.ts +16 -0
- package/dist/cjs/services/registry-broker/client/agents.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/base-client.d.ts +57 -0
- package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/chat-history.d.ts +23 -0
- package/dist/cjs/services/registry-broker/client/chat-history.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/chat.d.ts +33 -0
- package/dist/cjs/services/registry-broker/client/chat.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/credits.d.ts +40 -0
- package/dist/cjs/services/registry-broker/client/credits.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/encrypted-chat-manager.d.ts +35 -0
- package/dist/cjs/services/registry-broker/client/encrypted-chat-manager.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/encryption.d.ts +33 -0
- package/dist/cjs/services/registry-broker/client/encryption.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/errors.d.ts +19 -0
- package/dist/cjs/services/registry-broker/client/errors.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/ledger-auth.d.ts +10 -0
- package/dist/cjs/services/registry-broker/client/ledger-auth.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/search.d.ts +19 -0
- package/dist/cjs/services/registry-broker/client/search.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client/utils.d.ts +21 -0
- package/dist/cjs/services/registry-broker/client/utils.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/client.d.ts +2 -204
- package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/schemas.d.ts +1473 -177
- package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/types.d.ts +45 -3
- package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
- package/dist/cjs/services/types.d.ts +1 -0
- package/dist/cjs/services/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/dynamic-import.d.ts +1 -0
- package/dist/cjs/utils/dynamic-import.d.ts.map +1 -1
- package/dist/es/hcs-11/client.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/validation/schemas.d.ts +8 -8
- package/dist/es/hcs-16/base-client.d.ts.map +1 -1
- package/dist/es/hcs-17/types.d.ts.map +1 -1
- package/dist/es/hcs-20/sdk.d.ts.map +1 -1
- package/dist/es/hcs-20/types.d.ts +9 -8
- package/dist/es/hcs-20/types.d.ts.map +1 -1
- package/dist/es/hcs-21/base-client.d.ts +14 -12
- package/dist/es/hcs-21/base-client.d.ts.map +1 -1
- package/dist/es/hcs-21/browser.d.ts +17 -7
- package/dist/es/hcs-21/browser.d.ts.map +1 -1
- package/dist/es/hcs-21/index.d.ts +1 -0
- package/dist/es/hcs-21/index.d.ts.map +1 -1
- package/dist/es/hcs-21/sdk.d.ts +70 -6
- package/dist/es/hcs-21/sdk.d.ts.map +1 -1
- package/dist/es/hcs-21/tx.d.ts +6 -2
- package/dist/es/hcs-21/tx.d.ts.map +1 -1
- package/dist/es/hcs-21/types.d.ts +751 -66
- package/dist/es/hcs-21/types.d.ts.map +1 -1
- package/dist/es/hcs-21/verify.d.ts +6 -0
- package/dist/es/hcs-21/verify.d.ts.map +1 -0
- package/dist/es/inscribe/inscriber.d.ts +3 -1
- package/dist/es/inscribe/inscriber.d.ts.map +1 -1
- package/dist/es/inscribe/quote-cache.d.ts.map +1 -1
- package/dist/es/inscribe/types.d.ts +7 -0
- package/dist/es/inscribe/types.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/adapters.d.ts +20 -0
- package/dist/es/services/registry-broker/client/adapters.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/agents.d.ts +16 -0
- package/dist/es/services/registry-broker/client/agents.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/base-client.d.ts +57 -0
- package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/chat-history.d.ts +23 -0
- package/dist/es/services/registry-broker/client/chat-history.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/chat.d.ts +33 -0
- package/dist/es/services/registry-broker/client/chat.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/credits.d.ts +40 -0
- package/dist/es/services/registry-broker/client/credits.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/encrypted-chat-manager.d.ts +35 -0
- package/dist/es/services/registry-broker/client/encrypted-chat-manager.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/encryption.d.ts +33 -0
- package/dist/es/services/registry-broker/client/encryption.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/errors.d.ts +19 -0
- package/dist/es/services/registry-broker/client/errors.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/ledger-auth.d.ts +10 -0
- package/dist/es/services/registry-broker/client/ledger-auth.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/search.d.ts +19 -0
- package/dist/es/services/registry-broker/client/search.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client/utils.d.ts +21 -0
- package/dist/es/services/registry-broker/client/utils.d.ts.map +1 -0
- package/dist/es/services/registry-broker/client.d.ts +2 -204
- package/dist/es/services/registry-broker/client.d.ts.map +1 -1
- package/dist/es/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/es/services/registry-broker/schemas.d.ts +1473 -177
- package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/es/services/registry-broker/types.d.ts +45 -3
- package/dist/es/services/registry-broker/types.d.ts.map +1 -1
- package/dist/es/services/types.d.ts +1 -0
- package/dist/es/services/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +73 -51
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es10.js +2 -2
- package/dist/es/standards-sdk.es100.js +26 -229
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +228 -109
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +94 -15
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +30 -80
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +80 -27
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +25 -136
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +140 -27
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +27 -20
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +18 -156
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +148 -196
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +167 -747
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +786 -9
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +13 -567
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +541 -576
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +601 -12
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +13 -2
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +2 -83
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +80 -36
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +39 -2
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +2 -223
- package/dist/es/standards-sdk.es119.js.map +1 -1
- package/dist/es/standards-sdk.es12.js +1 -1
- package/dist/es/standards-sdk.es120.js +193 -1110
- package/dist/es/standards-sdk.es120.js.map +1 -1
- package/dist/es/standards-sdk.es121.js +1059 -225
- package/dist/es/standards-sdk.es121.js.map +1 -1
- package/dist/es/standards-sdk.es122.js +303 -419
- package/dist/es/standards-sdk.es122.js.map +1 -1
- package/dist/es/standards-sdk.es123.js +418 -351
- package/dist/es/standards-sdk.es123.js.map +1 -1
- package/dist/es/standards-sdk.es124.js +348 -754
- package/dist/es/standards-sdk.es124.js.map +1 -1
- package/dist/es/standards-sdk.es125.js +854 -178
- package/dist/es/standards-sdk.es125.js.map +1 -1
- package/dist/es/standards-sdk.es126.js +153 -1512
- package/dist/es/standards-sdk.es126.js.map +1 -1
- package/dist/es/standards-sdk.es127.js +1373 -1977
- package/dist/es/standards-sdk.es127.js.map +1 -1
- package/dist/es/standards-sdk.es128.js +176 -51
- package/dist/es/standards-sdk.es128.js.map +1 -1
- package/dist/es/standards-sdk.es129.js +196 -76
- package/dist/es/standards-sdk.es129.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +1 -1
- package/dist/es/standards-sdk.es130.js +98 -153
- package/dist/es/standards-sdk.es130.js.map +1 -1
- package/dist/es/standards-sdk.es131.js +122 -8
- package/dist/es/standards-sdk.es131.js.map +1 -1
- package/dist/es/standards-sdk.es132.js +234 -73
- package/dist/es/standards-sdk.es132.js.map +1 -1
- package/dist/es/standards-sdk.es133.js +171 -56
- package/dist/es/standards-sdk.es133.js.map +1 -1
- package/dist/es/standards-sdk.es134.js +123 -29
- package/dist/es/standards-sdk.es134.js.map +1 -1
- package/dist/es/standards-sdk.es135.js +313 -125
- package/dist/es/standards-sdk.es135.js.map +1 -1
- package/dist/es/standards-sdk.es136.js +358 -34
- package/dist/es/standards-sdk.es136.js.map +1 -1
- package/dist/es/standards-sdk.es137.js +17 -732
- package/dist/es/standards-sdk.es137.js.map +1 -1
- package/dist/es/standards-sdk.es138.js +65 -12264
- package/dist/es/standards-sdk.es138.js.map +1 -1
- package/dist/es/standards-sdk.es139.js +86 -16
- package/dist/es/standards-sdk.es139.js.map +1 -1
- package/dist/es/standards-sdk.es14.js +1 -1
- package/dist/es/standards-sdk.es140.js +152 -49
- package/dist/es/standards-sdk.es140.js.map +1 -1
- package/dist/es/standards-sdk.es141.js +7 -64
- package/dist/es/standards-sdk.es141.js.map +1 -1
- package/dist/es/standards-sdk.es142.js +71 -157
- package/dist/es/standards-sdk.es142.js.map +1 -1
- package/dist/es/standards-sdk.es143.js +49 -306
- package/dist/es/standards-sdk.es143.js.map +1 -1
- package/dist/es/standards-sdk.es144.js +28 -346
- package/dist/es/standards-sdk.es144.js.map +1 -1
- package/dist/es/standards-sdk.es145.js +112 -427
- package/dist/es/standards-sdk.es145.js.map +1 -1
- package/dist/es/standards-sdk.es146.js +40 -329
- package/dist/es/standards-sdk.es146.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +12277 -66
- package/dist/es/standards-sdk.es147.js.map +1 -1
- package/dist/es/standards-sdk.es148.js +20 -0
- package/dist/es/standards-sdk.es148.js.map +1 -0
- package/dist/es/standards-sdk.es149.js +59 -0
- package/dist/es/standards-sdk.es149.js.map +1 -0
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es150.js +85 -0
- package/dist/es/standards-sdk.es150.js.map +1 -0
- package/dist/es/standards-sdk.es151.js +175 -0
- package/dist/es/standards-sdk.es151.js.map +1 -0
- package/dist/es/standards-sdk.es152.js +325 -0
- package/dist/es/standards-sdk.es152.js.map +1 -0
- package/dist/es/standards-sdk.es153.js +349 -0
- package/dist/es/standards-sdk.es153.js.map +1 -0
- package/dist/es/standards-sdk.es154.js +456 -0
- package/dist/es/standards-sdk.es154.js.map +1 -0
- package/dist/es/standards-sdk.es155.js +334 -0
- package/dist/es/standards-sdk.es155.js.map +1 -0
- package/dist/es/standards-sdk.es156.js +79 -0
- package/dist/es/standards-sdk.es156.js.map +1 -0
- package/dist/es/standards-sdk.es157.js +874 -0
- package/dist/es/standards-sdk.es157.js.map +1 -0
- package/dist/es/standards-sdk.es158.js +242 -0
- package/dist/es/standards-sdk.es158.js.map +1 -0
- package/dist/es/standards-sdk.es159.js +247 -0
- package/dist/es/standards-sdk.es159.js.map +1 -0
- package/dist/es/standards-sdk.es16.js +1 -1
- package/dist/es/standards-sdk.es17.js +13 -11
- package/dist/es/standards-sdk.es17.js.map +1 -1
- package/dist/es/standards-sdk.es19.js +20 -17
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +17 -14
- package/dist/es/standards-sdk.es20.js.map +1 -1
- package/dist/es/standards-sdk.es21.js +1 -1
- package/dist/es/standards-sdk.es22.js +1 -1
- package/dist/es/standards-sdk.es23.js +1 -1
- package/dist/es/standards-sdk.es24.js +1 -1
- package/dist/es/standards-sdk.es25.js +1 -1
- package/dist/es/standards-sdk.es26.js +1 -1
- package/dist/es/standards-sdk.es27.js +1 -1
- package/dist/es/standards-sdk.es28.js +24 -19
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es3.js +2 -2
- package/dist/es/standards-sdk.es31.js +2 -2
- package/dist/es/standards-sdk.es32.js +4 -4
- package/dist/es/standards-sdk.es33.js +1 -1
- package/dist/es/standards-sdk.es36.js +16 -13
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +4 -4
- package/dist/es/standards-sdk.es38.js +2 -2
- package/dist/es/standards-sdk.es39.js +2 -2
- package/dist/es/standards-sdk.es40.js +1 -1
- package/dist/es/standards-sdk.es41.js +1 -1
- package/dist/es/standards-sdk.es42.js +2 -2
- package/dist/es/standards-sdk.es47.js +1 -1
- package/dist/es/standards-sdk.es5.js +2 -2
- package/dist/es/standards-sdk.es52.js +1 -1
- package/dist/es/standards-sdk.es54.js +1 -1
- package/dist/es/standards-sdk.es57.js +2 -2
- package/dist/es/standards-sdk.es59.js +1 -1
- package/dist/es/standards-sdk.es6.js +2 -2
- package/dist/es/standards-sdk.es60.js +1 -1
- package/dist/es/standards-sdk.es61.js +15 -12
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +1 -1
- package/dist/es/standards-sdk.es65.js +2 -2
- package/dist/es/standards-sdk.es66.js +3 -3
- package/dist/es/standards-sdk.es69.js +2 -2
- package/dist/es/standards-sdk.es7.js +2 -2
- package/dist/es/standards-sdk.es70.js +3 -3
- package/dist/es/standards-sdk.es71.js +2 -2
- package/dist/es/standards-sdk.es72.js +1 -1
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +2 -2
- package/dist/es/standards-sdk.es77.js +5 -3
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +12 -11
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +1 -1
- package/dist/es/standards-sdk.es8.js +1 -1
- package/dist/es/standards-sdk.es80.js +113 -29
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +23 -4
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +39 -14
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +198 -17
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +256 -9
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +55 -21
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +22 -75
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +45 -30
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +57 -22
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es90.js +28 -23
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +23 -167
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +158 -119
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +68 -95
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +136 -119
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +139 -39
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +42 -257
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +243 -80
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +47 -48
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +100 -28
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/dynamic-import.d.ts +1 -0
- package/dist/es/utils/dynamic-import.d.ts.map +1 -1
- package/package.json +6 -10
|
@@ -1,175 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const data = {};
|
|
8
|
-
if (body.memo) {
|
|
9
|
-
data.memo = body.memo;
|
|
10
|
-
}
|
|
11
|
-
data.adminKey = parseKey(body.adminKey);
|
|
12
|
-
data.submitKey = parseKey(body.submitKey);
|
|
13
|
-
if (body.autoRenewPeriod?.seconds) {
|
|
14
|
-
data.autoRenewPeriod = Long.fromValue(
|
|
15
|
-
body.autoRenewPeriod.seconds
|
|
16
|
-
).toString();
|
|
17
|
-
}
|
|
18
|
-
if (body.autoRenewAccount) {
|
|
19
|
-
data.autoRenewAccountId = new AccountId(
|
|
20
|
-
body.autoRenewAccount.shardNum ?? 0,
|
|
21
|
-
body.autoRenewAccount.realmNum ?? 0,
|
|
22
|
-
body.autoRenewAccount.accountNum ?? 0
|
|
23
|
-
).toString();
|
|
24
|
-
}
|
|
25
|
-
return data;
|
|
1
|
+
import { Logger } from "./standards-sdk.es106.js";
|
|
2
|
+
class ContentResolverRegistryImpl {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.resolver = null;
|
|
5
|
+
this.onUnavailableCallbacks = [];
|
|
6
|
+
this.logger = Logger.getInstance({ module: "ContentResolverRegistry" });
|
|
26
7
|
}
|
|
27
|
-
static
|
|
28
|
-
if (!
|
|
29
|
-
|
|
30
|
-
if (body.topicID) {
|
|
31
|
-
data.topicId = `${body.topicID.shardNum ?? 0}.${body.topicID.realmNum ?? 0}.${body.topicID.topicNum ?? 0}`;
|
|
8
|
+
static getInstance() {
|
|
9
|
+
if (!ContentResolverRegistryImpl._instance) {
|
|
10
|
+
ContentResolverRegistryImpl._instance = new ContentResolverRegistryImpl();
|
|
32
11
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
data.messageEncoding = "utf8";
|
|
42
|
-
}
|
|
12
|
+
return ContentResolverRegistryImpl._instance;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Register a content resolver (typically called by ContentStoreManager)
|
|
16
|
+
*/
|
|
17
|
+
register(resolver) {
|
|
18
|
+
if (this.resolver) {
|
|
19
|
+
this.logger.warn("Resolver already registered, replacing existing");
|
|
43
20
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
21
|
+
this.resolver = resolver;
|
|
22
|
+
this.logger.info("Content resolver registered");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the registered content resolver
|
|
26
|
+
*/
|
|
27
|
+
getResolver() {
|
|
28
|
+
return this.resolver;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Check if a resolver is available
|
|
32
|
+
*/
|
|
33
|
+
isAvailable() {
|
|
34
|
+
return this.resolver !== null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Unregister the current resolver
|
|
38
|
+
*/
|
|
39
|
+
unregister() {
|
|
40
|
+
if (this.resolver) {
|
|
41
|
+
this.resolver = null;
|
|
42
|
+
this.logger.info("Content resolver unregistered");
|
|
43
|
+
this.onUnavailableCallbacks.forEach((callback) => {
|
|
44
|
+
try {
|
|
45
|
+
callback();
|
|
46
|
+
} catch (error) {
|
|
47
|
+
this.logger.error("Error in unavailable callback:", error);
|
|
50
48
|
}
|
|
51
|
-
}
|
|
52
|
-
if (body.chunkInfo.number !== void 0 && body.chunkInfo.number !== null) {
|
|
53
|
-
data.chunkInfoNumber = body.chunkInfo.number;
|
|
54
|
-
}
|
|
55
|
-
if (body.chunkInfo.total !== void 0 && body.chunkInfo.total !== null) {
|
|
56
|
-
data.chunkInfoTotal = body.chunkInfo.total;
|
|
57
|
-
}
|
|
49
|
+
});
|
|
58
50
|
}
|
|
59
|
-
return data;
|
|
60
51
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
if (body.memo?.value !== void 0) {
|
|
68
|
-
data.memo = body.memo.value;
|
|
69
|
-
}
|
|
70
|
-
if (body.adminKey === null) {
|
|
71
|
-
data.clearAdminKey = true;
|
|
72
|
-
data.adminKey = void 0;
|
|
73
|
-
} else if (body.adminKey) {
|
|
74
|
-
data.adminKey = parseKey(body.adminKey);
|
|
75
|
-
} else {
|
|
76
|
-
data.adminKey = void 0;
|
|
77
|
-
}
|
|
78
|
-
if (body.submitKey === null) {
|
|
79
|
-
data.clearSubmitKey = true;
|
|
80
|
-
data.submitKey = void 0;
|
|
81
|
-
} else if (body.submitKey) {
|
|
82
|
-
data.submitKey = parseKey(body.submitKey);
|
|
83
|
-
} else {
|
|
84
|
-
data.submitKey = void 0;
|
|
85
|
-
}
|
|
86
|
-
if (body.autoRenewPeriod?.seconds) {
|
|
87
|
-
data.autoRenewPeriod = Long.fromValue(
|
|
88
|
-
body.autoRenewPeriod.seconds
|
|
89
|
-
).toString();
|
|
90
|
-
}
|
|
91
|
-
if (body.autoRenewAccount) {
|
|
92
|
-
data.autoRenewAccountId = new AccountId(
|
|
93
|
-
body.autoRenewAccount.shardNum ?? 0,
|
|
94
|
-
body.autoRenewAccount.realmNum ?? 0,
|
|
95
|
-
body.autoRenewAccount.accountNum ?? 0
|
|
96
|
-
).toString();
|
|
97
|
-
}
|
|
98
|
-
return data;
|
|
52
|
+
/**
|
|
53
|
+
* Register callback for when resolver becomes unavailable
|
|
54
|
+
*/
|
|
55
|
+
onUnavailable(callback) {
|
|
56
|
+
this.onUnavailableCallbacks.push(callback);
|
|
99
57
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Remove unavailable callback
|
|
60
|
+
*/
|
|
61
|
+
offUnavailable(callback) {
|
|
62
|
+
const index = this.onUnavailableCallbacks.indexOf(callback);
|
|
63
|
+
if (index !== -1) {
|
|
64
|
+
this.onUnavailableCallbacks.splice(index, 1);
|
|
105
65
|
}
|
|
106
|
-
return data;
|
|
107
66
|
}
|
|
108
67
|
/**
|
|
109
|
-
*
|
|
110
|
-
* This is the unified entry point that handles both protobuf and internal field extraction
|
|
68
|
+
* Execute operation with resolver or fallback
|
|
111
69
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const consensusCreateTopic = this.parseConsensusCreateTopic(
|
|
120
|
-
transactionBody.consensusCreateTopic
|
|
121
|
-
);
|
|
122
|
-
if (consensusCreateTopic) {
|
|
123
|
-
return {
|
|
124
|
-
type: "TOPICCREATE",
|
|
125
|
-
humanReadableType: "Topic Create",
|
|
126
|
-
consensusCreateTopic
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (transactionBody.consensusSubmitMessage) {
|
|
131
|
-
const consensusSubmitMessage = this.parseConsensusSubmitMessage(
|
|
132
|
-
transactionBody.consensusSubmitMessage
|
|
133
|
-
);
|
|
134
|
-
if (consensusSubmitMessage) {
|
|
135
|
-
return {
|
|
136
|
-
type: "CONSENSUSSUBMITMESSAGE",
|
|
137
|
-
humanReadableType: "Submit Message",
|
|
138
|
-
consensusSubmitMessage
|
|
139
|
-
};
|
|
140
|
-
}
|
|
70
|
+
async withResolver(operation, fallback) {
|
|
71
|
+
if (this.resolver) {
|
|
72
|
+
try {
|
|
73
|
+
return await operation(this.resolver);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
this.logger.warn("Resolver operation failed, using fallback:", error);
|
|
76
|
+
return await fallback();
|
|
141
77
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
);
|
|
146
|
-
if (consensusUpdateTopic) {
|
|
147
|
-
return {
|
|
148
|
-
type: "TOPICUPDATE",
|
|
149
|
-
humanReadableType: "Topic Update",
|
|
150
|
-
consensusUpdateTopic
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (transactionBody.consensusDeleteTopic) {
|
|
155
|
-
const consensusDeleteTopic = this.parseConsensusDeleteTopic(
|
|
156
|
-
transactionBody.consensusDeleteTopic
|
|
157
|
-
);
|
|
158
|
-
if (consensusDeleteTopic) {
|
|
159
|
-
return {
|
|
160
|
-
type: "TOPICDELETE",
|
|
161
|
-
humanReadableType: "Topic Delete",
|
|
162
|
-
consensusDeleteTopic
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return {};
|
|
167
|
-
} catch (error) {
|
|
168
|
-
return {};
|
|
78
|
+
} else {
|
|
79
|
+
this.logger.warn("No resolver available, using fallback");
|
|
80
|
+
return await fallback();
|
|
169
81
|
}
|
|
170
82
|
}
|
|
171
83
|
}
|
|
84
|
+
const ContentResolverRegistry = ContentResolverRegistryImpl.getInstance();
|
|
172
85
|
export {
|
|
173
|
-
|
|
86
|
+
ContentResolverRegistry,
|
|
87
|
+
ContentResolverRegistryImpl
|
|
174
88
|
};
|
|
175
89
|
//# sourceMappingURL=standards-sdk.es142.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es142.js","sources":["../../src/utils/parsers/hcs-parser.ts"],"sourcesContent":["import { proto } from '@hashgraph/proto';\nimport { AccountId, Long, Transaction } from '@hashgraph/sdk';\nimport {\n ConsensusCreateTopicData,\n ConsensusSubmitMessageData,\n ConsensusUpdateTopicData,\n ConsensusDeleteTopicData,\n} from '../transaction-parser-types';\nimport { parseKey } from './parser-utils';\nimport { Buffer } from 'buffer';\n\nexport class HCSParser {\n static parseConsensusCreateTopic(\n body: proto.IConsensusCreateTopicTransactionBody,\n ): ConsensusCreateTopicData | undefined {\n if (!body) return undefined;\n const data: ConsensusCreateTopicData = {};\n if (body.memo) {\n data.memo = body.memo;\n }\n data.adminKey = parseKey(body.adminKey);\n data.submitKey = parseKey(body.submitKey);\n if (body.autoRenewPeriod?.seconds) {\n data.autoRenewPeriod = Long.fromValue(\n body.autoRenewPeriod.seconds,\n ).toString();\n }\n if (body.autoRenewAccount) {\n data.autoRenewAccountId = new AccountId(\n body.autoRenewAccount.shardNum ?? 0,\n body.autoRenewAccount.realmNum ?? 0,\n body.autoRenewAccount.accountNum ?? 0,\n ).toString();\n }\n return data;\n }\n\n static parseConsensusSubmitMessage(\n body: proto.IConsensusSubmitMessageTransactionBody,\n ): ConsensusSubmitMessageData | undefined {\n if (!body) return undefined;\n const data: ConsensusSubmitMessageData = {};\n if (body.topicID) {\n data.topicId = `${body.topicID.shardNum ?? 0}.${\n body.topicID.realmNum ?? 0\n }.${body.topicID.topicNum ?? 0}`;\n }\n if (body.message?.length > 0) {\n const messageBuffer = Buffer.from(body.message);\n const utf8String = messageBuffer.toString('utf8');\n if (\n /[\\x00-\\x08\\x0B\\x0E-\\x1F\\x7F]/.test(utf8String) ||\n utf8String.includes('\\uFFFD')\n ) {\n data.message = messageBuffer.toString('base64');\n data.messageEncoding = 'base64';\n } else {\n data.message = utf8String;\n data.messageEncoding = 'utf8';\n }\n }\n if (body.chunkInfo) {\n if (body.chunkInfo.initialTransactionID) {\n const txId = body.chunkInfo.initialTransactionID.accountID;\n const taValidStart =\n body.chunkInfo.initialTransactionID.transactionValidStart;\n if (txId && taValidStart) {\n data.chunkInfoInitialTransactionID = `${txId.shardNum ?? 0}.${\n txId.realmNum ?? 0\n }.${txId.accountNum ?? 0}@${taValidStart.seconds ?? 0}.${\n taValidStart.nanos ?? 0\n }`;\n }\n }\n if (\n body.chunkInfo.number !== undefined &&\n body.chunkInfo.number !== null\n ) {\n data.chunkInfoNumber = body.chunkInfo.number;\n }\n if (body.chunkInfo.total !== undefined && body.chunkInfo.total !== null) {\n data.chunkInfoTotal = body.chunkInfo.total;\n }\n }\n return data;\n }\n\n static parseConsensusUpdateTopic(\n body: proto.IConsensusUpdateTopicTransactionBody,\n ): ConsensusUpdateTopicData | undefined {\n if (!body) return undefined;\n const data: ConsensusUpdateTopicData = {};\n if (body.topicID) {\n data.topicId = `${body.topicID.shardNum}.${body.topicID.realmNum}.${body.topicID.topicNum}`;\n }\n if (body.memo?.value !== undefined) {\n data.memo = body.memo.value;\n }\n if (body.adminKey === null) {\n data.clearAdminKey = true;\n data.adminKey = undefined;\n } else if (body.adminKey) {\n data.adminKey = parseKey(body.adminKey);\n } else {\n data.adminKey = undefined;\n }\n if (body.submitKey === null) {\n data.clearSubmitKey = true;\n data.submitKey = undefined;\n } else if (body.submitKey) {\n data.submitKey = parseKey(body.submitKey);\n } else {\n data.submitKey = undefined;\n }\n if (body.autoRenewPeriod?.seconds) {\n data.autoRenewPeriod = Long.fromValue(\n body.autoRenewPeriod.seconds,\n ).toString();\n }\n if (body.autoRenewAccount) {\n data.autoRenewAccountId = new AccountId(\n body.autoRenewAccount.shardNum ?? 0,\n body.autoRenewAccount.realmNum ?? 0,\n body.autoRenewAccount.accountNum ?? 0,\n ).toString();\n }\n return data;\n }\n\n static parseConsensusDeleteTopic(\n body: proto.IConsensusDeleteTopicTransactionBody,\n ): ConsensusDeleteTopicData | undefined {\n if (!body) return undefined;\n const data: ConsensusDeleteTopicData = {};\n if (body.topicID) {\n data.topicId = `${body.topicID.shardNum}.${body.topicID.realmNum ?? 0}.${\n body.topicID.topicNum ?? 0\n }`;\n }\n return data;\n }\n\n /**\n * Parse HCS transaction from Transaction object with comprehensive extraction\n * This is the unified entry point that handles both protobuf and internal field extraction\n */\n static parseFromTransactionObject(transaction: Transaction): {\n type?: string;\n humanReadableType?: string;\n [key: string]: unknown;\n } {\n try {\n const transactionBody = (\n transaction as unknown as { _transactionBody?: unknown }\n )._transactionBody as proto.ITransactionBody | undefined;\n\n if (!transactionBody) {\n return {};\n }\n\n if (transactionBody.consensusCreateTopic) {\n const consensusCreateTopic = this.parseConsensusCreateTopic(\n transactionBody.consensusCreateTopic,\n );\n if (consensusCreateTopic) {\n return {\n type: 'TOPICCREATE',\n humanReadableType: 'Topic Create',\n consensusCreateTopic,\n };\n }\n }\n\n if (transactionBody.consensusSubmitMessage) {\n const consensusSubmitMessage = this.parseConsensusSubmitMessage(\n transactionBody.consensusSubmitMessage,\n );\n if (consensusSubmitMessage) {\n return {\n type: 'CONSENSUSSUBMITMESSAGE',\n humanReadableType: 'Submit Message',\n consensusSubmitMessage,\n };\n }\n }\n\n if (transactionBody.consensusUpdateTopic) {\n const consensusUpdateTopic = this.parseConsensusUpdateTopic(\n transactionBody.consensusUpdateTopic,\n );\n if (consensusUpdateTopic) {\n return {\n type: 'TOPICUPDATE',\n humanReadableType: 'Topic Update',\n consensusUpdateTopic,\n };\n }\n }\n\n if (transactionBody.consensusDeleteTopic) {\n const consensusDeleteTopic = this.parseConsensusDeleteTopic(\n transactionBody.consensusDeleteTopic,\n );\n if (consensusDeleteTopic) {\n return {\n type: 'TOPICDELETE',\n humanReadableType: 'Topic Delete',\n consensusDeleteTopic,\n };\n }\n }\n\n return {};\n } catch (error) {\n return {};\n }\n }\n}\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"standards-sdk.es142.js","sources":["../../src/content-store/ContentResolverRegistry.ts"],"sourcesContent":["/**\n * Content Resolver Registry\n *\n * Dependency injection registry for content resolvers.\n * Allows tools to access content resolution without circular dependencies.\n */\n\nimport type { ContentResolverInterface } from './types';\nimport { Logger } from '../utils/logger';\n\nexport class ContentResolverRegistryImpl {\n private static _instance: ContentResolverRegistryImpl;\n private resolver: ContentResolverInterface | null = null;\n private onUnavailableCallbacks: (() => void)[] = [];\n private logger = Logger.getInstance({ module: 'ContentResolverRegistry' });\n\n static getInstance(): ContentResolverRegistryImpl {\n if (!ContentResolverRegistryImpl._instance) {\n ContentResolverRegistryImpl._instance = new ContentResolverRegistryImpl();\n }\n return ContentResolverRegistryImpl._instance;\n }\n\n /**\n * Register a content resolver (typically called by ContentStoreManager)\n */\n register(resolver: ContentResolverInterface): void {\n if (this.resolver) {\n this.logger.warn('Resolver already registered, replacing existing');\n }\n this.resolver = resolver;\n this.logger.info('Content resolver registered');\n }\n\n /**\n * Get the registered content resolver\n */\n getResolver(): ContentResolverInterface | null {\n return this.resolver;\n }\n\n /**\n * Check if a resolver is available\n */\n isAvailable(): boolean {\n return this.resolver !== null;\n }\n\n /**\n * Unregister the current resolver\n */\n unregister(): void {\n if (this.resolver) {\n this.resolver = null;\n this.logger.info('Content resolver unregistered');\n this.onUnavailableCallbacks.forEach(callback => {\n try {\n callback();\n } catch (error) {\n this.logger.error('Error in unavailable callback:', error);\n }\n });\n }\n }\n\n /**\n * Register callback for when resolver becomes unavailable\n */\n onUnavailable(callback: () => void): void {\n this.onUnavailableCallbacks.push(callback);\n }\n\n /**\n * Remove unavailable callback\n */\n offUnavailable(callback: () => void): void {\n const index = this.onUnavailableCallbacks.indexOf(callback);\n if (index !== -1) {\n this.onUnavailableCallbacks.splice(index, 1);\n }\n }\n\n /**\n * Execute operation with resolver or fallback\n */\n async withResolver<T>(\n operation: (resolver: ContentResolverInterface) => Promise<T>,\n fallback: () => Promise<T>,\n ): Promise<T> {\n if (this.resolver) {\n try {\n return await operation(this.resolver);\n } catch (error) {\n this.logger.warn('Resolver operation failed, using fallback:', error);\n return await fallback();\n }\n } else {\n this.logger.warn('No resolver available, using fallback');\n return await fallback();\n }\n }\n}\n\nexport const ContentResolverRegistry =\n ContentResolverRegistryImpl.getInstance();\n"],"names":[],"mappings":";AAUO,MAAM,4BAA4B;AAAA,EAAlC,cAAA;AAEL,SAAQ,WAA4C;AACpD,SAAQ,yBAAyC,CAAA;AACjD,SAAQ,SAAS,OAAO,YAAY,EAAE,QAAQ,2BAA2B;AAAA,EAAA;AAAA,EAEzE,OAAO,cAA2C;AAChD,QAAI,CAAC,4BAA4B,WAAW;AAC1C,kCAA4B,YAAY,IAAI,4BAAA;AAAA,IAC9C;AACA,WAAO,4BAA4B;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,UAA0C;AACjD,QAAI,KAAK,UAAU;AACjB,WAAK,OAAO,KAAK,iDAAiD;AAAA,IACpE;AACA,SAAK,WAAW;AAChB,SAAK,OAAO,KAAK,6BAA6B;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA,EAKA,cAA+C;AAC7C,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,cAAuB;AACrB,WAAO,KAAK,aAAa;AAAA,EAC3B;AAAA;AAAA;AAAA;AAAA,EAKA,aAAmB;AACjB,QAAI,KAAK,UAAU;AACjB,WAAK,WAAW;AAChB,WAAK,OAAO,KAAK,+BAA+B;AAChD,WAAK,uBAAuB,QAAQ,CAAA,aAAY;AAC9C,YAAI;AACF,mBAAA;AAAA,QACF,SAAS,OAAO;AACd,eAAK,OAAO,MAAM,kCAAkC,KAAK;AAAA,QAC3D;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,cAAc,UAA4B;AACxC,SAAK,uBAAuB,KAAK,QAAQ;AAAA,EAC3C;AAAA;AAAA;AAAA;AAAA,EAKA,eAAe,UAA4B;AACzC,UAAM,QAAQ,KAAK,uBAAuB,QAAQ,QAAQ;AAC1D,QAAI,UAAU,IAAI;AAChB,WAAK,uBAAuB,OAAO,OAAO,CAAC;AAAA,IAC7C;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,WACA,UACY;AACZ,QAAI,KAAK,UAAU;AACjB,UAAI;AACF,eAAO,MAAM,UAAU,KAAK,QAAQ;AAAA,MACtC,SAAS,OAAO;AACd,aAAK,OAAO,KAAK,8CAA8C,KAAK;AACpE,eAAO,MAAM,SAAA;AAAA,MACf;AAAA,IACF,OAAO;AACL,WAAK,OAAO,KAAK,uCAAuC;AACxD,aAAO,MAAM,SAAA;AAAA,IACf;AAAA,EACF;AACF;AAEO,MAAM,0BACX,4BAA4B,YAAA;"}
|
|
@@ -1,325 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
if (originalBytes || transaction.toBytes) {
|
|
13
|
-
try {
|
|
14
|
-
const bytesToParse = originalBytes || transaction.toBytes();
|
|
15
|
-
const decoded = proto.TransactionList.decode(bytesToParse);
|
|
16
|
-
if (decoded.transactionList && decoded.transactionList.length > 0) {
|
|
17
|
-
const tx = decoded.transactionList[0];
|
|
18
|
-
let txBody = null;
|
|
19
|
-
if (tx.bodyBytes && tx.bodyBytes.length > 0) {
|
|
20
|
-
txBody = proto.TransactionBody.decode(tx.bodyBytes);
|
|
21
|
-
} else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
|
|
22
|
-
const signedTx = proto.SignedTransaction.decode(
|
|
23
|
-
tx.signedTransactionBytes
|
|
24
|
-
);
|
|
25
|
-
if (signedTx.bodyBytes) {
|
|
26
|
-
txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (txBody) {
|
|
30
|
-
const protoResult = this.parseFromProtobufTxBody(txBody);
|
|
31
|
-
if (protoResult.type && protoResult.type !== "UNKNOWN") {
|
|
32
|
-
return protoResult;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
} catch (protoError) {
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return this.parseFromTransactionInternals(transaction);
|
|
40
|
-
} catch (error) {
|
|
41
|
-
return { type: "UNKNOWN", humanReadableType: "Unknown File Transaction" };
|
|
1
|
+
import { Logger } from "./standards-sdk.es106.js";
|
|
2
|
+
const REFERENCE_THRESHOLD = 50 * 1024;
|
|
3
|
+
class ContentStoreServiceImpl {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.contentStore = null;
|
|
6
|
+
this.logger = Logger.getInstance({ module: "ContentStoreService" });
|
|
7
|
+
}
|
|
8
|
+
static getInstance() {
|
|
9
|
+
if (!ContentStoreServiceImpl._instance) {
|
|
10
|
+
ContentStoreServiceImpl._instance = new ContentStoreServiceImpl();
|
|
42
11
|
}
|
|
12
|
+
return ContentStoreServiceImpl._instance;
|
|
43
13
|
}
|
|
44
14
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Handles all file operations from decoded protobuf data
|
|
15
|
+
* Set the content store instance
|
|
47
16
|
*/
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
if (fileCreate) {
|
|
52
|
-
return {
|
|
53
|
-
type: "FILECREATE",
|
|
54
|
-
humanReadableType: "File Create",
|
|
55
|
-
fileCreate
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (txBody.fileAppend) {
|
|
60
|
-
const fileAppend = this.parseFileAppend(txBody.fileAppend);
|
|
61
|
-
if (fileAppend) {
|
|
62
|
-
return {
|
|
63
|
-
type: "FILEAPPEND",
|
|
64
|
-
humanReadableType: "File Append",
|
|
65
|
-
fileAppend
|
|
66
|
-
};
|
|
67
|
-
}
|
|
17
|
+
async setInstance(store) {
|
|
18
|
+
if (this.contentStore) {
|
|
19
|
+
this.logger.warn("Content store already set, replacing");
|
|
68
20
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (fileUpdate) {
|
|
72
|
-
return {
|
|
73
|
-
type: "FILEUPDATE",
|
|
74
|
-
humanReadableType: "File Update",
|
|
75
|
-
fileUpdate
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (txBody.fileDelete) {
|
|
80
|
-
const fileDelete = this.parseFileDelete(txBody.fileDelete);
|
|
81
|
-
if (fileDelete) {
|
|
82
|
-
return {
|
|
83
|
-
type: "FILEDELETE",
|
|
84
|
-
humanReadableType: "File Delete",
|
|
85
|
-
fileDelete
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return {};
|
|
21
|
+
this.contentStore = store;
|
|
22
|
+
this.logger.info("Content store instance set");
|
|
90
23
|
}
|
|
91
24
|
/**
|
|
92
|
-
*
|
|
93
|
-
* This handles cases where data is stored in Transaction object internals
|
|
25
|
+
* Get the content store instance
|
|
94
26
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const tx = transaction;
|
|
98
|
-
if (hasTransactionType(transaction, "fileCreate")) {
|
|
99
|
-
const fileCreate = {};
|
|
100
|
-
if (tx._contents) {
|
|
101
|
-
const contentInfo = this.analyzeContent(tx._contents);
|
|
102
|
-
fileCreate.contents = contentInfo.encoded;
|
|
103
|
-
if (contentInfo.contentType) {
|
|
104
|
-
fileCreate.contentType = contentInfo.contentType;
|
|
105
|
-
}
|
|
106
|
-
if (contentInfo.size) {
|
|
107
|
-
fileCreate.contentSize = contentInfo.size;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (tx._keys && tx._keys.length > 0) {
|
|
111
|
-
const keyList = {
|
|
112
|
-
keys: tx._keys
|
|
113
|
-
};
|
|
114
|
-
fileCreate.keys = parseKey({ keyList });
|
|
115
|
-
}
|
|
116
|
-
if (tx._expirationTime) {
|
|
117
|
-
fileCreate.expirationTime = tx._expirationTime.toString();
|
|
118
|
-
}
|
|
119
|
-
if (tx._memo) {
|
|
120
|
-
fileCreate.memo = tx._memo;
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
type: "FILECREATE",
|
|
124
|
-
humanReadableType: "File Create",
|
|
125
|
-
fileCreate
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
if (hasTransactionType(transaction, "fileAppend")) {
|
|
129
|
-
const fileAppend = {
|
|
130
|
-
fileId: tx._fileId.toString()
|
|
131
|
-
};
|
|
132
|
-
if (tx._contents) {
|
|
133
|
-
const contentInfo = this.analyzeContent(tx._contents);
|
|
134
|
-
fileAppend.contents = contentInfo.encoded;
|
|
135
|
-
if (contentInfo.size) {
|
|
136
|
-
fileAppend.contentSize = contentInfo.size;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return {
|
|
140
|
-
type: "FILEAPPEND",
|
|
141
|
-
humanReadableType: "File Append",
|
|
142
|
-
fileAppend
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
if (hasTransactionType(transaction, "fileUpdate")) {
|
|
146
|
-
const fileUpdate = {
|
|
147
|
-
fileId: tx._fileId.toString()
|
|
148
|
-
};
|
|
149
|
-
if (tx._contents) {
|
|
150
|
-
const contentInfo = this.analyzeContent(tx._contents);
|
|
151
|
-
fileUpdate.contents = contentInfo.encoded;
|
|
152
|
-
if (contentInfo.size) {
|
|
153
|
-
fileUpdate.contentSize = contentInfo.size;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (tx._keys && tx._keys.length > 0) {
|
|
157
|
-
const keyList = {
|
|
158
|
-
keys: tx._keys
|
|
159
|
-
};
|
|
160
|
-
fileUpdate.keys = parseKey({ keyList });
|
|
161
|
-
}
|
|
162
|
-
if (tx._expirationTime) {
|
|
163
|
-
fileUpdate.expirationTime = tx._expirationTime.toString();
|
|
164
|
-
}
|
|
165
|
-
if (tx._memo) {
|
|
166
|
-
fileUpdate.memo = tx._memo;
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
type: "FILEUPDATE",
|
|
170
|
-
humanReadableType: "File Update",
|
|
171
|
-
fileUpdate
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
if (hasTransactionType(transaction, "fileDelete")) {
|
|
175
|
-
const fileDelete = {
|
|
176
|
-
fileId: tx._fileId.toString()
|
|
177
|
-
};
|
|
178
|
-
return {
|
|
179
|
-
type: "FILEDELETE",
|
|
180
|
-
humanReadableType: "File Delete",
|
|
181
|
-
fileDelete
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
return {};
|
|
185
|
-
} catch (error) {
|
|
186
|
-
return {};
|
|
187
|
-
}
|
|
27
|
+
getInstance() {
|
|
28
|
+
return this.contentStore;
|
|
188
29
|
}
|
|
189
30
|
/**
|
|
190
|
-
*
|
|
31
|
+
* Clear the content store instance
|
|
191
32
|
*/
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
let contentType;
|
|
196
|
-
if (size >= 4) {
|
|
197
|
-
const header = contentBuffer.subarray(0, 4);
|
|
198
|
-
const headerHex = header.toString("hex");
|
|
199
|
-
const signatures = {
|
|
200
|
-
"89504e47": "image/png",
|
|
201
|
-
ffd8ffe0: "image/jpeg",
|
|
202
|
-
ffd8ffe1: "image/jpeg",
|
|
203
|
-
"47494638": "image/gif",
|
|
204
|
-
"25504446": "application/pdf",
|
|
205
|
-
"504b0304": "application/zip",
|
|
206
|
-
"7f454c46": "application/x-executable",
|
|
207
|
-
d0cf11e0: "application/msoffice"
|
|
208
|
-
};
|
|
209
|
-
contentType = signatures[headerHex.toLowerCase()];
|
|
210
|
-
}
|
|
211
|
-
if (!contentType) {
|
|
212
|
-
try {
|
|
213
|
-
const textContent = contentBuffer.toString("utf8");
|
|
214
|
-
const hasControlChars = /[\x00-\x08\x0B\x0E-\x1F\x7F]/.test(
|
|
215
|
-
textContent
|
|
216
|
-
);
|
|
217
|
-
const hasReplacementChars = textContent.includes("�");
|
|
218
|
-
if (!hasControlChars && !hasReplacementChars) {
|
|
219
|
-
if (textContent.trim().startsWith("{") && textContent.trim().endsWith("}")) {
|
|
220
|
-
contentType = "application/json";
|
|
221
|
-
} else if (textContent.includes("<?xml") || textContent.includes("<html")) {
|
|
222
|
-
contentType = "text/xml";
|
|
223
|
-
} else if (textContent.includes("<!DOCTYPE html")) {
|
|
224
|
-
contentType = "text/html";
|
|
225
|
-
} else {
|
|
226
|
-
contentType = "text/plain";
|
|
227
|
-
}
|
|
228
|
-
} else {
|
|
229
|
-
contentType = "application/octet-stream";
|
|
230
|
-
}
|
|
231
|
-
} catch {
|
|
232
|
-
contentType = "application/octet-stream";
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
let encoded;
|
|
236
|
-
if (contentType?.startsWith("text/") || contentType === "application/json") {
|
|
237
|
-
try {
|
|
238
|
-
encoded = contentBuffer.toString("utf8");
|
|
239
|
-
if (encoded.includes("�") || /[\x00-\x08\x0B\x0E-\x1F\x7F]/.test(encoded)) {
|
|
240
|
-
encoded = contentBuffer.toString("base64");
|
|
241
|
-
}
|
|
242
|
-
} catch {
|
|
243
|
-
encoded = contentBuffer.toString("base64");
|
|
244
|
-
}
|
|
245
|
-
} else {
|
|
246
|
-
encoded = contentBuffer.toString("base64");
|
|
247
|
-
}
|
|
248
|
-
return {
|
|
249
|
-
encoded,
|
|
250
|
-
contentType,
|
|
251
|
-
size
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
static parseFileCreate(body) {
|
|
255
|
-
if (!body) return void 0;
|
|
256
|
-
const data = {};
|
|
257
|
-
if (body.expirationTime?.seconds) {
|
|
258
|
-
data.expirationTime = `${Long.fromValue(
|
|
259
|
-
body.expirationTime.seconds
|
|
260
|
-
).toString()}.${body.expirationTime.nanos}`;
|
|
261
|
-
}
|
|
262
|
-
if (body.keys) {
|
|
263
|
-
data.keys = parseKey({ keyList: body.keys });
|
|
264
|
-
}
|
|
265
|
-
if (body.contents) {
|
|
266
|
-
data.contents = Buffer.from(body.contents).toString("base64");
|
|
267
|
-
}
|
|
268
|
-
if (body.memo) {
|
|
269
|
-
data.memo = body.memo;
|
|
270
|
-
}
|
|
271
|
-
return data;
|
|
272
|
-
}
|
|
273
|
-
static parseFileAppend(body) {
|
|
274
|
-
if (!body) return void 0;
|
|
275
|
-
const data = {};
|
|
276
|
-
if (body.fileID) {
|
|
277
|
-
data.fileId = `${body.fileID.shardNum ?? 0}.${body.fileID.realmNum ?? 0}.${body.fileID.fileNum ?? 0}`;
|
|
278
|
-
}
|
|
279
|
-
if (body.contents) {
|
|
280
|
-
data.contents = Buffer.from(body.contents).toString("base64");
|
|
281
|
-
}
|
|
282
|
-
return data;
|
|
283
|
-
}
|
|
284
|
-
static parseFileUpdate(body) {
|
|
285
|
-
if (!body) return void 0;
|
|
286
|
-
const data = {};
|
|
287
|
-
if (body.fileID) {
|
|
288
|
-
data.fileId = `${body.fileID.shardNum ?? 0}.${body.fileID.realmNum ?? 0}.${body.fileID.fileNum ?? 0}`;
|
|
289
|
-
}
|
|
290
|
-
if (body.expirationTime?.seconds) {
|
|
291
|
-
data.expirationTime = `${Long.fromValue(
|
|
292
|
-
body.expirationTime.seconds
|
|
293
|
-
).toString()}.${body.expirationTime.nanos}`;
|
|
294
|
-
}
|
|
295
|
-
if (body.keys) {
|
|
296
|
-
data.keys = parseKey({ keyList: body.keys });
|
|
297
|
-
}
|
|
298
|
-
if (body.contents) {
|
|
299
|
-
data.contents = Buffer.from(body.contents).toString("base64");
|
|
300
|
-
}
|
|
301
|
-
if (body.memo?.value !== void 0) {
|
|
302
|
-
data.memo = body.memo.value;
|
|
303
|
-
}
|
|
304
|
-
return data;
|
|
305
|
-
}
|
|
306
|
-
static parseFileDelete(body) {
|
|
307
|
-
if (!body) return void 0;
|
|
308
|
-
const data = {};
|
|
309
|
-
if (body.fileID) {
|
|
310
|
-
data.fileId = `${body.fileID.shardNum ?? 0}.${body.fileID.realmNum ?? 0}.${body.fileID.fileNum ?? 0}`;
|
|
311
|
-
}
|
|
312
|
-
return data;
|
|
33
|
+
dispose() {
|
|
34
|
+
this.contentStore = null;
|
|
35
|
+
this.logger.info("Content store disposed");
|
|
313
36
|
}
|
|
314
37
|
/**
|
|
315
|
-
*
|
|
316
|
-
* This is the unified entry point that delegates to the comprehensive parsing logic
|
|
38
|
+
* Check if content store is available
|
|
317
39
|
*/
|
|
318
|
-
|
|
319
|
-
return this.
|
|
40
|
+
isAvailable() {
|
|
41
|
+
return this.contentStore !== null;
|
|
320
42
|
}
|
|
321
43
|
}
|
|
44
|
+
function extractReferenceId(input) {
|
|
45
|
+
const trimmed = input.trim();
|
|
46
|
+
const exactMatch = trimmed.match(/^content-ref:([a-f0-9]+)$/);
|
|
47
|
+
if (exactMatch) {
|
|
48
|
+
return exactMatch[1];
|
|
49
|
+
}
|
|
50
|
+
const embeddedMatch = trimmed.match(/content-ref:([a-f0-9]+)/);
|
|
51
|
+
if (embeddedMatch) {
|
|
52
|
+
return embeddedMatch[1];
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
function shouldUseReference(content) {
|
|
57
|
+
const size = typeof content === "string" ? Buffer.byteLength(content, "utf8") : content.length;
|
|
58
|
+
return size > REFERENCE_THRESHOLD;
|
|
59
|
+
}
|
|
60
|
+
const ContentStoreService = ContentStoreServiceImpl.getInstance();
|
|
322
61
|
export {
|
|
323
|
-
|
|
62
|
+
ContentStoreService,
|
|
63
|
+
ContentStoreServiceImpl,
|
|
64
|
+
REFERENCE_THRESHOLD,
|
|
65
|
+
extractReferenceId,
|
|
66
|
+
shouldUseReference
|
|
324
67
|
};
|
|
325
68
|
//# sourceMappingURL=standards-sdk.es143.js.map
|