@hashgraphonline/standards-sdk 0.0.96 → 0.0.98
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/es/hcs-10/base-client.d.ts +3 -14
- package/dist/es/hcs-10/base-client.d.ts.map +1 -1
- package/dist/es/hcs-10/connections-manager.d.ts +0 -51
- package/dist/es/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/es/hcs-10/sdk.d.ts +1 -38
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/hcs-10/types.d.ts +0 -9
- package/dist/es/hcs-10/types.d.ts.map +1 -1
- package/dist/es/inscribe/inscriber.d.ts +0 -2
- package/dist/es/inscribe/inscriber.d.ts.map +1 -1
- package/dist/es/services/mirror-node.d.ts +1 -17
- package/dist/es/services/mirror-node.d.ts.map +1 -1
- package/dist/es/services/types.d.ts +0 -24
- package/dist/es/services/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +5 -8
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es10.js +0 -66
- package/dist/es/standards-sdk.es10.js.map +1 -1
- package/dist/es/standards-sdk.es100.js +12 -22
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +13 -793
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +30 -172
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +14 -142
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +4 -13
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +4 -13
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +15 -31
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +4 -14
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +39 -4
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +40 -4
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +36 -15
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +78 -5
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +3 -39
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +2 -40
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +2 -37
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +31 -75
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +32 -20
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +9 -27
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +33 -25
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +4 -4
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es16.js +1 -1
- package/dist/es/standards-sdk.es18.js +2 -2
- package/dist/es/standards-sdk.es19.js +386 -393
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +314 -385
- package/dist/es/standards-sdk.es20.js.map +1 -1
- package/dist/es/standards-sdk.es21.js +128 -357
- package/dist/es/standards-sdk.es21.js.map +1 -1
- package/dist/es/standards-sdk.es22.js +7 -155
- package/dist/es/standards-sdk.es22.js.map +1 -1
- package/dist/es/standards-sdk.es23.js +1041 -7
- package/dist/es/standards-sdk.es23.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +0 -2
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +3 -7190
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +4167 -3
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +7189 -8
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +36 -1041
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +48 -5
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +5 -36
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +100 -47
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +2 -10
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +15 -4166
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +397 -89
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +2 -2
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +2282 -16
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +155 -400
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +194 -2281
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es4.js +1 -1
- package/dist/es/standards-sdk.es40.js +412 -138
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +18 -7129
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +138 -9
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +15 -8
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +27 -16
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +27 -4
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +20 -8
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +44 -3
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +13 -414
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +61 -2
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +8 -31
- package/dist/es/standards-sdk.es5.js.map +1 -1
- package/dist/es/standards-sdk.es50.js +1283 -114
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +147 -3
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +77 -350
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +83 -5
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +27 -174
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +5 -80
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +149 -104
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +21 -50
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +792 -9
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +163 -86
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +142 -3
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +21 -2
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +22 -108
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +24 -72
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +37 -5
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +3 -5
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +3 -220
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +7131 -53
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +419 -69
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +2 -2
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +4 -105
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es70.js +116 -28
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +355 -54
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +5 -49
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +178 -9
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +73 -57
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +113 -5
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +49 -12
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +10 -7
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +93 -41
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +4 -2
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +3 -3
- package/dist/es/standards-sdk.es80.js +2 -136
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +103 -162
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +69 -190
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +5 -437
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +4 -24
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +204 -122
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +57 -17
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +69 -29
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +27 -24
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +57 -15
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es90.js +45 -39
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +9 -17
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +61 -57
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +5 -1288
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +12 -145
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +7 -91
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +43 -82
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +2 -32
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +136 -6
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +161 -148
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/index.d.ts +0 -1
- package/dist/es/utils/index.d.ts.map +1 -1
- package/dist/umd/hcs-10/base-client.d.ts +3 -14
- package/dist/umd/hcs-10/base-client.d.ts.map +1 -1
- package/dist/umd/hcs-10/connections-manager.d.ts +0 -51
- package/dist/umd/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/umd/hcs-10/sdk.d.ts +1 -38
- package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
- package/dist/umd/hcs-10/types.d.ts +0 -9
- package/dist/umd/hcs-10/types.d.ts.map +1 -1
- package/dist/umd/inscribe/inscriber.d.ts +0 -2
- package/dist/umd/inscribe/inscriber.d.ts.map +1 -1
- package/dist/umd/services/mirror-node.d.ts +1 -17
- package/dist/umd/services/mirror-node.d.ts.map +1 -1
- package/dist/umd/services/types.d.ts +0 -24
- package/dist/umd/services/types.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +22 -22
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/dist/umd/utils/index.d.ts +0 -1
- package/dist/umd/utils/index.d.ts.map +1 -1
- package/package.json +8 -12
- package/dist/es/standards-sdk.es119.js +0 -41
- package/dist/es/standards-sdk.es119.js.map +0 -1
- package/dist/es/standards-sdk.es120.js +0 -6
- package/dist/es/standards-sdk.es120.js.map +0 -1
- package/dist/es/standards-sdk.es121.js +0 -5
- package/dist/es/standards-sdk.es121.js.map +0 -1
- package/dist/es/standards-sdk.es122.js +0 -5
- package/dist/es/standards-sdk.es122.js.map +0 -1
- package/dist/es/standards-sdk.es123.js +0 -37
- package/dist/es/standards-sdk.es123.js.map +0 -1
- package/dist/es/standards-sdk.es124.js +0 -36
- package/dist/es/standards-sdk.es124.js.map +0 -1
- package/dist/es/standards-sdk.es125.js +0 -12
- package/dist/es/standards-sdk.es125.js.map +0 -1
- package/dist/es/standards-sdk.es126.js +0 -37
- package/dist/es/standards-sdk.es126.js.map +0 -1
- package/dist/es/utils/transaction-parser.d.ts +0 -103
- package/dist/es/utils/transaction-parser.d.ts.map +0 -1
- package/dist/umd/utils/transaction-parser.d.ts +0 -103
- package/dist/umd/utils/transaction-parser.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashgraphonline/standards-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.98",
|
|
4
4
|
"description": "The Hashgraph Online Standards SDK provides a complete implementation of the Hashgraph Consensus Standards (HCS), giving developers all the tools needed to build applications on Hedera.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -44,13 +44,9 @@
|
|
|
44
44
|
"build": "npm run clean && npm run build:umd && npm run build:es",
|
|
45
45
|
"prepublishOnly": "npm run build",
|
|
46
46
|
"release": "npm publish --access public",
|
|
47
|
-
"release:canary": "npm run prepublishOnly && npm publish --tag canary --access public",
|
|
48
|
-
"version:canary": "node -e \"const pkg=require('./package.json'); const version=pkg.version.split('-')[0]; const timestamp=Date.now(); console.log(`${version}-canary.${timestamp}`);\" > .canary-version && npm version --no-git-tag-version $(cat .canary-version) && rm .canary-version",
|
|
49
|
-
"publish:canary": "npm run version:canary && npm run release:canary",
|
|
50
47
|
"demo:inscribe": "tsx demo/inscribe-demo.ts",
|
|
51
48
|
"demo:hcs-10": "tsx demo/hcs-10/index.ts",
|
|
52
|
-
"demo:fee": "tsx demo/hcs-10/fee-demo.ts",
|
|
53
|
-
"demo:transact": "tsx demo/hcs-10/transact-demo.ts",
|
|
49
|
+
"demo:fee-demo": "tsx demo/hcs-10/fee-demo.ts",
|
|
54
50
|
"demo:polling-agent": "tsx demo/hcs-10/polling-agent.ts",
|
|
55
51
|
"demo:connection-manager": "tsx demo/hcs-10/connection-manager.ts",
|
|
56
52
|
"demo:hrl-content": "tsx demo/hrl-content-demo.ts",
|
|
@@ -61,6 +57,8 @@
|
|
|
61
57
|
"@types/lodash": "^4.17.16",
|
|
62
58
|
"@types/mime-types": "^2.1.4",
|
|
63
59
|
"@types/node": "^22.2.0",
|
|
60
|
+
"@types/jest": "^29.5.14",
|
|
61
|
+
"@swc/jest": "^0.2.37",
|
|
64
62
|
"concurrently": "^8.2.2",
|
|
65
63
|
"json-to-plain-text": "^1.1.4",
|
|
66
64
|
"nodemon": "^3.1.0",
|
|
@@ -69,6 +67,8 @@
|
|
|
69
67
|
"rimraf": "^6.0.1",
|
|
70
68
|
"terser": "^5.39.0",
|
|
71
69
|
"tsx": "^4.19.3",
|
|
70
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
71
|
+
"jest": "^29.7.0",
|
|
72
72
|
"typescript": "^5.8.2",
|
|
73
73
|
"vite": "^6.2.2",
|
|
74
74
|
"vite-plugin-dts": "^4.0.2",
|
|
@@ -77,18 +77,14 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@hashgraph/hedera-wallet-connect": "^1.5.1-0",
|
|
80
|
-
"@hashgraph/proto": "^2.
|
|
81
|
-
"@hashgraph/sdk": "2.
|
|
80
|
+
"@hashgraph/proto": "^2.18.5",
|
|
81
|
+
"@hashgraph/sdk": "2.64.5",
|
|
82
82
|
"@hashgraphonline/hashinal-wc": "^1.0.96",
|
|
83
83
|
"@kiloscribe/inscription-sdk": "^1.0.30",
|
|
84
|
-
"@swc/jest": "^0.2.37",
|
|
85
|
-
"@types/jest": "^29.5.14",
|
|
86
84
|
"dotenv": "^16.4.7",
|
|
87
85
|
"ethers": "^6.13.5",
|
|
88
86
|
"file-type": "^20.4.1",
|
|
89
87
|
"ioredis": "^5.6.0",
|
|
90
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
91
|
-
"jest": "^29.7.0",
|
|
92
88
|
"mime-types": "^2.1.35",
|
|
93
89
|
"pino": "^9.6.0",
|
|
94
90
|
"pino-pretty": "^13.0.0",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2
|
-
const u8a = (a) => a instanceof Uint8Array;
|
|
3
|
-
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
4
|
-
const isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
5
|
-
if (!isLE)
|
|
6
|
-
throw new Error("Non little-endian hardware is not supported");
|
|
7
|
-
function utf8ToBytes(str) {
|
|
8
|
-
if (typeof str !== "string")
|
|
9
|
-
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
|
10
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
|
11
|
-
}
|
|
12
|
-
function toBytes(data) {
|
|
13
|
-
if (typeof data === "string")
|
|
14
|
-
data = utf8ToBytes(data);
|
|
15
|
-
if (!u8a(data))
|
|
16
|
-
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
class Hash {
|
|
20
|
-
// Safe version that clones internal state
|
|
21
|
-
clone() {
|
|
22
|
-
return this._cloneInto();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function wrapConstructor(hashCons) {
|
|
26
|
-
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
27
|
-
const tmp = hashCons();
|
|
28
|
-
hashC.outputLen = tmp.outputLen;
|
|
29
|
-
hashC.blockLen = tmp.blockLen;
|
|
30
|
-
hashC.create = () => hashCons();
|
|
31
|
-
return hashC;
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
Hash,
|
|
35
|
-
isLE,
|
|
36
|
-
toBytes,
|
|
37
|
-
u32,
|
|
38
|
-
utf8ToBytes,
|
|
39
|
-
wrapConstructor
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=standards-sdk.es119.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es119.js","sources":["../../node_modules/@noble/hashes/esm/utils.js"],"sourcesContent":["/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":"AAAA;AAQA,MAAM,MAAM,CAAC,MAAM,aAAa;AAGpB,MAAC,MAAM,CAAC,QAAQ,IAAI,YAAY,IAAI,QAAQ,IAAI,YAAY,KAAK,MAAM,IAAI,aAAa,CAAC,CAAC;AAO1F,MAAC,OAAO,IAAI,WAAW,IAAI,YAAY,CAAC,SAAU,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM;AAChF,IAAI,CAAC;AACD,QAAM,IAAI,MAAM,6CAA6C;AAuD1D,SAAS,YAAY,KAAK;AAC7B,MAAI,OAAO,QAAQ;AACf,UAAM,IAAI,MAAM,oCAAoC,OAAO,GAAG,EAAE;AACpE,SAAO,IAAI,WAAW,IAAI,YAAa,EAAC,OAAO,GAAG,CAAC;AACvD;AAMO,SAAS,QAAQ,MAAM;AAC1B,MAAI,OAAO,SAAS;AAChB,WAAO,YAAY,IAAI;AAC3B,MAAI,CAAC,IAAI,IAAI;AACT,UAAM,IAAI,MAAM,4BAA4B,OAAO,IAAI,EAAE;AAC7D,SAAO;AACX;AAgBO,MAAM,KAAK;AAAA;AAAA,EAEd,QAAQ;AACJ,WAAO,KAAK,WAAY;AAAA,EAChC;AACA;AAQO,SAAS,gBAAgB,UAAU;AACtC,QAAM,QAAQ,CAAC,QAAQ,SAAU,EAAC,OAAO,QAAQ,GAAG,CAAC,EAAE,OAAQ;AAC/D,QAAM,MAAM,SAAU;AACtB,QAAM,YAAY,IAAI;AACtB,QAAM,WAAW,IAAI;AACrB,QAAM,SAAS,MAAM,SAAU;AAC/B,SAAO;AACX;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es120.js","sources":["../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"],"sourcesContent":["'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n"],"names":[],"mappings":";AAGA,MAAA,oBAAe,OAAO,oBAAoB,cAAc,kBAAkB;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es121.js","sources":["../../node_modules/axios/lib/platform/browser/classes/FormData.js"],"sourcesContent":["'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n"],"names":[],"mappings":"AAEA,MAAA,aAAe,OAAO,aAAa,cAAc,WAAW;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es122.js","sources":["../../node_modules/axios/lib/platform/browser/classes/Blob.js"],"sourcesContent":["'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n"],"names":[],"mappings":"AAEA,MAAA,SAAe,OAAO,SAAS,cAAc,OAAO;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
function speedometer(samplesCount, min) {
|
|
2
|
-
samplesCount = samplesCount || 10;
|
|
3
|
-
const bytes = new Array(samplesCount);
|
|
4
|
-
const timestamps = new Array(samplesCount);
|
|
5
|
-
let head = 0;
|
|
6
|
-
let tail = 0;
|
|
7
|
-
let firstSampleTS;
|
|
8
|
-
min = min !== void 0 ? min : 1e3;
|
|
9
|
-
return function push(chunkLength) {
|
|
10
|
-
const now = Date.now();
|
|
11
|
-
const startedAt = timestamps[tail];
|
|
12
|
-
if (!firstSampleTS) {
|
|
13
|
-
firstSampleTS = now;
|
|
14
|
-
}
|
|
15
|
-
bytes[head] = chunkLength;
|
|
16
|
-
timestamps[head] = now;
|
|
17
|
-
let i = tail;
|
|
18
|
-
let bytesCount = 0;
|
|
19
|
-
while (i !== head) {
|
|
20
|
-
bytesCount += bytes[i++];
|
|
21
|
-
i = i % samplesCount;
|
|
22
|
-
}
|
|
23
|
-
head = (head + 1) % samplesCount;
|
|
24
|
-
if (head === tail) {
|
|
25
|
-
tail = (tail + 1) % samplesCount;
|
|
26
|
-
}
|
|
27
|
-
if (now - firstSampleTS < min) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const passed = startedAt && now - startedAt;
|
|
31
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
speedometer as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=standards-sdk.es123.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es123.js","sources":["../../node_modules/axios/lib/helpers/speedometer.js"],"sourcesContent":["'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n"],"names":[],"mappings":"AAQA,SAAS,YAAY,cAAc,KAAK;AACtC,iBAAe,gBAAgB;AAC/B,QAAM,QAAQ,IAAI,MAAM,YAAY;AACpC,QAAM,aAAa,IAAI,MAAM,YAAY;AACzC,MAAI,OAAO;AACX,MAAI,OAAO;AACX,MAAI;AAEJ,QAAM,QAAQ,SAAY,MAAM;AAEhC,SAAO,SAAS,KAAK,aAAa;AAChC,UAAM,MAAM,KAAK,IAAK;AAEtB,UAAM,YAAY,WAAW,IAAI;AAEjC,QAAI,CAAC,eAAe;AAClB,sBAAgB;AAAA,IACtB;AAEI,UAAM,IAAI,IAAI;AACd,eAAW,IAAI,IAAI;AAEnB,QAAI,IAAI;AACR,QAAI,aAAa;AAEjB,WAAO,MAAM,MAAM;AACjB,oBAAc,MAAM,GAAG;AACvB,UAAI,IAAI;AAAA,IACd;AAEI,YAAQ,OAAO,KAAK;AAEpB,QAAI,SAAS,MAAM;AACjB,cAAQ,OAAO,KAAK;AAAA,IAC1B;AAEI,QAAI,MAAM,gBAAgB,KAAK;AAC7B;AAAA,IACN;AAEI,UAAM,SAAS,aAAa,MAAM;AAElC,WAAO,SAAS,KAAK,MAAM,aAAa,MAAO,MAAM,IAAI;AAAA,EAC1D;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
function throttle(fn, freq) {
|
|
2
|
-
let timestamp = 0;
|
|
3
|
-
let threshold = 1e3 / freq;
|
|
4
|
-
let lastArgs;
|
|
5
|
-
let timer;
|
|
6
|
-
const invoke = (args, now = Date.now()) => {
|
|
7
|
-
timestamp = now;
|
|
8
|
-
lastArgs = null;
|
|
9
|
-
if (timer) {
|
|
10
|
-
clearTimeout(timer);
|
|
11
|
-
timer = null;
|
|
12
|
-
}
|
|
13
|
-
fn.apply(null, args);
|
|
14
|
-
};
|
|
15
|
-
const throttled = (...args) => {
|
|
16
|
-
const now = Date.now();
|
|
17
|
-
const passed = now - timestamp;
|
|
18
|
-
if (passed >= threshold) {
|
|
19
|
-
invoke(args, now);
|
|
20
|
-
} else {
|
|
21
|
-
lastArgs = args;
|
|
22
|
-
if (!timer) {
|
|
23
|
-
timer = setTimeout(() => {
|
|
24
|
-
timer = null;
|
|
25
|
-
invoke(lastArgs);
|
|
26
|
-
}, threshold - passed);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
31
|
-
return [throttled, flush];
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
throttle as default
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=standards-sdk.es124.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es124.js","sources":["../../node_modules/axios/lib/helpers/throttle.js"],"sourcesContent":["/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n"],"names":[],"mappings":"AAMA,SAAS,SAAS,IAAI,MAAM;AAC1B,MAAI,YAAY;AAChB,MAAI,YAAY,MAAO;AACvB,MAAI;AACJ,MAAI;AAEJ,QAAM,SAAS,CAAC,MAAM,MAAM,KAAK,IAAG,MAAO;AACzC,gBAAY;AACZ,eAAW;AACX,QAAI,OAAO;AACT,mBAAa,KAAK;AAClB,cAAQ;AAAA,IACd;AACI,OAAG,MAAM,MAAM,IAAI;AAAA,EACvB;AAEE,QAAM,YAAY,IAAI,SAAS;AAC7B,UAAM,MAAM,KAAK,IAAK;AACtB,UAAM,SAAS,MAAM;AACrB,QAAK,UAAU,WAAW;AACxB,aAAO,MAAM,GAAG;AAAA,IACtB,OAAW;AACL,iBAAW;AACX,UAAI,CAAC,OAAO;AACV,gBAAQ,WAAW,MAAM;AACvB,kBAAQ;AACR,iBAAO,QAAQ;AAAA,QACzB,GAAW,YAAY,MAAM;AAAA,MAC7B;AAAA,IACA;AAAA,EACA;AAEE,QAAM,QAAQ,MAAM,YAAY,OAAO,QAAQ;AAE/C,SAAO,CAAC,WAAW,KAAK;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import platform from "./standards-sdk.es77.js";
|
|
2
|
-
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin, isMSIE) => (url) => {
|
|
3
|
-
url = new URL(url, platform.origin);
|
|
4
|
-
return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
|
|
5
|
-
})(
|
|
6
|
-
new URL(platform.origin),
|
|
7
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
8
|
-
) : () => true;
|
|
9
|
-
export {
|
|
10
|
-
isURLSameOrigin as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=standards-sdk.es125.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es125.js","sources":["../../node_modules/axios/lib/helpers/isURLSameOrigin.js"],"sourcesContent":["import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n"],"names":[],"mappings":";AAEA,MAAA,kBAAe,SAAS,wBAAyB,kBAAC,QAAQ,WAAW,CAAC,QAAQ;AAC5E,QAAM,IAAI,IAAI,KAAK,SAAS,MAAM;AAElC,SACE,OAAO,aAAa,IAAI,YACxB,OAAO,SAAS,IAAI,SACnB,UAAU,OAAO,SAAS,IAAI;AAEnC;AAAA,EACE,IAAI,IAAI,SAAS,MAAM;AAAA,EACvB,SAAS,aAAa,kBAAkB,KAAK,SAAS,UAAU,SAAS;AAC3E,IAAI,MAAM;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import utils from "./standards-sdk.es52.js";
|
|
2
|
-
import platform from "./standards-sdk.es77.js";
|
|
3
|
-
const cookies = platform.hasStandardBrowserEnv ? (
|
|
4
|
-
// Standard browser envs support document.cookie
|
|
5
|
-
{
|
|
6
|
-
write(name, value, expires, path, domain, secure) {
|
|
7
|
-
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
8
|
-
utils.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
9
|
-
utils.isString(path) && cookie.push("path=" + path);
|
|
10
|
-
utils.isString(domain) && cookie.push("domain=" + domain);
|
|
11
|
-
secure === true && cookie.push("secure");
|
|
12
|
-
document.cookie = cookie.join("; ");
|
|
13
|
-
},
|
|
14
|
-
read(name) {
|
|
15
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
16
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
17
|
-
},
|
|
18
|
-
remove(name) {
|
|
19
|
-
this.write(name, "", Date.now() - 864e5);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
) : (
|
|
23
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
24
|
-
{
|
|
25
|
-
write() {
|
|
26
|
-
},
|
|
27
|
-
read() {
|
|
28
|
-
return null;
|
|
29
|
-
},
|
|
30
|
-
remove() {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
export {
|
|
35
|
-
cookies as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=standards-sdk.es126.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es126.js","sources":["../../node_modules/axios/lib/helpers/cookies.js"],"sourcesContent":["import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n"],"names":[],"mappings":";;AAGA,MAAe,UAAA,SAAS;AAAA;AAAA,EAGtB;AAAA,IACE,MAAM,MAAM,OAAO,SAAS,MAAM,QAAQ,QAAQ;AAChD,YAAM,SAAS,CAAC,OAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtD,YAAM,SAAS,OAAO,KAAK,OAAO,KAAK,aAAa,IAAI,KAAK,OAAO,EAAE,YAAW,CAAE;AAEnF,YAAM,SAAS,IAAI,KAAK,OAAO,KAAK,UAAU,IAAI;AAElD,YAAM,SAAS,MAAM,KAAK,OAAO,KAAK,YAAY,MAAM;AAExD,iBAAW,QAAQ,OAAO,KAAK,QAAQ;AAEvC,eAAS,SAAS,OAAO,KAAK,IAAI;AAAA,IACnC;AAAA,IAED,KAAK,MAAM;AACT,YAAM,QAAQ,SAAS,OAAO,MAAM,IAAI,OAAO,eAAe,OAAO,WAAW,CAAC;AACjF,aAAQ,QAAQ,mBAAmB,MAAM,CAAC,CAAC,IAAI;AAAA,IAChD;AAAA,IAED,OAAO,MAAM;AACX,WAAK,MAAM,MAAM,IAAI,KAAK,IAAK,IAAG,KAAQ;AAAA,IAChD;AAAA,EACA;AAAA;AAAA;AAAA,EAKE;AAAA,IACE,QAAQ;AAAA,IAAE;AAAA,IACV,OAAO;AACL,aAAO;AAAA,IACR;AAAA,IACD,SAAS;AAAA,IAAA;AAAA,EACV;AAAA;","x_google_ignoreList":[0]}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { proto } from '@hashgraph/proto';
|
|
2
|
-
/**
|
|
3
|
-
* Types for transaction parsing results
|
|
4
|
-
*/
|
|
5
|
-
export type AccountAmount = {
|
|
6
|
-
accountId: string;
|
|
7
|
-
amount: number;
|
|
8
|
-
isDecimal?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type TokenAmount = {
|
|
11
|
-
tokenId: string;
|
|
12
|
-
accountId: string;
|
|
13
|
-
amount: number;
|
|
14
|
-
};
|
|
15
|
-
export type ContractCallData = {
|
|
16
|
-
contractId: string;
|
|
17
|
-
gas: number;
|
|
18
|
-
amount: number;
|
|
19
|
-
functionParameters?: string;
|
|
20
|
-
functionName?: string;
|
|
21
|
-
};
|
|
22
|
-
export type TokenMintData = {
|
|
23
|
-
tokenId: string;
|
|
24
|
-
amount: number;
|
|
25
|
-
metadata?: string[];
|
|
26
|
-
};
|
|
27
|
-
export type TokenBurnData = {
|
|
28
|
-
tokenId: string;
|
|
29
|
-
amount: number;
|
|
30
|
-
serialNumbers?: number[];
|
|
31
|
-
};
|
|
32
|
-
export type ParsedTransaction = {
|
|
33
|
-
type: string;
|
|
34
|
-
humanReadableType: string;
|
|
35
|
-
transfers: AccountAmount[];
|
|
36
|
-
tokenTransfers: TokenAmount[];
|
|
37
|
-
memo?: string;
|
|
38
|
-
transactionFee?: number;
|
|
39
|
-
contractCall?: ContractCallData;
|
|
40
|
-
tokenMint?: TokenMintData;
|
|
41
|
-
tokenBurn?: TokenBurnData;
|
|
42
|
-
raw: proto.SchedulableTransactionBody;
|
|
43
|
-
};
|
|
44
|
-
export declare class TransactionParser {
|
|
45
|
-
/**
|
|
46
|
-
* Parse a base64 encoded transaction body and return structured data
|
|
47
|
-
* @param transactionBodyBase64 - The base64 encoded transaction body
|
|
48
|
-
* @returns The parsed transaction
|
|
49
|
-
*/
|
|
50
|
-
static parseTransactionBody(transactionBodyBase64: string): ParsedTransaction;
|
|
51
|
-
/**
|
|
52
|
-
* Parse details from a complete schedule response
|
|
53
|
-
* @param scheduleResponse - The schedule response to parse
|
|
54
|
-
* @returns The parsed transaction
|
|
55
|
-
*/
|
|
56
|
-
static parseScheduleResponse(scheduleResponse: {
|
|
57
|
-
transaction_body: string;
|
|
58
|
-
memo?: string;
|
|
59
|
-
}): ParsedTransaction;
|
|
60
|
-
/**
|
|
61
|
-
* Determine the transaction type
|
|
62
|
-
* @param txBody - The transaction body to determine the type of
|
|
63
|
-
* @returns The type of the transaction
|
|
64
|
-
*/
|
|
65
|
-
private static getTransactionType;
|
|
66
|
-
/**
|
|
67
|
-
* Convert technical transaction type to human-readable format
|
|
68
|
-
* @param type - The technical transaction type
|
|
69
|
-
* @returns The human-readable transaction type
|
|
70
|
-
*/
|
|
71
|
-
private static getHumanReadableType;
|
|
72
|
-
/**
|
|
73
|
-
* Parse crypto transfers from the transaction
|
|
74
|
-
* @param cryptoTransfer - The crypto transfer transaction body
|
|
75
|
-
* @param result - The parsed transaction
|
|
76
|
-
*/
|
|
77
|
-
private static parseCryptoTransfers;
|
|
78
|
-
/**
|
|
79
|
-
* Parse contract call transaction data
|
|
80
|
-
* @param contractCall - The contract call transaction body
|
|
81
|
-
* @param result - The parsed transaction
|
|
82
|
-
*/
|
|
83
|
-
private static parseContractCall;
|
|
84
|
-
/**
|
|
85
|
-
* Parse token mint transaction data
|
|
86
|
-
* @param tokenMint - The token mint transaction body
|
|
87
|
-
* @param result - The parsed transaction
|
|
88
|
-
*/
|
|
89
|
-
private static parseTokenMint;
|
|
90
|
-
/**
|
|
91
|
-
* Parse token burn transaction data
|
|
92
|
-
* @param tokenBurn - The token burn transaction body
|
|
93
|
-
* @param result - The parsed transaction
|
|
94
|
-
*/
|
|
95
|
-
private static parseTokenBurn;
|
|
96
|
-
/**
|
|
97
|
-
* Get a human-readable summary of the transaction
|
|
98
|
-
* @param parsedTx - The parsed transaction
|
|
99
|
-
* @returns The human-readable summary of the transaction
|
|
100
|
-
*/
|
|
101
|
-
static getTransactionSummary(parsedTx: ParsedTransaction): string;
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=transaction-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-parser.d.ts","sourceRoot":"","sources":["../../../src/utils/transaction-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAYzC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,GAAG,EAAE,KAAK,CAAC,0BAA0B,CAAC;CACvC,CAAC;AAEF,qBAAa,iBAAiB;IAC5B;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACzB,qBAAqB,EAAE,MAAM,GAC5B,iBAAiB;IAgDpB;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,gBAAgB,EAAE;QAC7C,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB;IAcrB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA4EjC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IA8DnC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAkFnC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgDhC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAsC7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAsC7B;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM;CAsFlE"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { proto } from '@hashgraph/proto';
|
|
2
|
-
/**
|
|
3
|
-
* Types for transaction parsing results
|
|
4
|
-
*/
|
|
5
|
-
export type AccountAmount = {
|
|
6
|
-
accountId: string;
|
|
7
|
-
amount: number;
|
|
8
|
-
isDecimal?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type TokenAmount = {
|
|
11
|
-
tokenId: string;
|
|
12
|
-
accountId: string;
|
|
13
|
-
amount: number;
|
|
14
|
-
};
|
|
15
|
-
export type ContractCallData = {
|
|
16
|
-
contractId: string;
|
|
17
|
-
gas: number;
|
|
18
|
-
amount: number;
|
|
19
|
-
functionParameters?: string;
|
|
20
|
-
functionName?: string;
|
|
21
|
-
};
|
|
22
|
-
export type TokenMintData = {
|
|
23
|
-
tokenId: string;
|
|
24
|
-
amount: number;
|
|
25
|
-
metadata?: string[];
|
|
26
|
-
};
|
|
27
|
-
export type TokenBurnData = {
|
|
28
|
-
tokenId: string;
|
|
29
|
-
amount: number;
|
|
30
|
-
serialNumbers?: number[];
|
|
31
|
-
};
|
|
32
|
-
export type ParsedTransaction = {
|
|
33
|
-
type: string;
|
|
34
|
-
humanReadableType: string;
|
|
35
|
-
transfers: AccountAmount[];
|
|
36
|
-
tokenTransfers: TokenAmount[];
|
|
37
|
-
memo?: string;
|
|
38
|
-
transactionFee?: number;
|
|
39
|
-
contractCall?: ContractCallData;
|
|
40
|
-
tokenMint?: TokenMintData;
|
|
41
|
-
tokenBurn?: TokenBurnData;
|
|
42
|
-
raw: proto.SchedulableTransactionBody;
|
|
43
|
-
};
|
|
44
|
-
export declare class TransactionParser {
|
|
45
|
-
/**
|
|
46
|
-
* Parse a base64 encoded transaction body and return structured data
|
|
47
|
-
* @param transactionBodyBase64 - The base64 encoded transaction body
|
|
48
|
-
* @returns The parsed transaction
|
|
49
|
-
*/
|
|
50
|
-
static parseTransactionBody(transactionBodyBase64: string): ParsedTransaction;
|
|
51
|
-
/**
|
|
52
|
-
* Parse details from a complete schedule response
|
|
53
|
-
* @param scheduleResponse - The schedule response to parse
|
|
54
|
-
* @returns The parsed transaction
|
|
55
|
-
*/
|
|
56
|
-
static parseScheduleResponse(scheduleResponse: {
|
|
57
|
-
transaction_body: string;
|
|
58
|
-
memo?: string;
|
|
59
|
-
}): ParsedTransaction;
|
|
60
|
-
/**
|
|
61
|
-
* Determine the transaction type
|
|
62
|
-
* @param txBody - The transaction body to determine the type of
|
|
63
|
-
* @returns The type of the transaction
|
|
64
|
-
*/
|
|
65
|
-
private static getTransactionType;
|
|
66
|
-
/**
|
|
67
|
-
* Convert technical transaction type to human-readable format
|
|
68
|
-
* @param type - The technical transaction type
|
|
69
|
-
* @returns The human-readable transaction type
|
|
70
|
-
*/
|
|
71
|
-
private static getHumanReadableType;
|
|
72
|
-
/**
|
|
73
|
-
* Parse crypto transfers from the transaction
|
|
74
|
-
* @param cryptoTransfer - The crypto transfer transaction body
|
|
75
|
-
* @param result - The parsed transaction
|
|
76
|
-
*/
|
|
77
|
-
private static parseCryptoTransfers;
|
|
78
|
-
/**
|
|
79
|
-
* Parse contract call transaction data
|
|
80
|
-
* @param contractCall - The contract call transaction body
|
|
81
|
-
* @param result - The parsed transaction
|
|
82
|
-
*/
|
|
83
|
-
private static parseContractCall;
|
|
84
|
-
/**
|
|
85
|
-
* Parse token mint transaction data
|
|
86
|
-
* @param tokenMint - The token mint transaction body
|
|
87
|
-
* @param result - The parsed transaction
|
|
88
|
-
*/
|
|
89
|
-
private static parseTokenMint;
|
|
90
|
-
/**
|
|
91
|
-
* Parse token burn transaction data
|
|
92
|
-
* @param tokenBurn - The token burn transaction body
|
|
93
|
-
* @param result - The parsed transaction
|
|
94
|
-
*/
|
|
95
|
-
private static parseTokenBurn;
|
|
96
|
-
/**
|
|
97
|
-
* Get a human-readable summary of the transaction
|
|
98
|
-
* @param parsedTx - The parsed transaction
|
|
99
|
-
* @returns The human-readable summary of the transaction
|
|
100
|
-
*/
|
|
101
|
-
static getTransactionSummary(parsedTx: ParsedTransaction): string;
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=transaction-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-parser.d.ts","sourceRoot":"","sources":["../../../src/utils/transaction-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAYzC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,GAAG,EAAE,KAAK,CAAC,0BAA0B,CAAC;CACvC,CAAC;AAEF,qBAAa,iBAAiB;IAC5B;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACzB,qBAAqB,EAAE,MAAM,GAC5B,iBAAiB;IAgDpB;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,gBAAgB,EAAE;QAC7C,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB;IAcrB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA4EjC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IA8DnC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAkFnC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgDhC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAsC7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAsC7B;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM;CAsFlE"}
|