@hashgraphonline/standards-sdk 0.1.144 → 0.1.146-feat-rb-inscriber.canary.5cd93f8.85
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/hcs-7/types.d.ts +4 -4
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/inscribe/inscriber.d.ts +89 -0
- package/dist/cjs/inscribe/inscriber.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/hol-chat-ops.d.ts +24 -0
- package/dist/cjs/services/registry-broker/hol-chat-ops.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/index.d.ts +1 -0
- package/dist/cjs/services/registry-broker/index.d.ts.map +1 -1
- 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 +1001 -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 +3 -3
- 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/hcs-7/types.d.ts +4 -4
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/inscribe/inscriber.d.ts +89 -0
- package/dist/es/inscribe/inscriber.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/hol-chat-ops.d.ts +24 -0
- package/dist/es/services/registry-broker/hol-chat-ops.d.ts.map +1 -0
- package/dist/es/services/registry-broker/index.d.ts +1 -0
- package/dist/es/services/registry-broker/index.d.ts.map +1 -1
- 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 +1001 -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 +146 -131
- 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 +1109 -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 +53 -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 +1 -1
- package/dist/es/standards-sdk.es142.js +1 -1
- package/dist/es/standards-sdk.es143.js +1 -1
- package/dist/es/standards-sdk.es144.js +30 -28
- package/dist/es/standards-sdk.es144.js.map +1 -1
- package/dist/es/standards-sdk.es145.js +34 -138
- package/dist/es/standards-sdk.es145.js.map +1 -1
- package/dist/es/standards-sdk.es146.js +28 -42
- package/dist/es/standards-sdk.es146.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +105 -12256
- package/dist/es/standards-sdk.es147.js.map +1 -1
- package/dist/es/standards-sdk.es148.js +40 -15
- package/dist/es/standards-sdk.es148.js.map +1 -1
- package/dist/es/standards-sdk.es149.js +959 -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 +12264 -57
- package/dist/es/standards-sdk.es150.js.map +1 -1
- package/dist/es/standards-sdk.es151.js +51 -167
- package/dist/es/standards-sdk.es151.js.map +1 -1
- package/dist/es/standards-sdk.es152.js +70 -308
- package/dist/es/standards-sdk.es152.js.map +1 -1
- package/dist/es/standards-sdk.es153.js +13 -342
- package/dist/es/standards-sdk.es153.js.map +1 -1
- package/dist/es/standards-sdk.es154.js +129 -410
- package/dist/es/standards-sdk.es154.js.map +1 -1
- package/dist/es/standards-sdk.es155.js +200 -209
- package/dist/es/standards-sdk.es155.js.map +1 -1
- package/dist/es/standards-sdk.es156.js +334 -64
- package/dist/es/standards-sdk.es156.js.map +1 -1
- package/dist/es/standards-sdk.es157.js +453 -871
- package/dist/es/standards-sdk.es157.js.map +1 -1
- package/dist/es/standards-sdk.es158.js +314 -222
- package/dist/es/standards-sdk.es158.js.map +1 -1
- package/dist/es/standards-sdk.es159.js +60 -228
- 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 +242 -0
- package/dist/es/standards-sdk.es160.js.map +1 -0
- package/dist/es/standards-sdk.es161.js +247 -0
- package/dist/es/standards-sdk.es161.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 +9 -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,175 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
2
|
+
const BASE = 58;
|
|
3
|
+
function base58Encode(bytes) {
|
|
4
|
+
if (bytes.length === 0) return "";
|
|
5
|
+
let zeros = 0;
|
|
6
|
+
while (zeros < bytes.length && bytes[zeros] === 0) zeros++;
|
|
7
|
+
if (zeros === bytes.length) return "1".repeat(zeros);
|
|
8
|
+
const digits = [0];
|
|
9
|
+
for (let i = zeros; i < bytes.length; i++) {
|
|
10
|
+
let carry = bytes[i];
|
|
11
|
+
for (let j = 0; j < digits.length; j++) {
|
|
12
|
+
const val = (digits[j] << 8) + carry;
|
|
13
|
+
digits[j] = val % BASE;
|
|
14
|
+
carry = val / BASE | 0;
|
|
15
|
+
}
|
|
16
|
+
while (carry > 0) {
|
|
17
|
+
digits.push(carry % BASE);
|
|
18
|
+
carry = carry / BASE | 0;
|
|
10
19
|
}
|
|
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;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
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
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
static parseConsensusUpdateTopic(body) {
|
|
62
|
-
if (!body) return void 0;
|
|
63
|
-
const data = {};
|
|
64
|
-
if (body.topicID) {
|
|
65
|
-
data.topicId = `${body.topicID.shardNum}.${body.topicID.realmNum}.${body.topicID.topicNum}`;
|
|
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;
|
|
99
|
-
}
|
|
100
|
-
static parseConsensusDeleteTopic(body) {
|
|
101
|
-
if (!body) return void 0;
|
|
102
|
-
const data = {};
|
|
103
|
-
if (body.topicID) {
|
|
104
|
-
data.topicId = `${body.topicID.shardNum}.${body.topicID.realmNum ?? 0}.${body.topicID.topicNum ?? 0}`;
|
|
105
|
-
}
|
|
106
|
-
return data;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Parse HCS transaction from Transaction object with comprehensive extraction
|
|
110
|
-
* This is the unified entry point that handles both protobuf and internal field extraction
|
|
111
|
-
*/
|
|
112
|
-
static parseFromTransactionObject(transaction) {
|
|
113
|
-
try {
|
|
114
|
-
const transactionBody = transaction._transactionBody;
|
|
115
|
-
if (!transactionBody) {
|
|
116
|
-
return {};
|
|
117
|
-
}
|
|
118
|
-
if (transactionBody.consensusCreateTopic) {
|
|
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
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (transactionBody.consensusUpdateTopic) {
|
|
143
|
-
const consensusUpdateTopic = this.parseConsensusUpdateTopic(
|
|
144
|
-
transactionBody.consensusUpdateTopic
|
|
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 {};
|
|
21
|
+
let result = "";
|
|
22
|
+
for (let i = 0; i < zeros; i++) result += "1";
|
|
23
|
+
for (let i = digits.length - 1; i >= 0; i--) result += ALPHABET[digits[i]];
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
function base58Decode(text) {
|
|
27
|
+
if (text.length === 0) return new Uint8Array(0);
|
|
28
|
+
let zeros = 0;
|
|
29
|
+
while (zeros < text.length && text[zeros] === "1") zeros++;
|
|
30
|
+
const b256 = [];
|
|
31
|
+
for (let i = zeros; i < text.length; i++) {
|
|
32
|
+
const ch = text[i];
|
|
33
|
+
const val = ALPHABET.indexOf(ch);
|
|
34
|
+
if (val === -1) throw new Error("Invalid Base58 character");
|
|
35
|
+
let carry = val;
|
|
36
|
+
for (let j = 0; j < b256.length; j++) {
|
|
37
|
+
const x = b256[j] * BASE + carry;
|
|
38
|
+
b256[j] = x & 255;
|
|
39
|
+
carry = x >> 8;
|
|
40
|
+
}
|
|
41
|
+
while (carry > 0) {
|
|
42
|
+
b256.push(carry & 255);
|
|
43
|
+
carry >>= 8;
|
|
169
44
|
}
|
|
170
45
|
}
|
|
46
|
+
for (let i = 0; i < zeros; i++) b256.push(0);
|
|
47
|
+
b256.reverse();
|
|
48
|
+
return Uint8Array.from(b256);
|
|
49
|
+
}
|
|
50
|
+
function multibaseB58btcDecode(zText) {
|
|
51
|
+
if (!zText.startsWith("z")) throw new Error("Invalid multibase base58btc");
|
|
52
|
+
return base58Decode(zText.slice(1));
|
|
171
53
|
}
|
|
172
54
|
export {
|
|
173
|
-
|
|
55
|
+
base58Decode,
|
|
56
|
+
base58Encode,
|
|
57
|
+
multibaseB58btcDecode
|
|
174
58
|
};
|
|
175
59
|
//# sourceMappingURL=standards-sdk.es151.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es151.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.es151.js","sources":["../../src/hcs-14/base58.ts"],"sourcesContent":["/**\n * Minimal Base58 encoder/decoder (Bitcoin alphabet) with no external dependencies.\n */\n\nconst ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\nconst BASE = 58;\n\nfunction countLeadingZeros(bytes: Uint8Array): number {\n let zeros = 0;\n for (let i = 0; i < bytes.length && bytes[i] === 0; i++) {\n zeros++;\n }\n return zeros;\n}\n\nexport function base58Encode(bytes: Uint8Array): string {\n if (bytes.length === 0) return '';\n\n let zeros = 0;\n while (zeros < bytes.length && bytes[zeros] === 0) zeros++;\n\n if (zeros === bytes.length) return '1'.repeat(zeros);\n\n const digits: number[] = [0];\n for (let i = zeros; i < bytes.length; i++) {\n let carry = bytes[i];\n for (let j = 0; j < digits.length; j++) {\n const val = (digits[j] << 8) + carry;\n digits[j] = val % BASE;\n carry = (val / BASE) | 0;\n }\n while (carry > 0) {\n digits.push(carry % BASE);\n carry = (carry / BASE) | 0;\n }\n }\n\n let result = '';\n for (let i = 0; i < zeros; i++) result += '1';\n for (let i = digits.length - 1; i >= 0; i--) result += ALPHABET[digits[i]];\n return result;\n}\n\nexport function base58Decode(text: string): Uint8Array {\n if (text.length === 0) return new Uint8Array(0);\n\n let zeros = 0;\n while (zeros < text.length && text[zeros] === '1') zeros++;\n\n const b256: number[] = [];\n for (let i = zeros; i < text.length; i++) {\n const ch = text[i];\n const val = ALPHABET.indexOf(ch);\n if (val === -1) throw new Error('Invalid Base58 character');\n\n let carry = val;\n for (let j = 0; j < b256.length; j++) {\n const x = b256[j] * BASE + carry;\n b256[j] = x & 0xff;\n carry = x >> 8;\n }\n while (carry > 0) {\n b256.push(carry & 0xff);\n carry >>= 8;\n }\n }\n\n for (let i = 0; i < zeros; i++) b256.push(0);\n b256.reverse();\n return Uint8Array.from(b256);\n}\n\nexport function multibaseB58btcDecode(zText: string): Uint8Array {\n if (!zText.startsWith('z')) throw new Error('Invalid multibase base58btc');\n return base58Decode(zText.slice(1));\n}\n"],"names":[],"mappings":"AAIA,MAAM,WAAW;AACjB,MAAM,OAAO;AAUN,SAAS,aAAa,OAA2B;AACtD,MAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,MAAI,QAAQ;AACZ,SAAO,QAAQ,MAAM,UAAU,MAAM,KAAK,MAAM,EAAG;AAEnD,MAAI,UAAU,MAAM,OAAQ,QAAO,IAAI,OAAO,KAAK;AAEnD,QAAM,SAAmB,CAAC,CAAC;AAC3B,WAAS,IAAI,OAAO,IAAI,MAAM,QAAQ,KAAK;AACzC,QAAI,QAAQ,MAAM,CAAC;AACnB,aAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,YAAM,OAAO,OAAO,CAAC,KAAK,KAAK;AAC/B,aAAO,CAAC,IAAI,MAAM;AAClB,cAAS,MAAM,OAAQ;AAAA,IACzB;AACA,WAAO,QAAQ,GAAG;AAChB,aAAO,KAAK,QAAQ,IAAI;AACxB,cAAS,QAAQ,OAAQ;AAAA,IAC3B;AAAA,EACF;AAEA,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,OAAO,IAAK,WAAU;AAC1C,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,IAAK,WAAU,SAAS,OAAO,CAAC,CAAC;AACzE,SAAO;AACT;AAEO,SAAS,aAAa,MAA0B;AACrD,MAAI,KAAK,WAAW,EAAG,QAAO,IAAI,WAAW,CAAC;AAE9C,MAAI,QAAQ;AACZ,SAAO,QAAQ,KAAK,UAAU,KAAK,KAAK,MAAM,IAAK;AAEnD,QAAM,OAAiB,CAAA;AACvB,WAAS,IAAI,OAAO,IAAI,KAAK,QAAQ,KAAK;AACxC,UAAM,KAAK,KAAK,CAAC;AACjB,UAAM,MAAM,SAAS,QAAQ,EAAE;AAC/B,QAAI,QAAQ,GAAI,OAAM,IAAI,MAAM,0BAA0B;AAE1D,QAAI,QAAQ;AACZ,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,IAAI,KAAK,CAAC,IAAI,OAAO;AAC3B,WAAK,CAAC,IAAI,IAAI;AACd,cAAQ,KAAK;AAAA,IACf;AACA,WAAO,QAAQ,GAAG;AAChB,WAAK,KAAK,QAAQ,GAAI;AACtB,gBAAU;AAAA,IACZ;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,OAAO,IAAK,MAAK,KAAK,CAAC;AAC3C,OAAK,QAAA;AACL,SAAO,WAAW,KAAK,IAAI;AAC7B;AAEO,SAAS,sBAAsB,OAA2B;AAC/D,MAAI,CAAC,MAAM,WAAW,GAAG,EAAG,OAAM,IAAI,MAAM,6BAA6B;AACzE,SAAO,aAAa,MAAM,MAAM,CAAC,CAAC;AACpC;"}
|
|
@@ -1,325 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Parse File Service transaction using unified dual-branch approach
|
|
8
|
-
* This handles both regular transactions and signed transaction variants
|
|
9
|
-
*/
|
|
10
|
-
static parseFileTransaction(transaction, originalBytes) {
|
|
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" };
|
|
42
|
-
}
|
|
1
|
+
import { isBrowser } from "./standards-sdk.es118.js";
|
|
2
|
+
let nodeRequire;
|
|
3
|
+
function isModuleNotFound(specifier, error) {
|
|
4
|
+
if (!error || typeof error !== "object") {
|
|
5
|
+
return false;
|
|
43
6
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (txBody.fileCreate) {
|
|
50
|
-
const fileCreate = this.parseFileCreate(txBody.fileCreate);
|
|
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
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (txBody.fileUpdate) {
|
|
70
|
-
const fileUpdate = this.parseFileUpdate(txBody.fileUpdate);
|
|
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 {};
|
|
7
|
+
const code = Reflect.get(error, "code");
|
|
8
|
+
const message = Reflect.get(error, "message");
|
|
9
|
+
const messageText = typeof message === "string" ? message : "";
|
|
10
|
+
if (typeof code === "string" && code.includes("MODULE_NOT_FOUND")) {
|
|
11
|
+
return messageText.includes(specifier);
|
|
90
12
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
static parseFromTransactionInternals(transaction) {
|
|
96
|
-
try {
|
|
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 {};
|
|
13
|
+
if (messageText) {
|
|
14
|
+
const lowered = messageText.toLowerCase();
|
|
15
|
+
if (lowered.includes("cannot find module") || lowered.includes("module not found") || lowered.includes("cannot find package")) {
|
|
16
|
+
return lowered.includes(specifier.toLowerCase());
|
|
187
17
|
}
|
|
188
18
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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") {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
async function resolveNodeRequire() {
|
|
22
|
+
if (nodeRequire !== void 0) {
|
|
23
|
+
return nodeRequire;
|
|
24
|
+
}
|
|
25
|
+
if (isBrowser) {
|
|
26
|
+
nodeRequire = null;
|
|
27
|
+
return nodeRequire;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const globalObject = typeof global !== "undefined" ? global : globalThis;
|
|
31
|
+
const req = globalObject.process?.mainModule?.require ?? globalObject.require;
|
|
32
|
+
nodeRequire = typeof req === "function" && typeof req.resolve === "function" ? req : null;
|
|
33
|
+
} catch {
|
|
34
|
+
nodeRequire = null;
|
|
35
|
+
}
|
|
36
|
+
return nodeRequire;
|
|
37
|
+
}
|
|
38
|
+
async function dynamicImport(specifier) {
|
|
39
|
+
try {
|
|
40
|
+
return await import(specifier);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
if (isModuleNotFound(specifier, error)) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function optionalImport(specifier, options = {}) {
|
|
49
|
+
if (isBrowser) {
|
|
50
|
+
return dynamicImport(specifier);
|
|
51
|
+
}
|
|
52
|
+
if (!options.preferImport) {
|
|
53
|
+
const requireFn = await resolveNodeRequire();
|
|
54
|
+
if (requireFn) {
|
|
237
55
|
try {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
56
|
+
return requireFn(specifier);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (!isModuleNotFound(specifier, error)) {
|
|
59
|
+
throw error;
|
|
241
60
|
}
|
|
242
|
-
} catch {
|
|
243
|
-
encoded = contentBuffer.toString("base64");
|
|
244
61
|
}
|
|
245
|
-
} else {
|
|
246
|
-
encoded = contentBuffer.toString("base64");
|
|
247
62
|
}
|
|
248
|
-
return {
|
|
249
|
-
encoded,
|
|
250
|
-
contentType,
|
|
251
|
-
size
|
|
252
|
-
};
|
|
253
63
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
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;
|
|
64
|
+
return dynamicImport(specifier);
|
|
65
|
+
}
|
|
66
|
+
function optionalImportSync(specifier) {
|
|
67
|
+
if (isBrowser) {
|
|
68
|
+
return null;
|
|
283
69
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
|
|
70
|
+
try {
|
|
71
|
+
const globalObject = typeof global !== "undefined" ? global : globalThis;
|
|
72
|
+
const req = globalObject.process?.mainModule?.require ?? globalObject.require;
|
|
73
|
+
if (typeof req === "function" && typeof req.resolve === "function") {
|
|
74
|
+
return req(specifier);
|
|
289
75
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
).toString()}.${body.expirationTime.nanos}`;
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (!isModuleNotFound(specifier, error)) {
|
|
78
|
+
throw error;
|
|
294
79
|
}
|
|
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;
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Parse File Service transaction from Transaction object
|
|
316
|
-
* This is the unified entry point that delegates to the comprehensive parsing logic
|
|
317
|
-
*/
|
|
318
|
-
static parseFromTransactionObject(transaction) {
|
|
319
|
-
return this.parseFileTransaction(transaction);
|
|
320
80
|
}
|
|
81
|
+
return null;
|
|
321
82
|
}
|
|
322
83
|
export {
|
|
323
|
-
|
|
84
|
+
optionalImport,
|
|
85
|
+
optionalImportSync
|
|
324
86
|
};
|
|
325
87
|
//# sourceMappingURL=standards-sdk.es152.js.map
|