VSC client
NOTE: THIS SECTION HAS NOT BEEN UPDATED FOR MAINNET VSC (PROCEED WITH CAUTION)
Section titled “NOTE: THIS SECTION HAS NOT BEEN UPDATED FOR MAINNET VSC (PROCEED WITH CAUTION)”VSC client
Section titled “VSC client”The VSC clients are libraries that serve a set of wrappers and abstraction layers to more easily communicate with the VSC network.
VSC javascript client
Section titled “VSC javascript client”The API documentation can be found here.
Installation
Section titled “Installation”The VSC javascript client can be installed via npm.
npm i @vsc.eco/client
Account logins
Section titled “Account logins”You choose from various login methods to authenticate yourself on the VSC network. Listed below are the currently available options for this client.
For more information, like creating an account for a specific account type, visit this document.
DID | Private/ Public key
Section titled “DID | Private/ Public key”You can use your generated ed25519 compatible wallet with the VSC client in the following way.
- convert the private key into hex bytes
- register a new Ed25519Provider with the converted secret
- generate a DID and authenticate it
- login to the VSC client
https://github.com/vsc-eco/client/blob/main/src/tests/testBench.ts#L11-L20
In the example above the private key that is used is 44ab29dc82f227322cb924cdc66815da8edc9cb0b409f5ced26ced57e6077aa6.
You can use your Ethereum wallet with the VSC client by following the steps below.
- sha256 hash your private key and convert it to hex
- reference the account in the Web3 provider
- use the provider to authenticate your VSC client
https://github.com/vsc-eco/client/blob/main/src/tests/ethTest.ts#L15-L46
In the example above the private key that is used is 44ab29dc82f227322cb924cdc66815da8edc9cb0b409f5ced26ced57e6077aa6.
Functionalities
Section titled “Functionalities”Invoke contracts
Section titled “Invoke contracts”You can invoke contracts via the VSC client. We have a separate guide on how to do so.
API calls
Section titled “API calls”We have not yet implemented API abstractions in the VSC client.