@hashgraphonline/standards-sdk 0.0.109 → 0.0.112-canary.0
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/fees/fee-config-builder.d.ts +115 -0
- package/dist/cjs/fees/fee-config-builder.d.ts.map +1 -0
- package/dist/cjs/fees/index.d.ts +3 -0
- package/dist/cjs/fees/index.d.ts.map +1 -0
- package/dist/cjs/fees/types.d.ts +26 -0
- package/dist/cjs/fees/types.d.ts.map +1 -0
- package/dist/cjs/hcs-10/base-client.d.ts +289 -0
- package/dist/cjs/hcs-10/base-client.d.ts.map +1 -0
- package/dist/cjs/hcs-10/browser.d.ts +126 -0
- package/dist/cjs/hcs-10/browser.d.ts.map +1 -0
- package/dist/cjs/hcs-10/connections-manager.d.ts +357 -0
- package/dist/cjs/hcs-10/connections-manager.d.ts.map +1 -0
- package/dist/cjs/hcs-10/errors.d.ts +14 -0
- package/dist/cjs/hcs-10/errors.d.ts.map +1 -0
- package/dist/cjs/hcs-10/index.d.ts +8 -0
- package/dist/cjs/hcs-10/index.d.ts.map +1 -0
- package/dist/cjs/hcs-10/registrations.d.ts +49 -0
- package/dist/cjs/hcs-10/registrations.d.ts.map +1 -0
- package/dist/cjs/hcs-10/sdk.d.ts +193 -0
- package/dist/cjs/hcs-10/sdk.d.ts.map +1 -0
- package/dist/cjs/hcs-10/types.d.ts +205 -0
- package/dist/cjs/hcs-10/types.d.ts.map +1 -0
- package/dist/cjs/hcs-11/agent-builder.d.ts +53 -0
- package/dist/cjs/hcs-11/agent-builder.d.ts.map +1 -0
- package/dist/cjs/hcs-11/client.d.ts +82 -0
- package/dist/cjs/hcs-11/client.d.ts.map +1 -0
- package/dist/cjs/hcs-11/index.d.ts +5 -0
- package/dist/cjs/hcs-11/index.d.ts.map +1 -0
- package/dist/cjs/hcs-11/person-builder.d.ts +29 -0
- package/dist/cjs/hcs-11/person-builder.d.ts.map +1 -0
- package/dist/cjs/hcs-11/types.d.ts +165 -0
- package/dist/cjs/hcs-11/types.d.ts.map +1 -0
- package/dist/cjs/hcs-3/index.d.ts +2 -0
- package/dist/cjs/hcs-3/index.d.ts.map +1 -0
- package/dist/cjs/hcs-3/src/index.d.ts +47 -0
- package/dist/cjs/hcs-3/src/index.d.ts.map +1 -0
- package/dist/cjs/hcs-7/evm-bridge.d.ts +25 -0
- package/dist/cjs/hcs-7/evm-bridge.d.ts.map +1 -0
- package/dist/cjs/hcs-7/index.d.ts +3 -0
- package/dist/cjs/hcs-7/index.d.ts.map +1 -0
- package/dist/cjs/hcs-7/redis-cache.d.ts +26 -0
- package/dist/cjs/hcs-7/redis-cache.d.ts.map +1 -0
- package/dist/cjs/hcs-7/wasm-bridge.d.ts +72 -0
- package/dist/cjs/hcs-7/wasm-bridge.d.ts.map +1 -0
- package/dist/cjs/index-BmPzMkW9.cjs +11 -0
- package/dist/cjs/index-BmPzMkW9.cjs.map +1 -0
- package/dist/cjs/index-CHar8dVv-CUVf-if8.cjs +11 -0
- package/dist/cjs/index-CHar8dVv-CUVf-if8.cjs.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/inscribe/index.d.ts +3 -0
- package/dist/cjs/inscribe/index.d.ts.map +1 -0
- package/dist/cjs/inscribe/inscriber.d.ts +34 -0
- package/dist/cjs/inscribe/inscriber.d.ts.map +1 -0
- package/dist/cjs/inscribe/types.d.ts +79 -0
- package/dist/cjs/inscribe/types.d.ts.map +1 -0
- package/dist/cjs/services/index.d.ts +3 -0
- package/dist/cjs/services/index.d.ts.map +1 -0
- package/dist/cjs/services/mirror-node.d.ts +444 -0
- package/dist/cjs/services/mirror-node.d.ts.map +1 -0
- package/dist/cjs/services/types.d.ts +573 -0
- package/dist/cjs/services/types.d.ts.map +1 -0
- package/dist/cjs/standards-sdk.cjs +2 -0
- package/dist/cjs/standards-sdk.cjs.map +1 -0
- package/dist/cjs/utils/hrl-resolver.d.ts +53 -0
- package/dist/cjs/utils/hrl-resolver.d.ts.map +1 -0
- package/dist/cjs/utils/index.d.ts +7 -0
- package/dist/cjs/utils/index.d.ts.map +1 -0
- package/dist/cjs/utils/logger.d.ts +24 -0
- package/dist/cjs/utils/logger.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/crypto-parser.d.ts +14 -0
- package/dist/cjs/utils/parsers/crypto-parser.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/file-parser.d.ts +9 -0
- package/dist/cjs/utils/parsers/file-parser.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/hcs-parser.d.ts +9 -0
- package/dist/cjs/utils/parsers/hcs-parser.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/hts-parser.d.ts +20 -0
- package/dist/cjs/utils/parsers/hts-parser.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/parser-utils.d.ts +3 -0
- package/dist/cjs/utils/parsers/parser-utils.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/scs-parser.d.ts +9 -0
- package/dist/cjs/utils/parsers/scs-parser.d.ts.map +1 -0
- package/dist/cjs/utils/parsers/util-parser.d.ts +6 -0
- package/dist/cjs/utils/parsers/util-parser.d.ts.map +1 -0
- package/dist/cjs/utils/progress-reporter.d.ts +54 -0
- package/dist/cjs/utils/progress-reporter.d.ts.map +1 -0
- package/dist/cjs/utils/sleep.d.ts +2 -0
- package/dist/cjs/utils/sleep.d.ts.map +1 -0
- package/dist/cjs/utils/topic-fee-utils.d.ts +12 -0
- package/dist/cjs/utils/topic-fee-utils.d.ts.map +1 -0
- package/dist/cjs/utils/transaction-parser-types.d.ts +317 -0
- package/dist/cjs/utils/transaction-parser-types.d.ts.map +1 -0
- package/dist/cjs/utils/transaction-parser.d.ts +40 -0
- package/dist/cjs/utils/transaction-parser.d.ts.map +1 -0
- package/dist/cjs/utils/types.d.ts +5 -0
- package/dist/cjs/utils/types.d.ts.map +1 -0
- package/dist/es/hcs-10/base-client.d.ts +46 -1
- package/dist/es/hcs-10/base-client.d.ts.map +1 -1
- package/dist/es/hcs-10/browser.d.ts +30 -0
- package/dist/es/hcs-10/browser.d.ts.map +1 -1
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/hcs-10/types.d.ts +34 -0
- package/dist/es/hcs-10/types.d.ts.map +1 -1
- package/dist/es/services/mirror-node.d.ts +231 -3
- package/dist/es/services/mirror-node.d.ts.map +1 -1
- package/dist/es/services/types.d.ts +328 -0
- package/dist/es/services/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es13.js +4 -4
- package/dist/es/standards-sdk.es13.js.map +1 -1
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es18.js +1 -2
- package/dist/es/standards-sdk.es18.js.map +1 -1
- package/dist/es/standards-sdk.es19.js +10 -10
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +2 -2
- package/dist/es/standards-sdk.es21.js +662 -15
- package/dist/es/standards-sdk.es21.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +5543 -122
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +2 -7190
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +501 -3
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +108 -8
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +66 -2
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +242 -4153
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +169 -1037
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +11 -5
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +7136 -36
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +41 -47
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es4.js +2 -2
- package/dist/es/standards-sdk.es4.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +11 -2
- package/dist/es/standards-sdk.es5.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +7 -6
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +6 -5
- package/dist/es/standards-sdk.es8.js.map +1 -1
- package/dist/es/standards-sdk.es9.js +1 -1
- package/dist/umd/hcs-10/base-client.d.ts +46 -1
- package/dist/umd/hcs-10/base-client.d.ts.map +1 -1
- package/dist/umd/hcs-10/browser.d.ts +30 -0
- package/dist/umd/hcs-10/browser.d.ts.map +1 -1
- package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
- package/dist/umd/hcs-10/types.d.ts +34 -0
- package/dist/umd/hcs-10/types.d.ts.map +1 -1
- package/dist/umd/services/mirror-node.d.ts +231 -3
- package/dist/umd/services/mirror-node.d.ts.map +1 -1
- package/dist/umd/services/types.d.ts +328 -0
- package/dist/umd/services/types.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +12 -12
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/package.json +6 -5
- package/dist/es/standards-sdk.es100.js +0 -24
- package/dist/es/standards-sdk.es100.js.map +0 -1
- package/dist/es/standards-sdk.es101.js +0 -47
- package/dist/es/standards-sdk.es101.js.map +0 -1
- package/dist/es/standards-sdk.es102.js +0 -21
- package/dist/es/standards-sdk.es102.js.map +0 -1
- package/dist/es/standards-sdk.es103.js +0 -64
- package/dist/es/standards-sdk.es103.js.map +0 -1
- package/dist/es/standards-sdk.es104.js +0 -1292
- package/dist/es/standards-sdk.es104.js.map +0 -1
- package/dist/es/standards-sdk.es105.js +0 -151
- package/dist/es/standards-sdk.es105.js.map +0 -1
- package/dist/es/standards-sdk.es106.js +0 -94
- package/dist/es/standards-sdk.es106.js.map +0 -1
- package/dist/es/standards-sdk.es107.js +0 -87
- package/dist/es/standards-sdk.es107.js.map +0 -1
- package/dist/es/standards-sdk.es108.js +0 -35
- package/dist/es/standards-sdk.es108.js.map +0 -1
- package/dist/es/standards-sdk.es109.js +0 -9
- package/dist/es/standards-sdk.es109.js.map +0 -1
- package/dist/es/standards-sdk.es110.js +0 -162
- package/dist/es/standards-sdk.es110.js.map +0 -1
- package/dist/es/standards-sdk.es111.js +0 -26
- package/dist/es/standards-sdk.es111.js.map +0 -1
- package/dist/es/standards-sdk.es112.js +0 -796
- package/dist/es/standards-sdk.es112.js.map +0 -1
- package/dist/es/standards-sdk.es113.js +0 -2285
- package/dist/es/standards-sdk.es113.js.map +0 -1
- package/dist/es/standards-sdk.es114.js +0 -177
- package/dist/es/standards-sdk.es114.js.map +0 -1
- package/dist/es/standards-sdk.es115.js +0 -146
- package/dist/es/standards-sdk.es115.js.map +0 -1
- package/dist/es/standards-sdk.es116.js +0 -6
- package/dist/es/standards-sdk.es116.js.map +0 -1
- package/dist/es/standards-sdk.es117.js +0 -5
- package/dist/es/standards-sdk.es117.js.map +0 -1
- package/dist/es/standards-sdk.es118.js +0 -5
- package/dist/es/standards-sdk.es118.js.map +0 -1
- package/dist/es/standards-sdk.es119.js +0 -37
- package/dist/es/standards-sdk.es119.js.map +0 -1
- package/dist/es/standards-sdk.es120.js +0 -36
- package/dist/es/standards-sdk.es120.js.map +0 -1
- package/dist/es/standards-sdk.es121.js +0 -12
- package/dist/es/standards-sdk.es121.js.map +0 -1
- package/dist/es/standards-sdk.es122.js +0 -37
- package/dist/es/standards-sdk.es122.js.map +0 -1
- package/dist/es/standards-sdk.es123.js +0 -24
- package/dist/es/standards-sdk.es123.js.map +0 -1
- package/dist/es/standards-sdk.es124.js +0 -30
- package/dist/es/standards-sdk.es124.js.map +0 -1
- package/dist/es/standards-sdk.es125.js +0 -29
- package/dist/es/standards-sdk.es125.js.map +0 -1
- package/dist/es/standards-sdk.es126.js +0 -41
- package/dist/es/standards-sdk.es126.js.map +0 -1
- package/dist/es/standards-sdk.es127.js +0 -7139
- package/dist/es/standards-sdk.es127.js.map +0 -1
- package/dist/es/standards-sdk.es128.js +0 -13
- package/dist/es/standards-sdk.es128.js.map +0 -1
- package/dist/es/standards-sdk.es129.js +0 -14
- package/dist/es/standards-sdk.es129.js.map +0 -1
- package/dist/es/standards-sdk.es130.js +0 -21
- package/dist/es/standards-sdk.es130.js.map +0 -1
- package/dist/es/standards-sdk.es131.js +0 -9
- package/dist/es/standards-sdk.es131.js.map +0 -1
- package/dist/es/standards-sdk.es132.js +0 -12
- package/dist/es/standards-sdk.es132.js.map +0 -1
- package/dist/es/standards-sdk.es133.js +0 -45
- package/dist/es/standards-sdk.es133.js.map +0 -1
- package/dist/es/standards-sdk.es34.js +0 -504
- package/dist/es/standards-sdk.es34.js.map +0 -1
- package/dist/es/standards-sdk.es35.js +0 -112
- package/dist/es/standards-sdk.es35.js.map +0 -1
- package/dist/es/standards-sdk.es36.js +0 -69
- package/dist/es/standards-sdk.es36.js.map +0 -1
- package/dist/es/standards-sdk.es37.js +0 -260
- package/dist/es/standards-sdk.es37.js.map +0 -1
- package/dist/es/standards-sdk.es38.js +0 -176
- package/dist/es/standards-sdk.es38.js.map +0 -1
- package/dist/es/standards-sdk.es39.js +0 -14
- package/dist/es/standards-sdk.es39.js.map +0 -1
- package/dist/es/standards-sdk.es40.js +0 -13
- package/dist/es/standards-sdk.es40.js.map +0 -1
- package/dist/es/standards-sdk.es41.js +0 -422
- package/dist/es/standards-sdk.es41.js.map +0 -1
- package/dist/es/standards-sdk.es42.js +0 -5
- package/dist/es/standards-sdk.es42.js.map +0 -1
- package/dist/es/standards-sdk.es43.js +0 -123
- package/dist/es/standards-sdk.es43.js.map +0 -1
- package/dist/es/standards-sdk.es44.js +0 -7
- package/dist/es/standards-sdk.es44.js.map +0 -1
- package/dist/es/standards-sdk.es45.js +0 -367
- package/dist/es/standards-sdk.es45.js.map +0 -1
- package/dist/es/standards-sdk.es46.js +0 -9
- package/dist/es/standards-sdk.es46.js.map +0 -1
- package/dist/es/standards-sdk.es47.js +0 -182
- package/dist/es/standards-sdk.es47.js.map +0 -1
- package/dist/es/standards-sdk.es48.js +0 -84
- package/dist/es/standards-sdk.es48.js.map +0 -1
- package/dist/es/standards-sdk.es49.js +0 -117
- package/dist/es/standards-sdk.es49.js.map +0 -1
- package/dist/es/standards-sdk.es50.js +0 -55
- package/dist/es/standards-sdk.es50.js.map +0 -1
- package/dist/es/standards-sdk.es51.js +0 -13
- package/dist/es/standards-sdk.es51.js.map +0 -1
- package/dist/es/standards-sdk.es52.js +0 -100
- package/dist/es/standards-sdk.es52.js.map +0 -1
- package/dist/es/standards-sdk.es53.js +0 -7
- package/dist/es/standards-sdk.es53.js.map +0 -1
- package/dist/es/standards-sdk.es54.js +0 -5
- package/dist/es/standards-sdk.es54.js.map +0 -1
- package/dist/es/standards-sdk.es55.js +0 -116
- package/dist/es/standards-sdk.es55.js.map +0 -1
- package/dist/es/standards-sdk.es56.js +0 -77
- package/dist/es/standards-sdk.es56.js.map +0 -1
- package/dist/es/standards-sdk.es57.js +0 -9
- package/dist/es/standards-sdk.es57.js.map +0 -1
- package/dist/es/standards-sdk.es58.js +0 -8
- package/dist/es/standards-sdk.es58.js.map +0 -1
- package/dist/es/standards-sdk.es59.js +0 -224
- package/dist/es/standards-sdk.es59.js.map +0 -1
- package/dist/es/standards-sdk.es60.js +0 -61
- package/dist/es/standards-sdk.es60.js.map +0 -1
- package/dist/es/standards-sdk.es61.js +0 -72
- package/dist/es/standards-sdk.es61.js.map +0 -1
- package/dist/es/standards-sdk.es62.js +0 -6
- package/dist/es/standards-sdk.es62.js.map +0 -1
- package/dist/es/standards-sdk.es63.js +0 -167
- package/dist/es/standards-sdk.es63.js.map +0 -1
- package/dist/es/standards-sdk.es64.js +0 -35
- package/dist/es/standards-sdk.es64.js.map +0 -1
- package/dist/es/standards-sdk.es65.js +0 -66
- package/dist/es/standards-sdk.es65.js.map +0 -1
- package/dist/es/standards-sdk.es66.js +0 -53
- package/dist/es/standards-sdk.es66.js.map +0 -1
- package/dist/es/standards-sdk.es67.js +0 -13
- package/dist/es/standards-sdk.es67.js.map +0 -1
- package/dist/es/standards-sdk.es68.js +0 -68
- package/dist/es/standards-sdk.es68.js.map +0 -1
- package/dist/es/standards-sdk.es69.js +0 -9
- package/dist/es/standards-sdk.es69.js.map +0 -1
- package/dist/es/standards-sdk.es70.js +0 -18
- package/dist/es/standards-sdk.es70.js.map +0 -1
- package/dist/es/standards-sdk.es71.js +0 -10
- package/dist/es/standards-sdk.es71.js.map +0 -1
- package/dist/es/standards-sdk.es72.js +0 -48
- package/dist/es/standards-sdk.es72.js.map +0 -1
- package/dist/es/standards-sdk.es73.js +0 -5
- package/dist/es/standards-sdk.es73.js.map +0 -1
- package/dist/es/standards-sdk.es74.js +0 -139
- package/dist/es/standards-sdk.es74.js.map +0 -1
- package/dist/es/standards-sdk.es75.js +0 -175
- package/dist/es/standards-sdk.es75.js.map +0 -1
- package/dist/es/standards-sdk.es76.js +0 -5
- package/dist/es/standards-sdk.es76.js.map +0 -1
- package/dist/es/standards-sdk.es77.js +0 -16
- package/dist/es/standards-sdk.es77.js.map +0 -1
- package/dist/es/standards-sdk.es78.js +0 -16
- package/dist/es/standards-sdk.es78.js.map +0 -1
- package/dist/es/standards-sdk.es79.js +0 -104
- package/dist/es/standards-sdk.es79.js.map +0 -1
- package/dist/es/standards-sdk.es80.js +0 -5
- package/dist/es/standards-sdk.es80.js.map +0 -1
- package/dist/es/standards-sdk.es81.js +0 -19
- package/dist/es/standards-sdk.es81.js.map +0 -1
- package/dist/es/standards-sdk.es82.js +0 -412
- package/dist/es/standards-sdk.es82.js.map +0 -1
- package/dist/es/standards-sdk.es83.js +0 -35
- package/dist/es/standards-sdk.es83.js.map +0 -1
- package/dist/es/standards-sdk.es84.js +0 -18
- package/dist/es/standards-sdk.es84.js.map +0 -1
- package/dist/es/standards-sdk.es85.js +0 -7
- package/dist/es/standards-sdk.es85.js.map +0 -1
- package/dist/es/standards-sdk.es86.js +0 -7
- package/dist/es/standards-sdk.es86.js.map +0 -1
- package/dist/es/standards-sdk.es87.js +0 -19
- package/dist/es/standards-sdk.es87.js.map +0 -1
- package/dist/es/standards-sdk.es88.js +0 -8
- package/dist/es/standards-sdk.es88.js.map +0 -1
- package/dist/es/standards-sdk.es89.js +0 -42
- package/dist/es/standards-sdk.es89.js.map +0 -1
- package/dist/es/standards-sdk.es90.js +0 -43
- package/dist/es/standards-sdk.es90.js.map +0 -1
- package/dist/es/standards-sdk.es91.js +0 -40
- package/dist/es/standards-sdk.es91.js.map +0 -1
- package/dist/es/standards-sdk.es92.js +0 -81
- package/dist/es/standards-sdk.es92.js.map +0 -1
- package/dist/es/standards-sdk.es93.js +0 -198
- package/dist/es/standards-sdk.es93.js.map +0 -1
- package/dist/es/standards-sdk.es94.js +0 -441
- package/dist/es/standards-sdk.es94.js.map +0 -1
- package/dist/es/standards-sdk.es95.js +0 -28
- package/dist/es/standards-sdk.es95.js.map +0 -1
- package/dist/es/standards-sdk.es96.js +0 -142
- package/dist/es/standards-sdk.es96.js.map +0 -1
- package/dist/es/standards-sdk.es97.js +0 -21
- package/dist/es/standards-sdk.es97.js.map +0 -1
- package/dist/es/standards-sdk.es98.js +0 -32
- package/dist/es/standards-sdk.es98.js.map +0 -1
- package/dist/es/standards-sdk.es99.js +0 -32
- package/dist/es/standards-sdk.es99.js.map +0 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { HCSMessage, HCS10BaseClient } from './base-client';
|
|
2
|
+
import { AIAgentProfile } from '../hcs-11';
|
|
3
|
+
import { TransactMessage } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a connection request between agents
|
|
6
|
+
*/
|
|
7
|
+
export interface ConnectionRequest {
|
|
8
|
+
id: number;
|
|
9
|
+
requesterId: string;
|
|
10
|
+
requesterTopicId: string;
|
|
11
|
+
targetAccountId: string;
|
|
12
|
+
targetTopicId: string;
|
|
13
|
+
operatorId: string;
|
|
14
|
+
sequenceNumber: number;
|
|
15
|
+
created: Date;
|
|
16
|
+
memo?: string;
|
|
17
|
+
status: 'pending' | 'confirmed' | 'rejected';
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents an active connection between agents
|
|
21
|
+
*/
|
|
22
|
+
export interface Connection {
|
|
23
|
+
connectionTopicId: string;
|
|
24
|
+
targetAccountId: string;
|
|
25
|
+
targetAgentName?: string;
|
|
26
|
+
targetInboundTopicId?: string;
|
|
27
|
+
targetOutboundTopicId?: string;
|
|
28
|
+
status: 'pending' | 'established' | 'needs_confirmation' | 'closed';
|
|
29
|
+
isPending: boolean;
|
|
30
|
+
needsConfirmation: boolean;
|
|
31
|
+
memo?: string;
|
|
32
|
+
created: Date;
|
|
33
|
+
lastActivity?: Date;
|
|
34
|
+
profileInfo?: AIAgentProfile;
|
|
35
|
+
connectionRequestId?: number;
|
|
36
|
+
confirmedRequestId?: number;
|
|
37
|
+
requesterOutboundTopicId?: string;
|
|
38
|
+
inboundRequestId?: number;
|
|
39
|
+
closedReason?: string;
|
|
40
|
+
closeMethod?: string;
|
|
41
|
+
uniqueRequestKey?: string;
|
|
42
|
+
originTopicId?: string;
|
|
43
|
+
processed: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Options for the connections manager
|
|
47
|
+
*/
|
|
48
|
+
export interface ConnectionsManagerOptions {
|
|
49
|
+
logLevel?: 'debug' | 'info' | 'warn' | 'error';
|
|
50
|
+
filterPendingAccountIds?: string[];
|
|
51
|
+
baseClient: HCS10BaseClient;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Defines the interface for a connections manager that handles HCS-10 connections
|
|
55
|
+
* This interface represents the public API of ConnectionsManager
|
|
56
|
+
*/
|
|
57
|
+
export interface IConnectionsManager {
|
|
58
|
+
/**
|
|
59
|
+
* Fetches and processes connection data using the configured client
|
|
60
|
+
* @param accountId - The account ID to fetch connection data for
|
|
61
|
+
* @returns A promise that resolves to an array of Connection objects
|
|
62
|
+
*/
|
|
63
|
+
fetchConnectionData(accountId: string): Promise<Connection[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Process outbound messages to track connection requests and confirmations
|
|
66
|
+
* @param messages - The messages to process
|
|
67
|
+
* @param accountId - The account ID that sent the messages
|
|
68
|
+
* @returns Array of connections after processing
|
|
69
|
+
*/
|
|
70
|
+
processOutboundMessages(messages: HCSMessage[], accountId: string): Connection[];
|
|
71
|
+
/**
|
|
72
|
+
* Process inbound messages to track connection requests and confirmations
|
|
73
|
+
* @param messages - The messages to process
|
|
74
|
+
* @returns Array of connections after processing
|
|
75
|
+
*/
|
|
76
|
+
processInboundMessages(messages: HCSMessage[]): Connection[];
|
|
77
|
+
/**
|
|
78
|
+
* Process connection topic messages to update last activity time
|
|
79
|
+
* @param connectionTopicId - The topic ID of the connection
|
|
80
|
+
* @param messages - The messages to process
|
|
81
|
+
* @returns The updated connection or undefined if not found
|
|
82
|
+
*/
|
|
83
|
+
processConnectionMessages(connectionTopicId: string, messages: HCSMessage[]): Connection | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Adds or updates profile information for a connection
|
|
86
|
+
* @param accountId - The account ID to add profile info for
|
|
87
|
+
* @param profile - The profile information
|
|
88
|
+
*/
|
|
89
|
+
addProfileInfo(accountId: string, profile: AIAgentProfile): void;
|
|
90
|
+
/**
|
|
91
|
+
* Gets all connections
|
|
92
|
+
* @returns Array of all connections that should be visible
|
|
93
|
+
*/
|
|
94
|
+
getAllConnections(): Connection[];
|
|
95
|
+
/**
|
|
96
|
+
* Gets all pending connection requests
|
|
97
|
+
* @returns Array of pending connection requests
|
|
98
|
+
*/
|
|
99
|
+
getPendingRequests(): Connection[];
|
|
100
|
+
/**
|
|
101
|
+
* Gets all active (established) connections
|
|
102
|
+
* @returns Array of active connections
|
|
103
|
+
*/
|
|
104
|
+
getActiveConnections(): Connection[];
|
|
105
|
+
/**
|
|
106
|
+
* Gets all connections needing confirmation
|
|
107
|
+
* @returns Array of connections needing confirmation
|
|
108
|
+
*/
|
|
109
|
+
getConnectionsNeedingConfirmation(): Connection[];
|
|
110
|
+
/**
|
|
111
|
+
* Gets a connection by its topic ID
|
|
112
|
+
* @param connectionTopicId - The topic ID to look up
|
|
113
|
+
* @returns The connection with the given topic ID, or undefined if not found
|
|
114
|
+
*/
|
|
115
|
+
getConnectionByTopicId(connectionTopicId: string): Connection | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Gets a connection by account ID
|
|
118
|
+
* @param accountId - The account ID to look up
|
|
119
|
+
* @returns The connection with the given account ID, or undefined if not found
|
|
120
|
+
*/
|
|
121
|
+
getConnectionByAccountId(accountId: string): Connection | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Gets all connections for a specific account ID
|
|
124
|
+
* @param accountId - The account ID to look up
|
|
125
|
+
* @returns Array of connections for the given account ID
|
|
126
|
+
*/
|
|
127
|
+
getConnectionsByAccountId(accountId: string): Connection[];
|
|
128
|
+
/**
|
|
129
|
+
* Updates or adds a connection
|
|
130
|
+
* @param connection - The connection to update or add
|
|
131
|
+
*/
|
|
132
|
+
updateOrAddConnection(connection: Connection): void;
|
|
133
|
+
/**
|
|
134
|
+
* Clears all tracked connections and requests
|
|
135
|
+
*/
|
|
136
|
+
clearAll(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Checks if a given connection request has been processed already
|
|
139
|
+
* This uses a combination of topic ID and request ID to uniquely identify requests
|
|
140
|
+
*
|
|
141
|
+
* @param inboundTopicId - The inbound topic ID where the request was received
|
|
142
|
+
* @param requestId - The sequence number (request ID)
|
|
143
|
+
* @returns True if this specific request has been processed, false otherwise
|
|
144
|
+
*/
|
|
145
|
+
isConnectionRequestProcessed(inboundTopicId: string, requestId: number): boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Marks a specific connection request as processed
|
|
148
|
+
*
|
|
149
|
+
* @param inboundTopicId - The inbound topic ID where the request was received
|
|
150
|
+
* @param requestId - The sequence number (request ID)
|
|
151
|
+
* @returns True if a matching connection was found and marked, false otherwise
|
|
152
|
+
*/
|
|
153
|
+
markConnectionRequestProcessed(inboundTopicId: string, requestId: number): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Gets pending transactions from a specific connection
|
|
156
|
+
* @param connectionTopicId - The connection topic ID to check for transactions
|
|
157
|
+
* @param limit - Optional limit for the number of transactions to return
|
|
158
|
+
* @returns Array of pending transaction messages sorted by timestamp (newest first)
|
|
159
|
+
*/
|
|
160
|
+
getPendingTransactions(connectionTopicId: string, limit?: number): Promise<TransactMessage[]>;
|
|
161
|
+
/**
|
|
162
|
+
* Gets the status of a scheduled transaction
|
|
163
|
+
* @param scheduleId - The schedule ID to check
|
|
164
|
+
* @returns Status of the scheduled transaction
|
|
165
|
+
*/
|
|
166
|
+
getScheduledTransactionStatus(scheduleId: string): Promise<{
|
|
167
|
+
executed: boolean;
|
|
168
|
+
executedTimestamp?: string;
|
|
169
|
+
deleted: boolean;
|
|
170
|
+
expirationTime?: string;
|
|
171
|
+
}>;
|
|
172
|
+
/**
|
|
173
|
+
* Gets the timestamp of the last message sent by the specified operator on the connection topic
|
|
174
|
+
* @param connectionTopicId - The topic ID to check
|
|
175
|
+
* @param operatorAccountId - The account ID of the operator
|
|
176
|
+
* @returns The timestamp of the last message or undefined if no messages found
|
|
177
|
+
*/
|
|
178
|
+
getLastOperatorActivity(connectionTopicId: string, operatorAccountId: string): Promise<Date | undefined>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* ConnectionsManager provides a unified way to track and manage HCS-10 connections
|
|
182
|
+
* across different applications. It works with both frontend and backend implementations.
|
|
183
|
+
*/
|
|
184
|
+
export declare class ConnectionsManager implements IConnectionsManager {
|
|
185
|
+
private logger;
|
|
186
|
+
private connections;
|
|
187
|
+
private pendingRequests;
|
|
188
|
+
private profileCache;
|
|
189
|
+
private filterPendingAccountIds;
|
|
190
|
+
private baseClient;
|
|
191
|
+
/**
|
|
192
|
+
* Creates a new ConnectionsManager instance
|
|
193
|
+
*/
|
|
194
|
+
constructor(options: ConnectionsManagerOptions);
|
|
195
|
+
/**
|
|
196
|
+
* Fetches and processes connection data using the configured client
|
|
197
|
+
* @param accountId - The account ID to fetch connection data for
|
|
198
|
+
* @returns A promise that resolves to an array of Connection objects
|
|
199
|
+
*/
|
|
200
|
+
fetchConnectionData(accountId: string): Promise<Connection[]>;
|
|
201
|
+
/**
|
|
202
|
+
* Checks target agent inbound topics to find confirmations for pending requests
|
|
203
|
+
* that might not be visible in our local messages
|
|
204
|
+
*/
|
|
205
|
+
private checkTargetInboundTopicsForConfirmations;
|
|
206
|
+
/**
|
|
207
|
+
* Checks target agents' inbound topics for confirmations of our outbound connection requests
|
|
208
|
+
* This complements checkTargetInboundTopicsForConfirmations by looking for confirmations
|
|
209
|
+
* that might have been sent to the target agent's inbound topic rather than our own
|
|
210
|
+
*/
|
|
211
|
+
private checkOutboundRequestsForConfirmations;
|
|
212
|
+
/**
|
|
213
|
+
* Fetches profiles for all connected accounts
|
|
214
|
+
* @param accountId - The account ID making the request
|
|
215
|
+
*/
|
|
216
|
+
private fetchProfilesForConnections;
|
|
217
|
+
/**
|
|
218
|
+
* Updates pending connections with inbound topic IDs from profile info
|
|
219
|
+
* @param accountId - The account ID to update connections for
|
|
220
|
+
* @param profile - The profile containing the inbound topic ID
|
|
221
|
+
*/
|
|
222
|
+
private updatePendingConnectionsWithProfileInfo;
|
|
223
|
+
/**
|
|
224
|
+
* Fetches activity from active connection topics
|
|
225
|
+
* Updates the lastActivity timestamp for each connection based on latest messages
|
|
226
|
+
* @returns Promise that resolves when all activity has been fetched
|
|
227
|
+
*/
|
|
228
|
+
private fetchConnectionActivity;
|
|
229
|
+
/**
|
|
230
|
+
* Checks if an account should be filtered, taking into account existing established connections
|
|
231
|
+
* @param accountId - The account ID to check
|
|
232
|
+
* @returns True if the account should be filtered, false otherwise
|
|
233
|
+
*/
|
|
234
|
+
private shouldFilterAccount;
|
|
235
|
+
/**
|
|
236
|
+
* Process outbound messages to track connection requests and confirmations
|
|
237
|
+
* @param messages - The messages to process
|
|
238
|
+
* @param accountId - The account ID that sent the messages
|
|
239
|
+
* @returns Array of connections after processing
|
|
240
|
+
*/
|
|
241
|
+
processOutboundMessages(messages: HCSMessage[], accountId: string): Connection[];
|
|
242
|
+
/**
|
|
243
|
+
* Process inbound messages to track connection requests and confirmations
|
|
244
|
+
* @param messages - The messages to process
|
|
245
|
+
* @returns Array of connections after processing
|
|
246
|
+
*/
|
|
247
|
+
processInboundMessages(messages: HCSMessage[]): Connection[];
|
|
248
|
+
/**
|
|
249
|
+
* Process connection topic messages to update last activity time
|
|
250
|
+
* @param connectionTopicId - The topic ID of the connection
|
|
251
|
+
* @param messages - The messages to process
|
|
252
|
+
* @returns The updated connection or undefined if not found
|
|
253
|
+
*/
|
|
254
|
+
processConnectionMessages(connectionTopicId: string, messages: HCSMessage[]): Connection | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* Adds or updates profile information for a connection
|
|
257
|
+
* @param accountId - The account ID to add profile info for
|
|
258
|
+
* @param profile - The profile information
|
|
259
|
+
*/
|
|
260
|
+
addProfileInfo(accountId: string, profile: AIAgentProfile): void;
|
|
261
|
+
/**
|
|
262
|
+
* Gets all connections
|
|
263
|
+
* @returns Array of all connections that should be visible
|
|
264
|
+
*/
|
|
265
|
+
getAllConnections(): Connection[];
|
|
266
|
+
/**
|
|
267
|
+
* Gets all pending connection requests
|
|
268
|
+
* @returns Array of pending connection requests
|
|
269
|
+
*/
|
|
270
|
+
getPendingRequests(): Connection[];
|
|
271
|
+
/**
|
|
272
|
+
* Helper method to check if there's an established connection with an account
|
|
273
|
+
* @param accountId - The account ID to check
|
|
274
|
+
* @returns True if there's an established connection, false otherwise
|
|
275
|
+
*/
|
|
276
|
+
private hasEstablishedConnectionWithAccount;
|
|
277
|
+
/**
|
|
278
|
+
* Gets all active (established) connections
|
|
279
|
+
* @returns Array of active connections
|
|
280
|
+
*/
|
|
281
|
+
getActiveConnections(): Connection[];
|
|
282
|
+
/**
|
|
283
|
+
* Gets all connections needing confirmation
|
|
284
|
+
* @returns Array of connections needing confirmation
|
|
285
|
+
*/
|
|
286
|
+
getConnectionsNeedingConfirmation(): Connection[];
|
|
287
|
+
/**
|
|
288
|
+
* Gets a connection by its topic ID
|
|
289
|
+
* @param connectionTopicId - The topic ID to look up
|
|
290
|
+
* @returns The connection with the given topic ID, or undefined if not found
|
|
291
|
+
*/
|
|
292
|
+
getConnectionByTopicId(connectionTopicId: string): Connection | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Gets a connection by account ID
|
|
295
|
+
* @param accountId - The account ID to look up
|
|
296
|
+
* @returns The connection with the given account ID, or undefined if not found
|
|
297
|
+
*/
|
|
298
|
+
getConnectionByAccountId(accountId: string): Connection | undefined;
|
|
299
|
+
/**
|
|
300
|
+
* Gets all connections for a specific account ID
|
|
301
|
+
* @param accountId - The account ID to look up
|
|
302
|
+
* @returns Array of connections for the given account ID
|
|
303
|
+
*/
|
|
304
|
+
getConnectionsByAccountId(accountId: string): Connection[];
|
|
305
|
+
/**
|
|
306
|
+
* Updates or adds a connection
|
|
307
|
+
* @param connection - The connection to update or add
|
|
308
|
+
*/
|
|
309
|
+
updateOrAddConnection(connection: Connection): void;
|
|
310
|
+
/**
|
|
311
|
+
* Clears all tracked connections and requests
|
|
312
|
+
*/
|
|
313
|
+
clearAll(): void;
|
|
314
|
+
/**
|
|
315
|
+
* Checks if a given connection request has been processed already
|
|
316
|
+
* This uses a combination of topic ID and request ID to uniquely identify requests
|
|
317
|
+
*
|
|
318
|
+
* @param inboundTopicId - The inbound topic ID where the request was received
|
|
319
|
+
* @param requestId - The sequence number (request ID)
|
|
320
|
+
* @returns True if this specific request has been processed, false otherwise
|
|
321
|
+
*/
|
|
322
|
+
isConnectionRequestProcessed(inboundTopicId: string, requestId: number): boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Marks a specific connection request as processed
|
|
325
|
+
*
|
|
326
|
+
* @param inboundTopicId - The inbound topic ID where the request was received
|
|
327
|
+
* @param requestId - The sequence number (request ID)
|
|
328
|
+
* @returns True if a matching connection was found and marked, false otherwise
|
|
329
|
+
*/
|
|
330
|
+
markConnectionRequestProcessed(inboundTopicId: string, requestId: number): boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Gets pending transactions from a specific connection
|
|
333
|
+
* @param connectionTopicId - The connection topic ID to check for transactions
|
|
334
|
+
* @param limit - Optional limit for the number of transactions to return
|
|
335
|
+
* @returns Array of pending transaction messages sorted by timestamp (newest first)
|
|
336
|
+
*/
|
|
337
|
+
getPendingTransactions(connectionTopicId: string, limit?: number): Promise<TransactMessage[]>;
|
|
338
|
+
/**
|
|
339
|
+
* Gets the status of a scheduled transaction
|
|
340
|
+
* @param scheduleId - The schedule ID to check
|
|
341
|
+
* @returns Status of the scheduled transaction
|
|
342
|
+
*/
|
|
343
|
+
getScheduledTransactionStatus(scheduleId: string): Promise<{
|
|
344
|
+
executed: boolean;
|
|
345
|
+
executedTimestamp?: string;
|
|
346
|
+
deleted: boolean;
|
|
347
|
+
expirationTime?: string;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* Gets the timestamp of the last message sent by the specified operator on the connection topic
|
|
351
|
+
* @param connectionTopicId - The topic ID to check
|
|
352
|
+
* @param operatorAccountId - The account ID of the operator
|
|
353
|
+
* @returns The timestamp of the last message or undefined if no messages found
|
|
354
|
+
*/
|
|
355
|
+
getLastOperatorActivity(connectionTopicId: string, operatorAccountId: string): Promise<Date | undefined>;
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=connections-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections-manager.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/connections-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;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G;IACG,sBAAsB,CAC1B,iBAAiB,EAAE,MAAM,EACzB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,EAAE,CAAC;IAgC7B;;;;OAIG;IACG,6BAA6B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QAC/D,QAAQ,EAAE,OAAO,CAAC;QAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,OAAO,EAAE,OAAO,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IAIF;;;;;OAKG;IACG,uBAAuB,CAC3B,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;CA2B7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class PayloadSizeError extends Error {
|
|
2
|
+
payloadSize: number;
|
|
3
|
+
constructor(message: string, payloadSize: number);
|
|
4
|
+
}
|
|
5
|
+
export declare class AccountCreationError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class TopicCreationError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class ConnectionConfirmationError extends Error {
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAiB,SAAQ,KAAK;IACL,WAAW,EAAE,MAAM;gBAA3C,OAAO,EAAE,MAAM,EAAS,WAAW,EAAE,MAAM;CAIxD;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Logger } from '../utils/logger';
|
|
2
|
+
import { RegistrationSearchResult, RegistrationResult, RegistrationSearchOptions } from './types';
|
|
3
|
+
export interface RegistrationStatusResponse {
|
|
4
|
+
status: 'pending' | 'success' | 'failed';
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class Registration {
|
|
8
|
+
/**
|
|
9
|
+
* Checks the status of a registration request.
|
|
10
|
+
*
|
|
11
|
+
* @param transactionId - The transaction ID of the registration.
|
|
12
|
+
* @param network - The network to use for the registration.
|
|
13
|
+
* @param baseUrl - The base URL of the guarded registry.
|
|
14
|
+
* @param logger - The logger to use for logging.
|
|
15
|
+
* @returns A promise that resolves to the registration status response.
|
|
16
|
+
*/
|
|
17
|
+
protected checkRegistrationStatus(transactionId: string, network: string, baseUrl: string, logger?: Logger): Promise<RegistrationStatusResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Waits for a registration to be confirmed.
|
|
20
|
+
*
|
|
21
|
+
* @param transactionId - The transaction ID of the registration.
|
|
22
|
+
* @param network - The network to use for the registration.
|
|
23
|
+
* @param baseUrl - The base URL of the guarded registry.
|
|
24
|
+
* @param maxAttempts - The maximum number of attempts to check the registration status.
|
|
25
|
+
* @param delayMs - The delay in milliseconds between attempts.
|
|
26
|
+
* @param logger - The logger to use for logging.
|
|
27
|
+
* @returns A promise that resolves to true if the registration is confirmed, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
waitForRegistrationConfirmation(transactionId: string, network: string, baseUrl: string, maxAttempts?: number, delayMs?: number, logger?: Logger): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Executes a registration request for an agent.
|
|
32
|
+
*
|
|
33
|
+
* @param accountId - The account ID of the agent to register.
|
|
34
|
+
* @param network - The network to use for the registration.
|
|
35
|
+
* @param baseUrl - The base URL of the guarded registry.
|
|
36
|
+
* @param logger - The logger to use for logging.
|
|
37
|
+
* @returns A promise that resolves to the registration result.
|
|
38
|
+
*/
|
|
39
|
+
executeRegistration(accountId: string, network?: string, baseUrl?: string, logger?: Logger): Promise<RegistrationResult>;
|
|
40
|
+
/**
|
|
41
|
+
* Finds registrations based on the provided options.
|
|
42
|
+
*
|
|
43
|
+
* @param options - The options for searching registrations.
|
|
44
|
+
* @param baseUrl - The base URL of the guarded registry.
|
|
45
|
+
* @returns A promise that resolves to the registration search result.
|
|
46
|
+
*/
|
|
47
|
+
findRegistrations(options?: RegistrationSearchOptions, baseUrl?: string): Promise<RegistrationSearchResult>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=registrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registrations.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/registrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAElB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8BAAsB,YAAY;IAChC;;;;;;;;OAQG;cACa,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,0BAA0B,CAAC;IA4BtC;;;;;;;;;;OAUG;IACG,+BAA+B,CACnC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAW,EACxB,OAAO,GAAE,MAAa,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;;;;;;OAQG;IACG,mBAAmB,CACvB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,MAAkB,EAC3B,OAAO,GAAE,MAAiC,EAC1C,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC;IA2H9B;;;;;;OAMG;IACG,iBAAiB,CACrB,OAAO,GAAE,yBAA8B,EACvC,OAAO,GAAE,MAAiC,GACzC,OAAO,CAAC,wBAAwB,CAAC;CAwDrC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { Client, PrivateKey, KeyList, Transaction, TransactionReceipt, PublicKey } from '@hashgraph/sdk';
|
|
2
|
+
import { RetrievedInscriptionResult } from '@kiloscribe/inscription-sdk';
|
|
3
|
+
import { Logger } from '../utils/logger';
|
|
4
|
+
import { HCS10BaseClient } from './base-client';
|
|
5
|
+
import { HCSClientConfig, CreateAccountResponse, CreateAgentResponse, StoreHCS11ProfileResponse, AgentRegistrationResult, HandleConnectionRequestResponse, WaitForConnectionConfirmationResponse, GetAccountAndSignerResponse, AgentCreationState, RegistrationProgressCallback, InscribePfpResponse } from './types';
|
|
6
|
+
import { InboundTopicType, AgentMetadata } from '../hcs-11';
|
|
7
|
+
import { FeeConfigBuilderInterface, TopicFeeConfig } from '../fees';
|
|
8
|
+
import { AgentBuilder } from '../hcs-11/agent-builder';
|
|
9
|
+
export declare class HCS10Client extends HCS10BaseClient {
|
|
10
|
+
private client;
|
|
11
|
+
private operatorPrivateKey;
|
|
12
|
+
protected network: string;
|
|
13
|
+
protected logger: Logger;
|
|
14
|
+
protected guardedRegistryBaseUrl: string;
|
|
15
|
+
private hcs11Client;
|
|
16
|
+
constructor(config: HCSClientConfig);
|
|
17
|
+
getClient(): Client;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new Hedera account
|
|
20
|
+
* @param initialBalance Optional initial balance in HBAR (default: 50)
|
|
21
|
+
* @returns Object with account ID and private key
|
|
22
|
+
*/
|
|
23
|
+
createAccount(initialBalance?: number): Promise<CreateAccountResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an inbound topic for an agent
|
|
26
|
+
* @param accountId The account ID associated with the inbound topic
|
|
27
|
+
* @param topicType Type of inbound topic (public, controlled, or fee-based)
|
|
28
|
+
* @param ttl Optional Time-To-Live for the topic memo, defaults to 60
|
|
29
|
+
* @param feeConfigBuilder Optional fee configuration builder for fee-based topics
|
|
30
|
+
* @returns The topic ID of the created inbound topic
|
|
31
|
+
*/
|
|
32
|
+
createInboundTopic(accountId: string, topicType: InboundTopicType, ttl?: number, feeConfigBuilder?: FeeConfigBuilderInterface): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new agent with inbound and outbound topics
|
|
35
|
+
* @param builder The agent builder object
|
|
36
|
+
* @param ttl Optional Time-To-Live for the topic memos, defaults to 60
|
|
37
|
+
* @returns Object with topic IDs
|
|
38
|
+
*/
|
|
39
|
+
createAgent(builder: AgentBuilder, ttl?: number): Promise<CreateAgentResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Inscribes a profile picture to Hedera
|
|
42
|
+
* @param buffer Profile picture buffer
|
|
43
|
+
* @param fileName Filename
|
|
44
|
+
* @returns Response with topic ID and transaction ID
|
|
45
|
+
*/
|
|
46
|
+
inscribePfp(buffer: Buffer, fileName: string): Promise<InscribePfpResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Stores an HCS-11 profile for an agent
|
|
49
|
+
* @param agentName Agent name
|
|
50
|
+
* @param agentBio Agent description
|
|
51
|
+
* @param inboundTopicId Inbound topic ID
|
|
52
|
+
* @param outboundTopicId Outbound topic ID
|
|
53
|
+
* @param capabilities Agent capability tags
|
|
54
|
+
* @param metadata Additional metadata
|
|
55
|
+
* @param pfpBuffer Optional profile picture buffer
|
|
56
|
+
* @param pfpFileName Optional profile picture filename
|
|
57
|
+
* @returns Response with topic IDs and transaction ID
|
|
58
|
+
*/
|
|
59
|
+
storeHCS11Profile(agentName: string, agentBio: string, inboundTopicId: string, outboundTopicId: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer?: Buffer, pfpFileName?: string, existingPfpTopicId?: string): Promise<StoreHCS11ProfileResponse>;
|
|
60
|
+
private setupFees;
|
|
61
|
+
private setupExemptKeys;
|
|
62
|
+
/**
|
|
63
|
+
* Handles a connection request from another account
|
|
64
|
+
* @param inboundTopicId Inbound topic ID of your agent
|
|
65
|
+
* @param requestingAccountId Requesting account ID
|
|
66
|
+
* @param connectionRequestId Connection request ID
|
|
67
|
+
* @param connectionFeeConfig Optional fee configuration for the connection topic
|
|
68
|
+
* @param ttl Optional ttl parameter with default
|
|
69
|
+
* @returns Response with connection details
|
|
70
|
+
*/
|
|
71
|
+
handleConnectionRequest(inboundTopicId: string, requestingAccountId: string, connectionRequestId: number, connectionFeeConfig?: FeeConfigBuilderInterface, ttl?: number): Promise<HandleConnectionRequestResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Confirms a connection request from another account
|
|
74
|
+
* @param inboundTopicId Inbound topic ID
|
|
75
|
+
* @param connectionTopicId Connection topic ID
|
|
76
|
+
* @param connectedAccountId Connected account ID
|
|
77
|
+
* @param connectionId Connection ID
|
|
78
|
+
* @param memo Memo for the connection request
|
|
79
|
+
* @param submitKey Optional submit key
|
|
80
|
+
* @returns Sequence number of the confirmed connection
|
|
81
|
+
*/
|
|
82
|
+
confirmConnection(inboundTopicId: string, connectionTopicId: string, connectedAccountId: string, connectionId: number, memo: string, submitKey?: PrivateKey): Promise<number>;
|
|
83
|
+
sendMessage(connectionTopicId: string, data: string, memo?: string, submitKey?: PrivateKey, options?: {
|
|
84
|
+
progressCallback?: RegistrationProgressCallback;
|
|
85
|
+
waitMaxAttempts?: number;
|
|
86
|
+
waitIntervalMs?: number;
|
|
87
|
+
}): Promise<TransactionReceipt>;
|
|
88
|
+
createTopic(memo: string, adminKey?: boolean | PublicKey | KeyList, submitKey?: boolean | PublicKey | KeyList, feeConfig?: TopicFeeConfig): Promise<string>;
|
|
89
|
+
submitPayload(topicId: string, payload: object | string, submitKey?: PrivateKey, requiresFee?: boolean): Promise<TransactionReceipt>;
|
|
90
|
+
inscribeFile(buffer: Buffer, fileName: string, options?: {
|
|
91
|
+
progressCallback?: RegistrationProgressCallback;
|
|
92
|
+
waitMaxAttempts?: number;
|
|
93
|
+
waitIntervalMs?: number;
|
|
94
|
+
}): Promise<RetrievedInscriptionResult>;
|
|
95
|
+
/**
|
|
96
|
+
* Waits for confirmation of a connection request
|
|
97
|
+
* @param inboundTopicId Inbound topic ID
|
|
98
|
+
* @param connectionRequestId Connection request ID
|
|
99
|
+
* @param maxAttempts Maximum number of attempts
|
|
100
|
+
* @param delayMs Delay between attempts in milliseconds
|
|
101
|
+
* @returns Connection confirmation details
|
|
102
|
+
*/
|
|
103
|
+
waitForConnectionConfirmation(inboundTopicId: string, connectionRequestId: number, maxAttempts?: number, delayMs?: number, recordConfirmation?: boolean): Promise<WaitForConnectionConfirmationResponse>;
|
|
104
|
+
getAccountAndSigner(): GetAccountAndSignerResponse;
|
|
105
|
+
/**
|
|
106
|
+
* Creates and registers an agent with a Guarded registry.
|
|
107
|
+
*
|
|
108
|
+
* This function performs the following steps:
|
|
109
|
+
* 1. Creates a new account if no existing account is provided.
|
|
110
|
+
* 2. Initializes an HCS10 client with the new account.
|
|
111
|
+
* 3. Creates an agent on the client.
|
|
112
|
+
* 4. Registers the agent with the Hashgraph Online Guarded Registry.
|
|
113
|
+
*
|
|
114
|
+
* @param builder The agent builder object
|
|
115
|
+
* @param options Optional configuration including progress callback and state management
|
|
116
|
+
* @returns Agent registration result
|
|
117
|
+
*/
|
|
118
|
+
createAndRegisterAgent(builder: AgentBuilder, options?: {
|
|
119
|
+
baseUrl?: string;
|
|
120
|
+
progressCallback?: RegistrationProgressCallback;
|
|
121
|
+
existingState?: AgentCreationState;
|
|
122
|
+
initialBalance?: number;
|
|
123
|
+
}): Promise<AgentRegistrationResult>;
|
|
124
|
+
/**
|
|
125
|
+
* Registers an agent with the guarded registry
|
|
126
|
+
* @param accountId Account ID to register
|
|
127
|
+
* @param inboundTopicId Inbound topic ID for the agent
|
|
128
|
+
* @param network Network type ('mainnet' or 'testnet')
|
|
129
|
+
* @param options Optional configuration including progress callback and confirmation settings
|
|
130
|
+
* @returns Registration result
|
|
131
|
+
*/
|
|
132
|
+
registerAgentWithGuardedRegistry(accountId: string, network?: string, options?: {
|
|
133
|
+
progressCallback?: RegistrationProgressCallback;
|
|
134
|
+
maxAttempts?: number;
|
|
135
|
+
delayMs?: number;
|
|
136
|
+
existingState?: AgentCreationState;
|
|
137
|
+
}): Promise<AgentRegistrationResult>;
|
|
138
|
+
/**
|
|
139
|
+
* Registers an agent with the guarded registry. Should be called by a registry.
|
|
140
|
+
* @param registryTopicId - The topic ID of the guarded registry.
|
|
141
|
+
* @param accountId - The account ID of the agent
|
|
142
|
+
* @param inboundTopicId - The topic ID of the inbound topic
|
|
143
|
+
* @param memo - The memo of the agent
|
|
144
|
+
* @param submitKey - The submit key of the agent
|
|
145
|
+
*/
|
|
146
|
+
registerAgent(registryTopicId: string, accountId: string, inboundTopicId: string, memo: string, submitKey?: PrivateKey): Promise<void>;
|
|
147
|
+
getInboundTopicType(topicId: string): Promise<InboundTopicType>;
|
|
148
|
+
getNetwork(): string;
|
|
149
|
+
getLogger(): Logger;
|
|
150
|
+
/**
|
|
151
|
+
* Public method to get the operator account ID configured for this client instance.
|
|
152
|
+
* @returns The operator account ID string, or null if not set.
|
|
153
|
+
*/
|
|
154
|
+
getOperatorAccountId(): string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Creates a scheduled transaction from a transaction object
|
|
157
|
+
* @param transaction The transaction to schedule
|
|
158
|
+
* @param memo Optional memo to include with the scheduled transaction
|
|
159
|
+
* @param expirationTime Optional expiration time in seconds from now
|
|
160
|
+
* @returns Object with schedule ID and transaction ID
|
|
161
|
+
*/
|
|
162
|
+
private createScheduledTransaction;
|
|
163
|
+
/**
|
|
164
|
+
* Sends a transaction operation on a connection topic
|
|
165
|
+
* @param connectionTopicId Connection topic ID
|
|
166
|
+
* @param scheduleId Schedule ID of the scheduled transaction
|
|
167
|
+
* @param data Human-readable description of the transaction, can also be a JSON string or HRL
|
|
168
|
+
* @param submitKey Optional submit key
|
|
169
|
+
* @param options Optional parameters including memo (timestamp is no longer used here)
|
|
170
|
+
* @returns Transaction receipt
|
|
171
|
+
*/
|
|
172
|
+
private sendTransactionOperation;
|
|
173
|
+
/**
|
|
174
|
+
* Creates and sends a transaction operation in one call
|
|
175
|
+
* @param connectionTopicId Connection topic ID for sending the transaction operation
|
|
176
|
+
* @param transaction The transaction to schedule
|
|
177
|
+
* @param data Human-readable description of the transaction, can also be a JSON string or HRL
|
|
178
|
+
* @param options Optional parameters for schedule creation and operation memo
|
|
179
|
+
* @returns Object with schedule details (including scheduleId and its transactionId) and HCS-10 operation receipt
|
|
180
|
+
*/
|
|
181
|
+
sendTransaction(connectionTopicId: string, transaction: Transaction, data: string, options?: {
|
|
182
|
+
scheduleMemo?: string;
|
|
183
|
+
expirationTime?: number;
|
|
184
|
+
submitKey?: PrivateKey;
|
|
185
|
+
operationMemo?: string;
|
|
186
|
+
schedulePayerAccountId?: string;
|
|
187
|
+
}): Promise<{
|
|
188
|
+
scheduleId: string;
|
|
189
|
+
transactionId: string;
|
|
190
|
+
receipt: TransactionReceipt;
|
|
191
|
+
}>;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/sdk.ts"],"names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