File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
src/provider/chains/algo/sdk Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 6565 "ethereumjs-util" : " ^7.1.4" ,
6666 "hi-base32" : " ^0.5.1" ,
6767 "js-conflux-sdk" : " ^1.7.1" ,
68+ "js-sha512" : " ^0.8.0" ,
6869 "timeout-signal" : " ^1.1.0" ,
6970 "tweetnacl" : " ^1.0.3" ,
7071 "whatwg-url" : " ^11.0.0"
Original file line number Diff line number Diff line change 11/* Copyright (c) 2019 Algorand, llc */
22
3- import * as crypto from 'crypto' ;
4-
3+ import sha512 from 'js-sha512' ;
54import nacl from 'tweetnacl' ;
65
7- export function genericHash ( arr : crypto . BinaryLike ) : Uint8Array {
8- return new Uint8Array ( crypto . createHash ( ' sha512-256' ) . update ( arr ) . digest ( ) ) ;
6+ export function genericHash ( arr : sha512 . Message ) {
7+ return sha512 . sha512_256 . array ( arr ) ;
98}
109
1110// constants
Original file line number Diff line number Diff line change 39723972 resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"
39733973 integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==
39743974
3975+ js-sha512@^0.8.0 :
3976+ version "0.8.0"
3977+ resolved "https://registry.yarnpkg.com/js-sha512/-/js-sha512-0.8.0.tgz#dd22db8d02756faccf19f218e3ed61ec8249f7d4"
3978+ integrity sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==
3979+
39753980js-tokens@^4.0.0 :
39763981 version "4.0.0"
39773982 resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
You can’t perform that action at this time.
0 commit comments