@hashgraphonline/standards-sdk 0.1.144 → 0.1.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/hcs-10/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-10/sdk.d.ts +8 -0
- package/dist/cjs/hcs-10/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-11/client.d.ts +2 -2
- package/dist/cjs/hcs-11/client.d.ts.map +1 -1
- package/dist/cjs/hcs-11/person-builder.d.ts +1 -0
- package/dist/cjs/hcs-11/person-builder.d.ts.map +1 -1
- package/dist/cjs/hcs-11/types.d.ts +1 -0
- package/dist/cjs/hcs-11/types.d.ts.map +1 -1
- package/dist/cjs/hcs-12/rendering/resource-manager.d.ts.map +1 -1
- package/dist/cjs/hcs-14/issuers/hiero.d.ts.map +1 -1
- package/dist/cjs/hcs-15/browser.d.ts +2 -0
- package/dist/cjs/hcs-15/browser.d.ts.map +1 -1
- package/dist/cjs/hcs-15/sdk.d.ts +7 -1
- package/dist/cjs/hcs-15/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-15/tx.d.ts +4 -0
- package/dist/cjs/hcs-15/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-15/types.d.ts +16 -1
- package/dist/cjs/hcs-15/types.d.ts.map +1 -1
- package/dist/cjs/hcs-16/browser.d.ts +11 -2
- package/dist/cjs/hcs-16/browser.d.ts.map +1 -1
- package/dist/cjs/hcs-16/sdk.d.ts +62 -1
- package/dist/cjs/hcs-16/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-16/tx.d.ts +21 -3
- package/dist/cjs/hcs-16/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-17/base-client.d.ts +1 -0
- package/dist/cjs/hcs-17/base-client.d.ts.map +1 -1
- package/dist/cjs/hcs-17/sdk.d.ts.map +1 -1
- package/dist/cjs/hcs-17/tx.d.ts +2 -0
- package/dist/cjs/hcs-17/tx.d.ts.map +1 -1
- package/dist/cjs/hcs-17/types.d.ts +4 -0
- package/dist/cjs/hcs-17/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/base-client.d.ts +14 -1
- package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/feedback.d.ts +2 -0
- package/dist/cjs/services/registry-broker/client/feedback.d.ts.map +1 -0
- package/dist/cjs/services/registry-broker/private-key-signer.d.ts +1 -0
- package/dist/cjs/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/schemas.d.ts +998 -577
- package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/types.d.ts +20 -1
- package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
- package/dist/cjs/standards-sdk.cjs +2 -2
- package/dist/cjs/standards-sdk.cjs.map +1 -1
- package/dist/cjs/utils/crypto-abstraction.d.ts.map +1 -1
- package/dist/cjs/utils/crypto-env.d.ts.map +1 -1
- package/dist/cjs/utils/dynamic-import.d.ts +5 -1
- package/dist/cjs/utils/dynamic-import.d.ts.map +1 -1
- package/dist/cjs/utils/hash-adapter.d.ts.map +1 -1
- package/dist/es/hcs-10/base-client.d.ts.map +1 -1
- package/dist/es/hcs-10/sdk.d.ts +8 -0
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/hcs-11/client.d.ts +2 -2
- package/dist/es/hcs-11/client.d.ts.map +1 -1
- package/dist/es/hcs-11/person-builder.d.ts +1 -0
- package/dist/es/hcs-11/person-builder.d.ts.map +1 -1
- package/dist/es/hcs-11/types.d.ts +1 -0
- package/dist/es/hcs-11/types.d.ts.map +1 -1
- package/dist/es/hcs-12/rendering/resource-manager.d.ts.map +1 -1
- package/dist/es/hcs-14/issuers/hiero.d.ts.map +1 -1
- package/dist/es/hcs-15/browser.d.ts +2 -0
- package/dist/es/hcs-15/browser.d.ts.map +1 -1
- package/dist/es/hcs-15/sdk.d.ts +7 -1
- package/dist/es/hcs-15/sdk.d.ts.map +1 -1
- package/dist/es/hcs-15/tx.d.ts +4 -0
- package/dist/es/hcs-15/tx.d.ts.map +1 -1
- package/dist/es/hcs-15/types.d.ts +16 -1
- package/dist/es/hcs-15/types.d.ts.map +1 -1
- package/dist/es/hcs-16/browser.d.ts +11 -2
- package/dist/es/hcs-16/browser.d.ts.map +1 -1
- package/dist/es/hcs-16/sdk.d.ts +62 -1
- package/dist/es/hcs-16/sdk.d.ts.map +1 -1
- package/dist/es/hcs-16/tx.d.ts +21 -3
- package/dist/es/hcs-16/tx.d.ts.map +1 -1
- package/dist/es/hcs-17/base-client.d.ts +1 -0
- package/dist/es/hcs-17/base-client.d.ts.map +1 -1
- package/dist/es/hcs-17/sdk.d.ts.map +1 -1
- package/dist/es/hcs-17/tx.d.ts +2 -0
- package/dist/es/hcs-17/tx.d.ts.map +1 -1
- package/dist/es/hcs-17/types.d.ts +4 -0
- package/dist/es/hcs-17/types.d.ts.map +1 -1
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/base-client.d.ts +14 -1
- package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/feedback.d.ts +2 -0
- package/dist/es/services/registry-broker/client/feedback.d.ts.map +1 -0
- package/dist/es/services/registry-broker/private-key-signer.d.ts +1 -0
- package/dist/es/services/registry-broker/private-key-signer.d.ts.map +1 -1
- package/dist/es/services/registry-broker/schemas.d.ts +998 -577
- package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/es/services/registry-broker/types.d.ts +20 -1
- package/dist/es/services/registry-broker/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +141 -135
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es10.js +70 -90
- package/dist/es/standards-sdk.es10.js.map +1 -1
- package/dist/es/standards-sdk.es100.js +229 -26
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +109 -228
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +15 -94
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +80 -30
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +27 -80
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +136 -25
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +27 -140
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +20 -27
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +156 -18
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +198 -148
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es11.js +121 -45
- package/dist/es/standards-sdk.es11.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +747 -166
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +9 -786
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +567 -13
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +576 -541
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +12 -601
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +2 -13
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +87 -2
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +37 -80
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +2 -39
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +231 -2
- package/dist/es/standards-sdk.es119.js.map +1 -1
- package/dist/es/standards-sdk.es12.js +60 -159
- package/dist/es/standards-sdk.es12.js.map +1 -1
- package/dist/es/standards-sdk.es120.js +1110 -193
- package/dist/es/standards-sdk.es120.js.map +1 -1
- package/dist/es/standards-sdk.es121.js +225 -1059
- package/dist/es/standards-sdk.es121.js.map +1 -1
- package/dist/es/standards-sdk.es122.js +419 -303
- package/dist/es/standards-sdk.es122.js.map +1 -1
- package/dist/es/standards-sdk.es123.js +351 -418
- package/dist/es/standards-sdk.es123.js.map +1 -1
- package/dist/es/standards-sdk.es124.js +872 -347
- package/dist/es/standards-sdk.es124.js.map +1 -1
- package/dist/es/standards-sdk.es125.js +182 -854
- package/dist/es/standards-sdk.es125.js.map +1 -1
- package/dist/es/standards-sdk.es126.js +1512 -153
- package/dist/es/standards-sdk.es126.js.map +1 -1
- package/dist/es/standards-sdk.es127.js +157 -1547
- package/dist/es/standards-sdk.es127.js.map +1 -1
- package/dist/es/standards-sdk.es128.js +192 -162
- package/dist/es/standards-sdk.es128.js.map +1 -1
- package/dist/es/standards-sdk.es129.js +61 -164
- package/dist/es/standards-sdk.es129.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +200 -60
- package/dist/es/standards-sdk.es13.js.map +1 -1
- package/dist/es/standards-sdk.es130.js +102 -85
- package/dist/es/standards-sdk.es130.js.map +1 -1
- package/dist/es/standards-sdk.es131.js +222 -96
- package/dist/es/standards-sdk.es131.js.map +1 -1
- package/dist/es/standards-sdk.es132.js +153 -220
- package/dist/es/standards-sdk.es132.js.map +1 -1
- package/dist/es/standards-sdk.es133.js +104 -162
- package/dist/es/standards-sdk.es133.js.map +1 -1
- package/dist/es/standards-sdk.es134.js +296 -92
- package/dist/es/standards-sdk.es134.js.map +1 -1
- package/dist/es/standards-sdk.es135.js +432 -294
- package/dist/es/standards-sdk.es135.js.map +1 -1
- package/dist/es/standards-sdk.es136.js +14 -363
- package/dist/es/standards-sdk.es136.js.map +1 -1
- package/dist/es/standards-sdk.es137.js +79 -15
- package/dist/es/standards-sdk.es137.js.map +1 -1
- package/dist/es/standards-sdk.es138.js +79 -59
- package/dist/es/standards-sdk.es138.js.map +1 -1
- package/dist/es/standards-sdk.es139.js +152 -80
- package/dist/es/standards-sdk.es139.js.map +1 -1
- package/dist/es/standards-sdk.es14.js +149 -178
- package/dist/es/standards-sdk.es14.js.map +1 -1
- package/dist/es/standards-sdk.es140.js +7 -159
- package/dist/es/standards-sdk.es140.js.map +1 -1
- package/dist/es/standards-sdk.es141.js +86 -7
- package/dist/es/standards-sdk.es141.js.map +1 -1
- package/dist/es/standards-sdk.es142.js +44 -65
- package/dist/es/standards-sdk.es142.js.map +1 -1
- package/dist/es/standards-sdk.es143.js +30 -65
- package/dist/es/standards-sdk.es143.js.map +1 -1
- package/dist/es/standards-sdk.es144.js +34 -28
- package/dist/es/standards-sdk.es144.js.map +1 -1
- package/dist/es/standards-sdk.es145.js +28 -138
- package/dist/es/standards-sdk.es145.js.map +1 -1
- package/dist/es/standards-sdk.es146.js +133 -37
- package/dist/es/standards-sdk.es146.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +34 -12281
- package/dist/es/standards-sdk.es147.js.map +1 -1
- package/dist/es/standards-sdk.es148.js +12284 -12
- package/dist/es/standards-sdk.es148.js.map +1 -1
- package/dist/es/standards-sdk.es149.js +958 -56
- package/dist/es/standards-sdk.es149.js.map +1 -1
- package/dist/es/standards-sdk.es15.js +152 -151
- package/dist/es/standards-sdk.es15.js.map +1 -1
- package/dist/es/standards-sdk.es150.js +48 -74
- package/dist/es/standards-sdk.es150.js.map +1 -1
- package/dist/es/standards-sdk.es151.js +72 -160
- package/dist/es/standards-sdk.es151.js.map +1 -1
- package/dist/es/standards-sdk.es152.js +13 -318
- package/dist/es/standards-sdk.es152.js.map +1 -1
- package/dist/es/standards-sdk.es153.js +120 -294
- package/dist/es/standards-sdk.es153.js.map +1 -1
- package/dist/es/standards-sdk.es154.js +191 -322
- package/dist/es/standards-sdk.es154.js.map +1 -1
- package/dist/es/standards-sdk.es155.js +294 -279
- package/dist/es/standards-sdk.es155.js.map +1 -1
- package/dist/es/standards-sdk.es156.js +440 -63
- package/dist/es/standards-sdk.es156.js.map +1 -1
- package/dist/es/standards-sdk.es157.js +331 -871
- package/dist/es/standards-sdk.es157.js.map +1 -1
- package/dist/es/standards-sdk.es158.js +68 -231
- package/dist/es/standards-sdk.es158.js.map +1 -1
- package/dist/es/standards-sdk.es159.js +218 -223
- package/dist/es/standards-sdk.es159.js.map +1 -1
- package/dist/es/standards-sdk.es16.js +917 -136
- package/dist/es/standards-sdk.es16.js.map +1 -1
- package/dist/es/standards-sdk.es160.js +247 -0
- package/dist/es/standards-sdk.es160.js.map +1 -0
- package/dist/es/standards-sdk.es17.js +23 -944
- package/dist/es/standards-sdk.es17.js.map +1 -1
- package/dist/es/standards-sdk.es18.js +2422 -24
- package/dist/es/standards-sdk.es18.js.map +1 -1
- package/dist/es/standards-sdk.es19.js +817 -2071
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es2.js +654 -189
- package/dist/es/standards-sdk.es2.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +205 -1091
- package/dist/es/standards-sdk.es20.js.map +1 -1
- package/dist/es/standards-sdk.es21.js +858 -221
- package/dist/es/standards-sdk.es21.js.map +1 -1
- package/dist/es/standards-sdk.es22.js +179 -903
- package/dist/es/standards-sdk.es22.js.map +1 -1
- package/dist/es/standards-sdk.es23.js +164 -179
- package/dist/es/standards-sdk.es23.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +62 -118
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +377 -52
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +36 -394
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +901 -50
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +134 -902
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +7 -134
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es3.js +63 -680
- package/dist/es/standards-sdk.es3.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +344 -7
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +302 -287
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +94 -322
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +458 -101
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +132 -451
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +216 -130
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +273 -195
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +148 -87
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +183 -320
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +238 -161
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es4.js +425 -63
- package/dist/es/standards-sdk.es4.js.map +1 -1
- package/dist/es/standards-sdk.es40.js +136 -254
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +225 -176
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +199 -261
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +237 -199
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +209 -201
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +305 -201
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +371 -261
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +316 -371
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +404 -336
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +83 -449
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +232 -354
- package/dist/es/standards-sdk.es5.js.map +1 -1
- package/dist/es/standards-sdk.es50.js +179 -89
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +231 -165
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +25 -262
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +56 -26
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +12 -57
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +49 -12
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +115 -43
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +42 -115
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +52 -43
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +36 -50
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es6.js +125 -246
- package/dist/es/standards-sdk.es6.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +207 -39
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +24 -200
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +87 -25
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +3 -51
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +100 -3
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +61 -62
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +17 -98
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +77 -19
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +458 -77
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +106 -240
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +28 -183
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es70.js +170 -286
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +71 -207
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +71 -72
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +143 -71
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +62 -136
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +380 -45
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +222 -130
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +320 -444
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +88 -370
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +125 -89
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +80 -29
- package/dist/es/standards-sdk.es8.js.map +1 -1
- package/dist/es/standards-sdk.es80.js +8 -125
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +45 -6
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +98 -44
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +331 -84
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +93 -160
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +55 -275
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +43 -55
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +145 -22
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +34 -47
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +22 -57
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es9.js +104 -80
- package/dist/es/standards-sdk.es9.js.map +1 -1
- package/dist/es/standards-sdk.es90.js +23 -28
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +238 -23
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +265 -152
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +95 -68
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +124 -136
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +42 -138
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +259 -42
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +82 -243
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +48 -47
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +29 -100
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/crypto-abstraction.d.ts.map +1 -1
- package/dist/es/utils/crypto-env.d.ts.map +1 -1
- package/dist/es/utils/dynamic-import.d.ts +5 -1
- package/dist/es/utils/dynamic-import.d.ts.map +1 -1
- package/dist/es/utils/hash-adapter.d.ts.map +1 -1
- package/package.json +8 -7
- package/dist/cjs/patches/topic-autorenew-patch.d.ts +0 -2
- package/dist/cjs/patches/topic-autorenew-patch.d.ts.map +0 -1
- package/dist/es/patches/topic-autorenew-patch.d.ts +0 -2
- package/dist/es/patches/topic-autorenew-patch.d.ts.map +0 -1
|
@@ -1,1143 +1,309 @@
|
|
|
1
1
|
import { proto } from "@hashgraph/proto";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
class HTSParser {
|
|
2
|
+
import { hasTransactionType, parseKey } from "./standards-sdk.es158.js";
|
|
3
|
+
import { AccountId, Long, ScheduleId } from "@hashgraph/sdk";
|
|
4
|
+
class ScheduleParser {
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
8
|
-
* This
|
|
6
|
+
* Parse Schedule Service transaction using unified dual-branch approach
|
|
7
|
+
* This handles both regular transactions and signed transaction variants
|
|
9
8
|
*/
|
|
10
|
-
static
|
|
9
|
+
static parseScheduleTransaction(transaction, originalBytes) {
|
|
11
10
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (transactionBody.tokenMint) {
|
|
29
|
-
const tokenMint = this.parseTokenMint(transactionBody.tokenMint);
|
|
30
|
-
if (tokenMint) {
|
|
31
|
-
return {
|
|
32
|
-
type: "TOKENMINT",
|
|
33
|
-
humanReadableType: "Token Mint",
|
|
34
|
-
tokenMint
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
if (transactionBody.tokenBurn) {
|
|
39
|
-
const tokenBurn = this.parseTokenBurn(transactionBody.tokenBurn);
|
|
40
|
-
if (tokenBurn) {
|
|
41
|
-
return {
|
|
42
|
-
type: "TOKENBURN",
|
|
43
|
-
humanReadableType: "Token Burn",
|
|
44
|
-
tokenBurn
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (transactionBody.tokenUpdate) {
|
|
49
|
-
const tokenUpdate = this.parseTokenUpdate(transactionBody.tokenUpdate);
|
|
50
|
-
if (tokenUpdate) {
|
|
51
|
-
return {
|
|
52
|
-
type: "TOKENUPDATE",
|
|
53
|
-
humanReadableType: "Token Update",
|
|
54
|
-
tokenUpdate
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (transactionBody.tokenFreeze) {
|
|
59
|
-
const tokenFreeze = this.parseTokenFreeze(transactionBody.tokenFreeze);
|
|
60
|
-
if (tokenFreeze) {
|
|
61
|
-
return {
|
|
62
|
-
type: "TOKENFREEZE",
|
|
63
|
-
humanReadableType: "Token Freeze",
|
|
64
|
-
tokenFreeze
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (transactionBody.tokenUnfreeze) {
|
|
69
|
-
const tokenUnfreeze = this.parseTokenUnfreeze(
|
|
70
|
-
transactionBody.tokenUnfreeze
|
|
71
|
-
);
|
|
72
|
-
if (tokenUnfreeze) {
|
|
73
|
-
return {
|
|
74
|
-
type: "TOKENUNFREEZE",
|
|
75
|
-
humanReadableType: "Token Unfreeze",
|
|
76
|
-
tokenUnfreeze
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (transactionBody.tokenGrantKyc) {
|
|
81
|
-
const tokenGrantKyc = this.parseTokenGrantKyc(
|
|
82
|
-
transactionBody.tokenGrantKyc
|
|
83
|
-
);
|
|
84
|
-
if (tokenGrantKyc) {
|
|
85
|
-
return {
|
|
86
|
-
type: "TOKENGRANTKYC",
|
|
87
|
-
humanReadableType: "Token Grant KYC",
|
|
88
|
-
tokenGrantKyc
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (transactionBody.tokenRevokeKyc) {
|
|
93
|
-
const tokenRevokeKyc = this.parseTokenRevokeKyc(
|
|
94
|
-
transactionBody.tokenRevokeKyc
|
|
95
|
-
);
|
|
96
|
-
if (tokenRevokeKyc) {
|
|
97
|
-
return {
|
|
98
|
-
type: "TOKENREVOKEKYC",
|
|
99
|
-
humanReadableType: "Token Revoke KYC",
|
|
100
|
-
tokenRevokeKyc
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (transactionBody.tokenPause) {
|
|
105
|
-
const tokenPause = this.parseTokenPause(transactionBody.tokenPause);
|
|
106
|
-
if (tokenPause) {
|
|
107
|
-
return {
|
|
108
|
-
type: "TOKENPAUSE",
|
|
109
|
-
humanReadableType: "Token Pause",
|
|
110
|
-
tokenPause
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (transactionBody.tokenUnpause) {
|
|
115
|
-
const tokenUnpause = this.parseTokenUnpause(
|
|
116
|
-
transactionBody.tokenUnpause
|
|
117
|
-
);
|
|
118
|
-
if (tokenUnpause) {
|
|
119
|
-
return {
|
|
120
|
-
type: "TOKENUNPAUSE",
|
|
121
|
-
humanReadableType: "Token Unpause",
|
|
122
|
-
tokenUnpause
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (transactionBody.tokenWipe) {
|
|
127
|
-
const tokenWipeAccount = this.parseTokenWipeAccount(
|
|
128
|
-
transactionBody.tokenWipe
|
|
129
|
-
);
|
|
130
|
-
if (tokenWipeAccount) {
|
|
131
|
-
return {
|
|
132
|
-
type: "TOKENWIPEACCOUNT",
|
|
133
|
-
humanReadableType: "Token Wipe Account",
|
|
134
|
-
tokenWipeAccount
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (transactionBody.tokenDeletion) {
|
|
139
|
-
const tokenDelete = this.parseTokenDelete(
|
|
140
|
-
transactionBody.tokenDeletion
|
|
141
|
-
);
|
|
142
|
-
if (tokenDelete) {
|
|
143
|
-
return {
|
|
144
|
-
type: "TOKENDELETE",
|
|
145
|
-
humanReadableType: "Token Delete",
|
|
146
|
-
tokenDelete
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
if (transactionBody.tokenAssociate) {
|
|
151
|
-
const tokenAssociate = this.parseTokenAssociate(
|
|
152
|
-
transactionBody.tokenAssociate
|
|
153
|
-
);
|
|
154
|
-
if (tokenAssociate) {
|
|
155
|
-
return {
|
|
156
|
-
type: "TOKENASSOCIATE",
|
|
157
|
-
humanReadableType: "Token Associate",
|
|
158
|
-
tokenAssociate
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (transactionBody.tokenDissociate) {
|
|
163
|
-
const tokenDissociate = this.parseTokenDissociate(
|
|
164
|
-
transactionBody.tokenDissociate
|
|
165
|
-
);
|
|
166
|
-
if (tokenDissociate) {
|
|
167
|
-
return {
|
|
168
|
-
type: "TOKENDISSOCIATE",
|
|
169
|
-
humanReadableType: "Token Dissociate",
|
|
170
|
-
tokenDissociate
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (transactionBody.tokenFeeScheduleUpdate) {
|
|
175
|
-
const tokenFeeScheduleUpdate = this.parseTokenFeeScheduleUpdate(
|
|
176
|
-
transactionBody.tokenFeeScheduleUpdate
|
|
177
|
-
);
|
|
178
|
-
if (tokenFeeScheduleUpdate) {
|
|
179
|
-
return {
|
|
180
|
-
type: "TOKENFEESCHEDULEUPDATE",
|
|
181
|
-
humanReadableType: "Token Fee Schedule Update",
|
|
182
|
-
tokenFeeScheduleUpdate
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
const airdrop = this.parseTokenAirdrop(transaction);
|
|
187
|
-
if (airdrop) {
|
|
188
|
-
return {
|
|
189
|
-
type: "TOKENAIRDROP",
|
|
190
|
-
humanReadableType: "Token Airdrop",
|
|
191
|
-
tokenAirdrop: airdrop
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
return {};
|
|
195
|
-
} catch (error) {
|
|
196
|
-
console.warn("[HTSParser] Failed to parse HTS transaction:", error);
|
|
197
|
-
return {};
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
static parseTokenCreate(body) {
|
|
201
|
-
if (!body) return void 0;
|
|
202
|
-
const data = {};
|
|
203
|
-
if (body.name) {
|
|
204
|
-
data.tokenName = body.name;
|
|
205
|
-
}
|
|
206
|
-
if (body.symbol) {
|
|
207
|
-
data.tokenSymbol = body.symbol;
|
|
208
|
-
}
|
|
209
|
-
if (body.treasury) {
|
|
210
|
-
data.treasuryAccountId = new AccountId(
|
|
211
|
-
body.treasury.shardNum ?? 0,
|
|
212
|
-
body.treasury.realmNum ?? 0,
|
|
213
|
-
body.treasury.accountNum ?? 0
|
|
214
|
-
).toString();
|
|
215
|
-
}
|
|
216
|
-
if (body.initialSupply) {
|
|
217
|
-
data.initialSupply = Long.fromValue(body.initialSupply).toString();
|
|
218
|
-
}
|
|
219
|
-
if (body.decimals !== void 0 && body.decimals !== null) {
|
|
220
|
-
data.decimals = Long.fromValue(body.decimals).toNumber();
|
|
221
|
-
}
|
|
222
|
-
if (body.maxSupply) {
|
|
223
|
-
data.maxSupply = Long.fromValue(body.maxSupply).toString();
|
|
224
|
-
}
|
|
225
|
-
if (body.memo) {
|
|
226
|
-
data.memo = body.memo;
|
|
227
|
-
}
|
|
228
|
-
if (body.tokenType !== null && body.tokenType !== void 0) {
|
|
229
|
-
data.tokenType = proto.TokenType[body.tokenType];
|
|
230
|
-
}
|
|
231
|
-
if (body.supplyType !== null && body.supplyType !== void 0) {
|
|
232
|
-
data.supplyType = proto.TokenSupplyType[body.supplyType];
|
|
233
|
-
}
|
|
234
|
-
data.adminKey = parseKey(body.adminKey);
|
|
235
|
-
data.kycKey = parseKey(body.kycKey);
|
|
236
|
-
data.freezeKey = parseKey(body.freezeKey);
|
|
237
|
-
data.wipeKey = parseKey(body.wipeKey);
|
|
238
|
-
data.supplyKey = parseKey(body.supplyKey);
|
|
239
|
-
data.feeScheduleKey = parseKey(body.feeScheduleKey);
|
|
240
|
-
data.pauseKey = parseKey(body.pauseKey);
|
|
241
|
-
if (body.autoRenewAccount) {
|
|
242
|
-
data.autoRenewAccount = new AccountId(
|
|
243
|
-
body.autoRenewAccount.shardNum ?? 0,
|
|
244
|
-
body.autoRenewAccount.realmNum ?? 0,
|
|
245
|
-
body.autoRenewAccount.accountNum ?? 0
|
|
246
|
-
).toString();
|
|
247
|
-
}
|
|
248
|
-
if (body.autoRenewPeriod?.seconds) {
|
|
249
|
-
data.autoRenewPeriod = Long.fromValue(
|
|
250
|
-
body.autoRenewPeriod.seconds
|
|
251
|
-
).toString();
|
|
252
|
-
}
|
|
253
|
-
if (body.customFees && body.customFees.length > 0) {
|
|
254
|
-
data.customFees = body.customFees.map((fee) => {
|
|
255
|
-
const feeCollectorAccountId = fee.feeCollectorAccountId ? new AccountId(
|
|
256
|
-
fee.feeCollectorAccountId.shardNum ?? 0,
|
|
257
|
-
fee.feeCollectorAccountId.realmNum ?? 0,
|
|
258
|
-
fee.feeCollectorAccountId.accountNum ?? 0
|
|
259
|
-
).toString() : "Not Set";
|
|
260
|
-
const commonFeeData = {
|
|
261
|
-
feeCollectorAccountId,
|
|
262
|
-
allCollectorsAreExempt: fee.allCollectorsAreExempt || false
|
|
263
|
-
};
|
|
264
|
-
if (fee.fixedFee) {
|
|
265
|
-
return {
|
|
266
|
-
...commonFeeData,
|
|
267
|
-
feeType: "FIXED_FEE",
|
|
268
|
-
fixedFee: {
|
|
269
|
-
amount: Long.fromValue(fee.fixedFee.amount || 0).toString(),
|
|
270
|
-
denominatingTokenId: fee.fixedFee.denominatingTokenId ? new TokenId(
|
|
271
|
-
fee.fixedFee.denominatingTokenId.shardNum ?? 0,
|
|
272
|
-
fee.fixedFee.denominatingTokenId.realmNum ?? 0,
|
|
273
|
-
fee.fixedFee.denominatingTokenId.tokenNum ?? 0
|
|
274
|
-
).toString() : void 0
|
|
11
|
+
if (originalBytes || transaction.toBytes) {
|
|
12
|
+
try {
|
|
13
|
+
const bytesToParse = originalBytes || transaction.toBytes();
|
|
14
|
+
const decoded = proto.TransactionList.decode(bytesToParse);
|
|
15
|
+
if (decoded.transactionList && decoded.transactionList.length > 0) {
|
|
16
|
+
const tx = decoded.transactionList[0];
|
|
17
|
+
let txBody = null;
|
|
18
|
+
if (tx.bodyBytes && tx.bodyBytes.length > 0) {
|
|
19
|
+
txBody = proto.TransactionBody.decode(tx.bodyBytes);
|
|
20
|
+
} else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
|
|
21
|
+
const signedTx = proto.SignedTransaction.decode(
|
|
22
|
+
tx.signedTransactionBytes
|
|
23
|
+
);
|
|
24
|
+
if (signedTx.bodyBytes) {
|
|
25
|
+
txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
|
|
26
|
+
}
|
|
275
27
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
fractionalFee: {
|
|
282
|
-
numerator: Long.fromValue(
|
|
283
|
-
fee.fractionalFee.fractionalAmount?.numerator || 0
|
|
284
|
-
).toString(),
|
|
285
|
-
denominator: Long.fromValue(
|
|
286
|
-
fee.fractionalFee.fractionalAmount?.denominator || 1
|
|
287
|
-
).toString(),
|
|
288
|
-
minimumAmount: Long.fromValue(
|
|
289
|
-
fee.fractionalFee.minimumAmount || 0
|
|
290
|
-
).toString(),
|
|
291
|
-
maximumAmount: Long.fromValue(
|
|
292
|
-
fee.fractionalFee.maximumAmount || 0
|
|
293
|
-
).toString(),
|
|
294
|
-
netOfTransfers: fee.fractionalFee.netOfTransfers || false
|
|
28
|
+
if (txBody) {
|
|
29
|
+
const protoResult = this.parseFromProtobufTxBody(txBody);
|
|
30
|
+
if (protoResult.type && protoResult.type !== "UNKNOWN") {
|
|
31
|
+
return protoResult;
|
|
32
|
+
}
|
|
295
33
|
}
|
|
296
|
-
};
|
|
297
|
-
} else if (fee.royaltyFee) {
|
|
298
|
-
let fallbackFeeData = void 0;
|
|
299
|
-
if (fee.royaltyFee.fallbackFee) {
|
|
300
|
-
fallbackFeeData = {
|
|
301
|
-
amount: Long.fromValue(
|
|
302
|
-
fee.royaltyFee.fallbackFee.amount || 0
|
|
303
|
-
).toString(),
|
|
304
|
-
denominatingTokenId: fee.royaltyFee.fallbackFee.denominatingTokenId ? new TokenId(
|
|
305
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.shardNum ?? 0,
|
|
306
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.realmNum ?? 0,
|
|
307
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.tokenNum ?? 0
|
|
308
|
-
).toString() : void 0
|
|
309
|
-
};
|
|
310
34
|
}
|
|
311
|
-
|
|
312
|
-
...commonFeeData,
|
|
313
|
-
feeType: "ROYALTY_FEE",
|
|
314
|
-
royaltyFee: {
|
|
315
|
-
numerator: Long.fromValue(
|
|
316
|
-
fee.royaltyFee.exchangeValueFraction?.numerator || 0
|
|
317
|
-
).toString(),
|
|
318
|
-
denominator: Long.fromValue(
|
|
319
|
-
fee.royaltyFee.exchangeValueFraction?.denominator || 1
|
|
320
|
-
).toString(),
|
|
321
|
-
fallbackFee: fallbackFeeData
|
|
322
|
-
}
|
|
323
|
-
};
|
|
35
|
+
} catch (protoError) {
|
|
324
36
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
37
|
+
}
|
|
38
|
+
return this.parseFromTransactionInternals(transaction);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
return {
|
|
41
|
+
type: "UNKNOWN",
|
|
42
|
+
humanReadableType: "Unknown Schedule Transaction"
|
|
43
|
+
};
|
|
331
44
|
}
|
|
332
|
-
return data;
|
|
333
45
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
body.token.tokenNum ?? 0
|
|
343
|
-
).toString(),
|
|
344
|
-
amount: Long.fromValue(body.amount).toNumber()
|
|
345
|
-
};
|
|
346
|
-
if (body.metadata && body.metadata.length > 0) {
|
|
347
|
-
data.metadata = body.metadata.map(
|
|
348
|
-
(meta) => Buffer.from(meta).toString("base64")
|
|
46
|
+
/**
|
|
47
|
+
* Parse schedule transaction from protobuf TransactionBody
|
|
48
|
+
* Handles all schedule operations from decoded protobuf data
|
|
49
|
+
*/
|
|
50
|
+
static parseFromProtobufTxBody(txBody) {
|
|
51
|
+
if (txBody.scheduleCreate) {
|
|
52
|
+
const scheduleCreate = this.parseScheduleCreateFromProto(
|
|
53
|
+
txBody.scheduleCreate
|
|
349
54
|
);
|
|
55
|
+
if (scheduleCreate) {
|
|
56
|
+
return {
|
|
57
|
+
type: "SCHEDULECREATE",
|
|
58
|
+
humanReadableType: "Schedule Create",
|
|
59
|
+
scheduleCreate
|
|
60
|
+
};
|
|
61
|
+
}
|
|
350
62
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
63
|
+
if (txBody.scheduleSign) {
|
|
64
|
+
const scheduleSign = this.parseScheduleSignFromProto(txBody.scheduleSign);
|
|
65
|
+
if (scheduleSign) {
|
|
66
|
+
return {
|
|
67
|
+
type: "SCHEDULESIGN",
|
|
68
|
+
humanReadableType: "Schedule Sign",
|
|
69
|
+
scheduleSign
|
|
70
|
+
};
|
|
71
|
+
}
|
|
356
72
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
body.token.realmNum ?? 0,
|
|
361
|
-
body.token.tokenNum ?? 0
|
|
362
|
-
).toString(),
|
|
363
|
-
amount: Long.fromValue(body.amount).toNumber()
|
|
364
|
-
};
|
|
365
|
-
if (body.serialNumbers && body.serialNumbers.length > 0) {
|
|
366
|
-
data.serialNumbers = body.serialNumbers.map(
|
|
367
|
-
(sn) => Long.fromValue(sn).toNumber()
|
|
73
|
+
if (txBody.scheduleDelete) {
|
|
74
|
+
const scheduleDelete = this.parseScheduleDeleteFromProto(
|
|
75
|
+
txBody.scheduleDelete
|
|
368
76
|
);
|
|
77
|
+
if (scheduleDelete) {
|
|
78
|
+
return {
|
|
79
|
+
type: "SCHEDULEDELETE",
|
|
80
|
+
humanReadableType: "Schedule Delete",
|
|
81
|
+
scheduleDelete
|
|
82
|
+
};
|
|
83
|
+
}
|
|
369
84
|
}
|
|
370
|
-
return
|
|
371
|
-
}
|
|
372
|
-
static parseTokenUpdate(body) {
|
|
373
|
-
if (!body) return void 0;
|
|
374
|
-
const data = {};
|
|
375
|
-
if (body.token) {
|
|
376
|
-
data.tokenId = new TokenId(
|
|
377
|
-
body.token.shardNum ?? 0,
|
|
378
|
-
body.token.realmNum ?? 0,
|
|
379
|
-
body.token.tokenNum ?? 0
|
|
380
|
-
).toString();
|
|
381
|
-
}
|
|
382
|
-
if (body.name) {
|
|
383
|
-
data.name = body.name;
|
|
384
|
-
}
|
|
385
|
-
if (body.symbol) {
|
|
386
|
-
data.symbol = body.symbol;
|
|
387
|
-
}
|
|
388
|
-
if (body.treasury) {
|
|
389
|
-
data.treasuryAccountId = new AccountId(
|
|
390
|
-
body.treasury.shardNum ?? 0,
|
|
391
|
-
body.treasury.realmNum ?? 0,
|
|
392
|
-
body.treasury.accountNum ?? 0
|
|
393
|
-
).toString();
|
|
394
|
-
}
|
|
395
|
-
data.adminKey = parseKey(body.adminKey);
|
|
396
|
-
data.kycKey = parseKey(body.kycKey);
|
|
397
|
-
data.freezeKey = parseKey(body.freezeKey);
|
|
398
|
-
data.wipeKey = parseKey(body.wipeKey);
|
|
399
|
-
data.supplyKey = parseKey(body.supplyKey);
|
|
400
|
-
data.feeScheduleKey = parseKey(body.feeScheduleKey);
|
|
401
|
-
data.pauseKey = parseKey(body.pauseKey);
|
|
402
|
-
if (body.autoRenewAccount) {
|
|
403
|
-
data.autoRenewAccountId = new AccountId(
|
|
404
|
-
body.autoRenewAccount.shardNum ?? 0,
|
|
405
|
-
body.autoRenewAccount.realmNum ?? 0,
|
|
406
|
-
body.autoRenewAccount.accountNum ?? 0
|
|
407
|
-
).toString();
|
|
408
|
-
}
|
|
409
|
-
if (body.autoRenewPeriod?.seconds) {
|
|
410
|
-
data.autoRenewPeriod = Long.fromValue(
|
|
411
|
-
body.autoRenewPeriod.seconds
|
|
412
|
-
).toString();
|
|
413
|
-
}
|
|
414
|
-
if (body.memo?.value !== void 0) {
|
|
415
|
-
data.memo = body.memo.value;
|
|
416
|
-
}
|
|
417
|
-
if (body.expiry?.seconds) {
|
|
418
|
-
data.expiry = `${Long.fromValue(body.expiry.seconds).toString()}.${body.expiry.nanos}`;
|
|
419
|
-
}
|
|
420
|
-
return data;
|
|
85
|
+
return {};
|
|
421
86
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const commonFeeData = {
|
|
440
|
-
feeCollectorAccountId,
|
|
441
|
-
allCollectorsAreExempt: fee.allCollectorsAreExempt || false
|
|
87
|
+
/**
|
|
88
|
+
* Extract schedule data from Transaction internal fields
|
|
89
|
+
* This handles cases where data is stored in Transaction object internals
|
|
90
|
+
*/
|
|
91
|
+
static parseFromTransactionInternals(transaction) {
|
|
92
|
+
try {
|
|
93
|
+
const tx = transaction;
|
|
94
|
+
if (hasTransactionType(transaction, "scheduleCreate")) {
|
|
95
|
+
const scheduleCreate = {
|
|
96
|
+
scheduledTransactionBody: Buffer.from(
|
|
97
|
+
tx._scheduledTransaction
|
|
98
|
+
).toString("base64"),
|
|
99
|
+
memo: tx._scheduleMemo,
|
|
100
|
+
adminKey: tx._adminKey ? parseKey(tx._adminKey) : void 0,
|
|
101
|
+
payerAccountId: tx._payerAccountId?.toString(),
|
|
102
|
+
expirationTime: tx._expirationTime?.toString(),
|
|
103
|
+
waitForExpiry: tx._waitForExpiry || false
|
|
442
104
|
};
|
|
443
|
-
if (fee.fixedFee) {
|
|
444
|
-
return {
|
|
445
|
-
...commonFeeData,
|
|
446
|
-
feeType: "FIXED_FEE",
|
|
447
|
-
fixedFee: {
|
|
448
|
-
amount: Long.fromValue(fee.fixedFee.amount || 0).toString(),
|
|
449
|
-
denominatingTokenId: fee.fixedFee.denominatingTokenId ? new TokenId(
|
|
450
|
-
fee.fixedFee.denominatingTokenId.shardNum ?? 0,
|
|
451
|
-
fee.fixedFee.denominatingTokenId.realmNum ?? 0,
|
|
452
|
-
fee.fixedFee.denominatingTokenId.tokenNum ?? 0
|
|
453
|
-
).toString() : void 0
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
} else if (fee.fractionalFee) {
|
|
457
|
-
return {
|
|
458
|
-
...commonFeeData,
|
|
459
|
-
feeType: "FRACTIONAL_FEE",
|
|
460
|
-
fractionalFee: {
|
|
461
|
-
numerator: Long.fromValue(
|
|
462
|
-
fee.fractionalFee.fractionalAmount?.numerator || 0
|
|
463
|
-
).toString(),
|
|
464
|
-
denominator: Long.fromValue(
|
|
465
|
-
fee.fractionalFee.fractionalAmount?.denominator || 1
|
|
466
|
-
).toString(),
|
|
467
|
-
minimumAmount: Long.fromValue(
|
|
468
|
-
fee.fractionalFee.minimumAmount || 0
|
|
469
|
-
).toString(),
|
|
470
|
-
maximumAmount: Long.fromValue(
|
|
471
|
-
fee.fractionalFee.maximumAmount || 0
|
|
472
|
-
).toString(),
|
|
473
|
-
netOfTransfers: fee.fractionalFee.netOfTransfers || false
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
} else if (fee.royaltyFee) {
|
|
477
|
-
let fallbackFeeData = void 0;
|
|
478
|
-
if (fee.royaltyFee.fallbackFee) {
|
|
479
|
-
fallbackFeeData = {
|
|
480
|
-
amount: Long.fromValue(
|
|
481
|
-
fee.royaltyFee.fallbackFee.amount || 0
|
|
482
|
-
).toString(),
|
|
483
|
-
denominatingTokenId: fee.royaltyFee.fallbackFee.denominatingTokenId ? new TokenId(
|
|
484
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.shardNum ?? 0,
|
|
485
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.realmNum ?? 0,
|
|
486
|
-
fee.royaltyFee.fallbackFee.denominatingTokenId.tokenNum ?? 0
|
|
487
|
-
).toString() : void 0
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
return {
|
|
491
|
-
...commonFeeData,
|
|
492
|
-
feeType: "ROYALTY_FEE",
|
|
493
|
-
royaltyFee: {
|
|
494
|
-
numerator: Long.fromValue(
|
|
495
|
-
fee.royaltyFee.exchangeValueFraction?.numerator || 0
|
|
496
|
-
).toString(),
|
|
497
|
-
denominator: Long.fromValue(
|
|
498
|
-
fee.royaltyFee.exchangeValueFraction?.denominator || 1
|
|
499
|
-
).toString(),
|
|
500
|
-
fallbackFee: fallbackFeeData
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
105
|
return {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
106
|
+
type: "SCHEDULECREATE",
|
|
107
|
+
humanReadableType: "Schedule Create",
|
|
108
|
+
scheduleCreate
|
|
508
109
|
};
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
if (!body) return void 0;
|
|
534
|
-
const data = {};
|
|
535
|
-
if (body.token) {
|
|
536
|
-
data.tokenId = new TokenId(
|
|
537
|
-
body.token.shardNum ?? 0,
|
|
538
|
-
body.token.realmNum ?? 0,
|
|
539
|
-
body.token.tokenNum ?? 0
|
|
540
|
-
).toString();
|
|
541
|
-
}
|
|
542
|
-
if (body.account) {
|
|
543
|
-
data.accountId = new AccountId(
|
|
544
|
-
body.account.shardNum ?? 0,
|
|
545
|
-
body.account.realmNum ?? 0,
|
|
546
|
-
body.account.accountNum ?? 0
|
|
547
|
-
).toString();
|
|
548
|
-
}
|
|
549
|
-
return data;
|
|
550
|
-
}
|
|
551
|
-
static parseTokenGrantKyc(body) {
|
|
552
|
-
if (!body) return void 0;
|
|
553
|
-
const data = {};
|
|
554
|
-
if (body.token) {
|
|
555
|
-
data.tokenId = new TokenId(
|
|
556
|
-
body.token.shardNum ?? 0,
|
|
557
|
-
body.token.realmNum ?? 0,
|
|
558
|
-
body.token.tokenNum ?? 0
|
|
559
|
-
).toString();
|
|
560
|
-
}
|
|
561
|
-
if (body.account) {
|
|
562
|
-
data.accountId = new AccountId(
|
|
563
|
-
body.account.shardNum ?? 0,
|
|
564
|
-
body.account.realmNum ?? 0,
|
|
565
|
-
body.account.accountNum ?? 0
|
|
566
|
-
).toString();
|
|
110
|
+
}
|
|
111
|
+
if (hasTransactionType(transaction, "scheduleSign")) {
|
|
112
|
+
const scheduleSign = {
|
|
113
|
+
scheduleId: tx._scheduleId.toString()
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
type: "SCHEDULESIGN",
|
|
117
|
+
humanReadableType: "Schedule Sign",
|
|
118
|
+
scheduleSign
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
if (hasTransactionType(transaction, "scheduleDelete")) {
|
|
122
|
+
const scheduleDelete = {
|
|
123
|
+
scheduleId: tx._scheduleId.toString()
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
type: "SCHEDULEDELETE",
|
|
127
|
+
humanReadableType: "Schedule Delete",
|
|
128
|
+
scheduleDelete
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return {};
|
|
132
|
+
} catch (error) {
|
|
133
|
+
return {};
|
|
567
134
|
}
|
|
568
|
-
return data;
|
|
569
135
|
}
|
|
570
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Parse Schedule Create from protobuf data
|
|
138
|
+
*/
|
|
139
|
+
static parseScheduleCreateFromProto(body) {
|
|
571
140
|
if (!body) return void 0;
|
|
572
141
|
const data = {};
|
|
573
|
-
if (body.
|
|
574
|
-
|
|
575
|
-
body.
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
).toString();
|
|
579
|
-
}
|
|
580
|
-
if (body.account) {
|
|
581
|
-
data.accountId = new AccountId(
|
|
582
|
-
body.account.shardNum ?? 0,
|
|
583
|
-
body.account.realmNum ?? 0,
|
|
584
|
-
body.account.accountNum ?? 0
|
|
585
|
-
).toString();
|
|
142
|
+
if (body.scheduledTransactionBody) {
|
|
143
|
+
const schedBytes = proto.SchedulableTransactionBody.encode(
|
|
144
|
+
proto.SchedulableTransactionBody.create(body.scheduledTransactionBody)
|
|
145
|
+
).finish();
|
|
146
|
+
data.scheduledTransactionBody = Buffer.from(schedBytes).toString("base64");
|
|
586
147
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
static parseTokenPause(body) {
|
|
590
|
-
if (!body) return void 0;
|
|
591
|
-
const data = {};
|
|
592
|
-
if (body.token) {
|
|
593
|
-
data.tokenId = new TokenId(
|
|
594
|
-
body.token.shardNum ?? 0,
|
|
595
|
-
body.token.realmNum ?? 0,
|
|
596
|
-
body.token.tokenNum ?? 0
|
|
597
|
-
).toString();
|
|
148
|
+
if (body.memo) {
|
|
149
|
+
data.memo = body.memo;
|
|
598
150
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
static parseTokenUnpause(body) {
|
|
602
|
-
if (!body) return void 0;
|
|
603
|
-
const data = {};
|
|
604
|
-
if (body.token) {
|
|
605
|
-
data.tokenId = new TokenId(
|
|
606
|
-
body.token.shardNum ?? 0,
|
|
607
|
-
body.token.realmNum ?? 0,
|
|
608
|
-
body.token.tokenNum ?? 0
|
|
609
|
-
).toString();
|
|
151
|
+
if (body.adminKey) {
|
|
152
|
+
data.adminKey = parseKey(body.adminKey);
|
|
610
153
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
if (body.token) {
|
|
617
|
-
data.tokenId = new TokenId(
|
|
618
|
-
body.token.shardNum ?? 0,
|
|
619
|
-
body.token.realmNum ?? 0,
|
|
620
|
-
body.token.tokenNum ?? 0
|
|
154
|
+
if (body.payerAccountID) {
|
|
155
|
+
data.payerAccountId = new AccountId(
|
|
156
|
+
body.payerAccountID.shardNum ?? 0,
|
|
157
|
+
body.payerAccountID.realmNum ?? 0,
|
|
158
|
+
body.payerAccountID.accountNum ?? 0
|
|
621
159
|
).toString();
|
|
622
160
|
}
|
|
623
|
-
if (body.
|
|
624
|
-
data.
|
|
625
|
-
body.
|
|
626
|
-
|
|
627
|
-
body.account.accountNum ?? 0
|
|
628
|
-
).toString();
|
|
161
|
+
if (body.expirationTime?.seconds) {
|
|
162
|
+
data.expirationTime = `${Long.fromValue(
|
|
163
|
+
body.expirationTime.seconds
|
|
164
|
+
).toString()}.${body.expirationTime.nanos ?? 0}`;
|
|
629
165
|
}
|
|
630
|
-
if (body.
|
|
631
|
-
data.
|
|
632
|
-
(sn) => Long.fromValue(sn).toString()
|
|
633
|
-
);
|
|
634
|
-
}
|
|
635
|
-
if (body.amount) {
|
|
636
|
-
data.amount = Long.fromValue(body.amount).toString();
|
|
166
|
+
if (body.waitForExpiry !== void 0) {
|
|
167
|
+
data.waitForExpiry = body.waitForExpiry;
|
|
637
168
|
}
|
|
638
169
|
return data;
|
|
639
170
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
data.tokenId = new TokenId(
|
|
645
|
-
body.token.shardNum ?? 0,
|
|
646
|
-
body.token.realmNum ?? 0,
|
|
647
|
-
body.token.tokenNum ?? 0
|
|
648
|
-
).toString();
|
|
649
|
-
}
|
|
650
|
-
return data;
|
|
651
|
-
}
|
|
652
|
-
static parseTokenAssociate(body) {
|
|
171
|
+
/**
|
|
172
|
+
* Parse Schedule Sign from protobuf data
|
|
173
|
+
*/
|
|
174
|
+
static parseScheduleSignFromProto(body) {
|
|
653
175
|
if (!body) return void 0;
|
|
654
176
|
const data = {};
|
|
655
|
-
if (body.
|
|
656
|
-
data.
|
|
657
|
-
body.
|
|
658
|
-
body.
|
|
659
|
-
body.
|
|
177
|
+
if (body.scheduleID) {
|
|
178
|
+
data.scheduleId = new ScheduleId(
|
|
179
|
+
body.scheduleID.shardNum ?? 0,
|
|
180
|
+
body.scheduleID.realmNum ?? 0,
|
|
181
|
+
body.scheduleID.scheduleNum ?? 0
|
|
660
182
|
).toString();
|
|
661
183
|
}
|
|
662
|
-
if (body.tokens && body.tokens.length > 0) {
|
|
663
|
-
data.tokenIds = body.tokens.map(
|
|
664
|
-
(t) => new TokenId(
|
|
665
|
-
t.shardNum ?? 0,
|
|
666
|
-
t.realmNum ?? 0,
|
|
667
|
-
t.tokenNum ?? 0
|
|
668
|
-
).toString()
|
|
669
|
-
);
|
|
670
|
-
}
|
|
671
184
|
return data;
|
|
672
185
|
}
|
|
673
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Parse Schedule Delete from protobuf data
|
|
188
|
+
*/
|
|
189
|
+
static parseScheduleDeleteFromProto(body) {
|
|
674
190
|
if (!body) return void 0;
|
|
675
191
|
const data = {};
|
|
676
|
-
if (body.
|
|
677
|
-
data.
|
|
678
|
-
body.
|
|
679
|
-
body.
|
|
680
|
-
body.
|
|
192
|
+
if (body.scheduleID) {
|
|
193
|
+
data.scheduleId = new ScheduleId(
|
|
194
|
+
body.scheduleID.shardNum ?? 0,
|
|
195
|
+
body.scheduleID.realmNum ?? 0,
|
|
196
|
+
body.scheduleID.scheduleNum ?? 0
|
|
681
197
|
).toString();
|
|
682
198
|
}
|
|
683
|
-
if (body.tokens && body.tokens.length > 0) {
|
|
684
|
-
data.tokenIds = body.tokens.map(
|
|
685
|
-
(t) => new TokenId(
|
|
686
|
-
t.shardNum ?? 0,
|
|
687
|
-
t.realmNum ?? 0,
|
|
688
|
-
t.tokenNum ?? 0
|
|
689
|
-
).toString()
|
|
690
|
-
);
|
|
691
|
-
}
|
|
692
199
|
return data;
|
|
693
200
|
}
|
|
694
201
|
/**
|
|
695
|
-
* Parse
|
|
696
|
-
*
|
|
202
|
+
* Legacy method: Parse schedule create transaction
|
|
203
|
+
* @deprecated Use parseScheduleTransaction instead
|
|
697
204
|
*/
|
|
698
|
-
static
|
|
205
|
+
static parseScheduleCreate(transaction) {
|
|
699
206
|
try {
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
const airdrop = transactionBody.tokenAirdrop;
|
|
703
|
-
return {
|
|
704
|
-
tokenTransfers: (airdrop.tokenTransfers || []).map(
|
|
705
|
-
(transfer) => ({
|
|
706
|
-
tokenId: transfer.token?.toString() || "Unknown",
|
|
707
|
-
transfers: (transfer.transfers || []).map((t) => ({
|
|
708
|
-
accountId: t.accountID?.toString() || "Unknown",
|
|
709
|
-
amount: t.amount?.toString() || "0",
|
|
710
|
-
serialNumbers: t.serialNumbers?.map((sn) => sn.toString())
|
|
711
|
-
}))
|
|
712
|
-
})
|
|
713
|
-
)
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
if (hasTransactionType(transaction, "tokenAirdrop")) {
|
|
717
|
-
const txBody = extractTransactionBody(transaction);
|
|
718
|
-
if (txBody?.tokenAirdrop) {
|
|
719
|
-
return this.parseTokenAirdropFromProto(txBody.tokenAirdrop);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
const tx = transaction;
|
|
723
|
-
const tokenTransfersList = tx._tokenTransfers || [];
|
|
724
|
-
if (tokenTransfersList.length > 0) {
|
|
725
|
-
return {
|
|
726
|
-
tokenTransfers: tokenTransfersList.map((transfer) => ({
|
|
727
|
-
tokenId: transfer.tokenId?.toString() || "Unknown",
|
|
728
|
-
transfers: (transfer.transfers || []).map((t) => ({
|
|
729
|
-
accountId: t.accountId?.toString() || "Unknown",
|
|
730
|
-
amount: t.amount?.toString() || "0",
|
|
731
|
-
serialNumbers: t.serialNumbers?.map((sn) => sn.toString())
|
|
732
|
-
}))
|
|
733
|
-
}))
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
return null;
|
|
207
|
+
const result = this.parseScheduleTransaction(transaction);
|
|
208
|
+
return result.scheduleCreate || null;
|
|
737
209
|
} catch (error) {
|
|
738
|
-
console.warn("[
|
|
210
|
+
console.warn("[ScheduleParser] Failed to parse schedule create:", error);
|
|
739
211
|
return null;
|
|
740
212
|
}
|
|
741
213
|
}
|
|
742
214
|
/**
|
|
743
|
-
*
|
|
215
|
+
* Legacy method: Parse schedule sign transaction
|
|
216
|
+
* @deprecated Use parseScheduleTransaction instead
|
|
744
217
|
*/
|
|
745
|
-
static
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
tokenTransfer.token.tokenNum ?? 0
|
|
753
|
-
) : null;
|
|
754
|
-
const transfers = [];
|
|
755
|
-
if (tokenTransfer.transfers) {
|
|
756
|
-
for (const transfer of tokenTransfer.transfers) {
|
|
757
|
-
const accountId = transfer.accountID ? new AccountId(
|
|
758
|
-
transfer.accountID.shardNum ?? 0,
|
|
759
|
-
transfer.accountID.realmNum ?? 0,
|
|
760
|
-
transfer.accountID.accountNum ?? 0
|
|
761
|
-
) : null;
|
|
762
|
-
transfers.push({
|
|
763
|
-
accountId: accountId?.toString() || "Unknown",
|
|
764
|
-
amount: transfer.amount ? Long.fromValue(transfer.amount).toString() : "0",
|
|
765
|
-
serialNumbers: transfer.serialNumbers?.map(
|
|
766
|
-
(sn) => Long.fromValue(sn).toString()
|
|
767
|
-
)
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
tokenTransfers.push({
|
|
772
|
-
tokenId: token?.toString() || "Unknown",
|
|
773
|
-
transfers
|
|
774
|
-
});
|
|
775
|
-
}
|
|
218
|
+
static parseScheduleSign(transaction) {
|
|
219
|
+
try {
|
|
220
|
+
const result = this.parseScheduleTransaction(transaction);
|
|
221
|
+
return result.scheduleSign || null;
|
|
222
|
+
} catch (error) {
|
|
223
|
+
console.warn("[ScheduleParser] Failed to parse schedule sign:", error);
|
|
224
|
+
return null;
|
|
776
225
|
}
|
|
777
|
-
return { tokenTransfers };
|
|
778
226
|
}
|
|
779
227
|
/**
|
|
780
|
-
*
|
|
781
|
-
*
|
|
228
|
+
* Legacy method: Parse schedule delete transaction
|
|
229
|
+
* @deprecated Use parseScheduleTransaction instead
|
|
782
230
|
*/
|
|
783
|
-
static
|
|
231
|
+
static parseScheduleDelete(transaction) {
|
|
784
232
|
try {
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
const result = {
|
|
788
|
-
tokenName: tx._tokenName || "Unknown Token",
|
|
789
|
-
tokenSymbol: tx._tokenSymbol || "UNKNOWN",
|
|
790
|
-
initialSupply: tx._initialSupply?.toString() || "0",
|
|
791
|
-
decimals: Number(tx._decimals || 0),
|
|
792
|
-
treasuryAccountId: tx._treasuryAccountId?.toString() || "Unknown"
|
|
793
|
-
};
|
|
794
|
-
if (tx._maxSupply) {
|
|
795
|
-
result.maxSupply = tx._maxSupply.toString();
|
|
796
|
-
}
|
|
797
|
-
if (tx._tokenType) {
|
|
798
|
-
result.tokenType = tx._tokenType.toString ? tx._tokenType.toString() : String(tx._tokenType);
|
|
799
|
-
}
|
|
800
|
-
if (tx._supplyType) {
|
|
801
|
-
result.supplyType = tx._supplyType.toString ? tx._supplyType.toString() : String(tx._supplyType);
|
|
802
|
-
}
|
|
803
|
-
if (tx._tokenMemo) {
|
|
804
|
-
result.memo = tx._tokenMemo;
|
|
805
|
-
}
|
|
806
|
-
if (tx._adminKey) {
|
|
807
|
-
result.adminKey = tx._adminKey.toString();
|
|
808
|
-
}
|
|
809
|
-
if (tx._kycKey) {
|
|
810
|
-
result.kycKey = tx._kycKey.toString();
|
|
811
|
-
}
|
|
812
|
-
if (tx._freezeKey) {
|
|
813
|
-
result.freezeKey = tx._freezeKey.toString();
|
|
814
|
-
}
|
|
815
|
-
if (tx._wipeKey) {
|
|
816
|
-
result.wipeKey = tx._wipeKey.toString();
|
|
817
|
-
}
|
|
818
|
-
if (tx._supplyKey) {
|
|
819
|
-
result.supplyKey = tx._supplyKey.toString();
|
|
820
|
-
}
|
|
821
|
-
if (tx._feeScheduleKey) {
|
|
822
|
-
result.feeScheduleKey = tx._feeScheduleKey.toString();
|
|
823
|
-
}
|
|
824
|
-
if (tx._pauseKey) {
|
|
825
|
-
result.pauseKey = tx._pauseKey.toString();
|
|
826
|
-
}
|
|
827
|
-
if (tx._metadataKey) {
|
|
828
|
-
result.metadataKey = tx._metadataKey.toString();
|
|
829
|
-
}
|
|
830
|
-
if (tx._autoRenewAccountId) {
|
|
831
|
-
result.autoRenewAccount = tx._autoRenewAccountId.toString();
|
|
832
|
-
}
|
|
833
|
-
if (tx._autoRenewPeriod) {
|
|
834
|
-
result.autoRenewPeriod = tx._autoRenewPeriod.seconds?.toString() || tx._autoRenewPeriod.toString();
|
|
835
|
-
}
|
|
836
|
-
if (tx._expirationTime) {
|
|
837
|
-
result.expiry = tx._expirationTime.seconds?.toString() || tx._expirationTime.toString();
|
|
838
|
-
}
|
|
839
|
-
if (tx._customFees && Array.isArray(tx._customFees) && tx._customFees.length > 0) {
|
|
840
|
-
result.customFees = tx._customFees.map((fee) => {
|
|
841
|
-
const customFee = {
|
|
842
|
-
feeCollectorAccountId: fee.feeCollectorAccountId?.toString() || "",
|
|
843
|
-
feeType: "FIXED_FEE"
|
|
844
|
-
};
|
|
845
|
-
if (fee.fixedFee) {
|
|
846
|
-
customFee.feeType = "FIXED_FEE";
|
|
847
|
-
customFee.fixedFee = {
|
|
848
|
-
amount: fee.fixedFee.amount?.toString() || "0",
|
|
849
|
-
denominatingTokenId: fee.fixedFee.denominatingTokenId?.toString()
|
|
850
|
-
};
|
|
851
|
-
} else if (fee.fractionalFee) {
|
|
852
|
-
customFee.feeType = "FRACTIONAL_FEE";
|
|
853
|
-
customFee.fractionalFee = {
|
|
854
|
-
numerator: fee.fractionalFee.numerator?.toString() || "0",
|
|
855
|
-
denominator: fee.fractionalFee.denominator?.toString() || "1",
|
|
856
|
-
minimumAmount: fee.fractionalFee.minimumAmount?.toString() || "0",
|
|
857
|
-
maximumAmount: fee.fractionalFee.maximumAmount?.toString() || "0",
|
|
858
|
-
netOfTransfers: fee.fractionalFee.netOfTransfers || false
|
|
859
|
-
};
|
|
860
|
-
} else if (fee.royaltyFee) {
|
|
861
|
-
customFee.feeType = "ROYALTY_FEE";
|
|
862
|
-
customFee.royaltyFee = {
|
|
863
|
-
numerator: fee.royaltyFee.numerator?.toString() || "0",
|
|
864
|
-
denominator: fee.royaltyFee.denominator?.toString() || "1",
|
|
865
|
-
fallbackFee: fee.royaltyFee.fallbackFee ? {
|
|
866
|
-
amount: fee.royaltyFee.fallbackFee.amount?.toString() || "0",
|
|
867
|
-
denominatingTokenId: fee.royaltyFee.fallbackFee.denominatingTokenId?.toString()
|
|
868
|
-
} : void 0
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
customFee.allCollectorsAreExempt = fee.allCollectorsAreExempt || false;
|
|
872
|
-
return customFee;
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
return result;
|
|
876
|
-
}
|
|
877
|
-
return null;
|
|
233
|
+
const result = this.parseScheduleTransaction(transaction);
|
|
234
|
+
return result.scheduleDelete || null;
|
|
878
235
|
} catch (error) {
|
|
236
|
+
console.warn("[ScheduleParser] Failed to parse schedule delete:", error);
|
|
879
237
|
return null;
|
|
880
238
|
}
|
|
881
239
|
}
|
|
882
240
|
/**
|
|
883
|
-
*
|
|
884
|
-
* This handles the case where airdrop data is stored in Transaction internals
|
|
241
|
+
* Parse schedule info from transaction body (for scheduled transactions)
|
|
885
242
|
*/
|
|
886
|
-
static
|
|
243
|
+
static extractScheduleInfo(transaction) {
|
|
887
244
|
try {
|
|
245
|
+
const transactionBody = transaction._transactionBody;
|
|
246
|
+
if (transactionBody?.scheduleRef) {
|
|
247
|
+
return {
|
|
248
|
+
isScheduled: true,
|
|
249
|
+
scheduleRef: transactionBody.scheduleRef.toString()
|
|
250
|
+
};
|
|
251
|
+
}
|
|
888
252
|
const tx = transaction;
|
|
889
|
-
if (tx.
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
amount: transfer.amount?.toString() || "0",
|
|
895
|
-
serialNumbers: transfer.serialNumbers?.map((s) => s.toString()) || []
|
|
896
|
-
}))
|
|
897
|
-
}));
|
|
898
|
-
return { tokenTransfers };
|
|
253
|
+
if (tx._scheduleId || tx.scheduleId) {
|
|
254
|
+
return {
|
|
255
|
+
isScheduled: true,
|
|
256
|
+
scheduleRef: (tx._scheduleId || tx.scheduleId)?.toString()
|
|
257
|
+
};
|
|
899
258
|
}
|
|
900
|
-
return
|
|
259
|
+
return { isScheduled: false };
|
|
901
260
|
} catch (error) {
|
|
902
|
-
return
|
|
261
|
+
return { isScheduled: false };
|
|
903
262
|
}
|
|
904
263
|
}
|
|
905
264
|
/**
|
|
906
|
-
* Parse
|
|
907
|
-
* This is
|
|
265
|
+
* Parse a scheduled transaction body to extract the inner transaction
|
|
266
|
+
* This is used when a schedule contains another transaction to be executed
|
|
908
267
|
*/
|
|
909
|
-
static
|
|
268
|
+
static parseScheduledTransactionBody(scheduledTxBytes) {
|
|
910
269
|
try {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
let txBody = null;
|
|
918
|
-
if (tx.bodyBytes && tx.bodyBytes.length > 0) {
|
|
919
|
-
txBody = proto.TransactionBody.decode(tx.bodyBytes);
|
|
920
|
-
} else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
|
|
921
|
-
const signedTx = proto.SignedTransaction.decode(
|
|
922
|
-
tx.signedTransactionBytes
|
|
923
|
-
);
|
|
924
|
-
if (signedTx.bodyBytes) {
|
|
925
|
-
txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
if (txBody) {
|
|
929
|
-
if (txBody.tokenCreation) {
|
|
930
|
-
const tokenCreation2 = this.parseTokenCreate(
|
|
931
|
-
txBody.tokenCreation
|
|
932
|
-
);
|
|
933
|
-
if (tokenCreation2) {
|
|
934
|
-
return {
|
|
935
|
-
type: "TOKENCREATE",
|
|
936
|
-
humanReadableType: "Token Creation",
|
|
937
|
-
tokenCreation: tokenCreation2
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
if (txBody.tokenMint) {
|
|
942
|
-
const tokenMint = this.parseTokenMint(txBody.tokenMint);
|
|
943
|
-
if (tokenMint) {
|
|
944
|
-
return {
|
|
945
|
-
type: "TOKENMINT",
|
|
946
|
-
humanReadableType: "Token Mint",
|
|
947
|
-
tokenMint
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
if (txBody.tokenBurn) {
|
|
952
|
-
const tokenBurn = this.parseTokenBurn(txBody.tokenBurn);
|
|
953
|
-
if (tokenBurn) {
|
|
954
|
-
return {
|
|
955
|
-
type: "TOKENBURN",
|
|
956
|
-
humanReadableType: "Token Burn",
|
|
957
|
-
tokenBurn
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
if (txBody.tokenUpdate) {
|
|
962
|
-
const tokenUpdate = this.parseTokenUpdate(txBody.tokenUpdate);
|
|
963
|
-
if (tokenUpdate) {
|
|
964
|
-
return {
|
|
965
|
-
type: "TOKENUPDATE",
|
|
966
|
-
humanReadableType: "Token Update",
|
|
967
|
-
tokenUpdate
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
if (txBody.tokenFreeze) {
|
|
972
|
-
const tokenFreeze = this.parseTokenFreeze(txBody.tokenFreeze);
|
|
973
|
-
if (tokenFreeze) {
|
|
974
|
-
return {
|
|
975
|
-
type: "TOKENFREEZE",
|
|
976
|
-
humanReadableType: "Token Freeze",
|
|
977
|
-
tokenFreeze
|
|
978
|
-
};
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
if (txBody.tokenUnfreeze) {
|
|
982
|
-
const tokenUnfreeze = this.parseTokenUnfreeze(
|
|
983
|
-
txBody.tokenUnfreeze
|
|
984
|
-
);
|
|
985
|
-
if (tokenUnfreeze) {
|
|
986
|
-
return {
|
|
987
|
-
type: "TOKENUNFREEZE",
|
|
988
|
-
humanReadableType: "Token Unfreeze",
|
|
989
|
-
tokenUnfreeze
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
if (txBody.tokenGrantKyc) {
|
|
994
|
-
const tokenGrantKyc = this.parseTokenGrantKyc(
|
|
995
|
-
txBody.tokenGrantKyc
|
|
996
|
-
);
|
|
997
|
-
if (tokenGrantKyc) {
|
|
998
|
-
return {
|
|
999
|
-
type: "TOKENGRANTKYC",
|
|
1000
|
-
humanReadableType: "Token Grant KYC",
|
|
1001
|
-
tokenGrantKyc
|
|
1002
|
-
};
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
if (txBody.tokenRevokeKyc) {
|
|
1006
|
-
const tokenRevokeKyc = this.parseTokenRevokeKyc(
|
|
1007
|
-
txBody.tokenRevokeKyc
|
|
1008
|
-
);
|
|
1009
|
-
if (tokenRevokeKyc) {
|
|
1010
|
-
return {
|
|
1011
|
-
type: "TOKENREVOKEKYC",
|
|
1012
|
-
humanReadableType: "Token Revoke KYC",
|
|
1013
|
-
tokenRevokeKyc
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
if (txBody.tokenPause) {
|
|
1018
|
-
const tokenPause = this.parseTokenPause(txBody.tokenPause);
|
|
1019
|
-
if (tokenPause) {
|
|
1020
|
-
return {
|
|
1021
|
-
type: "TOKENPAUSE",
|
|
1022
|
-
humanReadableType: "Token Pause",
|
|
1023
|
-
tokenPause
|
|
1024
|
-
};
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
if (txBody.tokenUnpause) {
|
|
1028
|
-
const tokenUnpause = this.parseTokenUnpause(
|
|
1029
|
-
txBody.tokenUnpause
|
|
1030
|
-
);
|
|
1031
|
-
if (tokenUnpause) {
|
|
1032
|
-
return {
|
|
1033
|
-
type: "TOKENUNPAUSE",
|
|
1034
|
-
humanReadableType: "Token Unpause",
|
|
1035
|
-
tokenUnpause
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
if (txBody.tokenWipe) {
|
|
1040
|
-
const tokenWipeAccount = this.parseTokenWipeAccount(
|
|
1041
|
-
txBody.tokenWipe
|
|
1042
|
-
);
|
|
1043
|
-
if (tokenWipeAccount) {
|
|
1044
|
-
return {
|
|
1045
|
-
type: "TOKENWIPEACCOUNT",
|
|
1046
|
-
humanReadableType: "Token Wipe Account",
|
|
1047
|
-
tokenWipeAccount
|
|
1048
|
-
};
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
if (txBody.tokenDeletion) {
|
|
1052
|
-
const tokenDelete = this.parseTokenDelete(txBody.tokenDeletion);
|
|
1053
|
-
if (tokenDelete) {
|
|
1054
|
-
return {
|
|
1055
|
-
type: "TOKENDELETE",
|
|
1056
|
-
humanReadableType: "Token Delete",
|
|
1057
|
-
tokenDelete
|
|
1058
|
-
};
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
if (txBody.tokenAssociate) {
|
|
1062
|
-
const tokenAssociate = this.parseTokenAssociate(
|
|
1063
|
-
txBody.tokenAssociate
|
|
1064
|
-
);
|
|
1065
|
-
if (tokenAssociate) {
|
|
1066
|
-
return {
|
|
1067
|
-
type: "TOKENASSOCIATE",
|
|
1068
|
-
humanReadableType: "Token Associate",
|
|
1069
|
-
tokenAssociate
|
|
1070
|
-
};
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
if (txBody.tokenDissociate) {
|
|
1074
|
-
const tokenDissociate = this.parseTokenDissociate(
|
|
1075
|
-
txBody.tokenDissociate
|
|
1076
|
-
);
|
|
1077
|
-
if (tokenDissociate) {
|
|
1078
|
-
return {
|
|
1079
|
-
type: "TOKENDISSOCIATE",
|
|
1080
|
-
humanReadableType: "Token Dissociate",
|
|
1081
|
-
tokenDissociate
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
if (txBody.tokenFeeScheduleUpdate) {
|
|
1086
|
-
const tokenFeeScheduleUpdate = this.parseTokenFeeScheduleUpdate(
|
|
1087
|
-
txBody.tokenFeeScheduleUpdate
|
|
1088
|
-
);
|
|
1089
|
-
if (tokenFeeScheduleUpdate) {
|
|
1090
|
-
return {
|
|
1091
|
-
type: "TOKENFEESCHEDULEUPDATE",
|
|
1092
|
-
humanReadableType: "Token Fee Schedule Update",
|
|
1093
|
-
tokenFeeScheduleUpdate
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
if (txBody.tokenAirdrop) {
|
|
1098
|
-
const tokenAirdrop2 = this.parseTokenAirdropFromProto(
|
|
1099
|
-
txBody.tokenAirdrop
|
|
1100
|
-
);
|
|
1101
|
-
if (tokenAirdrop2) {
|
|
1102
|
-
return {
|
|
1103
|
-
type: "TOKENAIRDROP",
|
|
1104
|
-
humanReadableType: "Token Airdrop",
|
|
1105
|
-
tokenAirdrop: tokenAirdrop2
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
} catch (e) {
|
|
1113
|
-
}
|
|
1114
|
-
const protoResult = this.parseHTSTransaction(transaction);
|
|
1115
|
-
if (protoResult.type) {
|
|
1116
|
-
return protoResult;
|
|
270
|
+
let bytes;
|
|
271
|
+
if (scheduledTxBytes.startsWith("0x")) {
|
|
272
|
+
const hexString = scheduledTxBytes.slice(2);
|
|
273
|
+
bytes = new Uint8Array(Buffer.from(hexString, "hex"));
|
|
274
|
+
} else {
|
|
275
|
+
bytes = new Uint8Array(Buffer.from(scheduledTxBytes, "base64"));
|
|
1117
276
|
}
|
|
1118
|
-
const
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
humanReadableType: "Token Creation",
|
|
1124
|
-
tokenCreation
|
|
1125
|
-
};
|
|
1126
|
-
}
|
|
1127
|
-
if (tokenAirdrop) {
|
|
277
|
+
const schedulableBody = proto.SchedulableTransactionBody.decode(bytes);
|
|
278
|
+
const txType = Object.keys(schedulableBody).find(
|
|
279
|
+
(key) => schedulableBody[key] !== null && key !== "transactionFee" && key !== "memo"
|
|
280
|
+
);
|
|
281
|
+
if (txType) {
|
|
1128
282
|
return {
|
|
1129
|
-
type:
|
|
1130
|
-
|
|
1131
|
-
|
|
283
|
+
type: txType.toUpperCase(),
|
|
284
|
+
body: schedulableBody[txType],
|
|
285
|
+
memo: schedulableBody.memo,
|
|
286
|
+
transactionFee: schedulableBody.transactionFee?.toString()
|
|
1132
287
|
};
|
|
1133
288
|
}
|
|
1134
|
-
return
|
|
289
|
+
return null;
|
|
1135
290
|
} catch (error) {
|
|
1136
|
-
|
|
291
|
+
console.warn(
|
|
292
|
+
"[ScheduleParser] Failed to parse scheduled transaction body:",
|
|
293
|
+
error
|
|
294
|
+
);
|
|
295
|
+
return null;
|
|
1137
296
|
}
|
|
1138
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* Parse Schedule Service transaction from Transaction object
|
|
300
|
+
* This is the unified entry point that delegates to the comprehensive parsing logic
|
|
301
|
+
*/
|
|
302
|
+
static parseFromTransactionObject(transaction) {
|
|
303
|
+
return this.parseScheduleTransaction(transaction);
|
|
304
|
+
}
|
|
1139
305
|
}
|
|
1140
306
|
export {
|
|
1141
|
-
|
|
307
|
+
ScheduleParser
|
|
1142
308
|
};
|
|
1143
309
|
//# sourceMappingURL=standards-sdk.es121.js.map
|