UNPKG
@gateway.fm/gtw-dvf-client-js
Version:
latest (3.1.7)
3.1.7
3.1.6
3.1.5
DVF client js lib with gateway.fm rpc endpoints
github.com/gateway-fm/gtw-dvf-client-js
@gateway.fm/gtw-dvf-client-js
/
examples
/
src
/
authWithTradingKey.js
9 lines
(6 loc)
•
288 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
dvf.
config
.
useTradingKey
=
true
const
nonce =
Date
.
now
() /
1000
const
keyPair = sw.
ec
.
keyFromPrivate
(starkPrivKey,
'hex'
)
const
starkSignature = sw.
sign
(keyPair, nonce)
const
getDepositsResponse =
await
dvf.
getDeposits
(
null
, nonce, starkSignature)
logExampleResult
(getDepositsResponse)