@casperholders/casper-snap

1.0.6 • Public • Published

Casper Snap

Snap to enable MetaMask users interaction with Casper dapps. For detailed documentation and integration instructions see our helper.

RPC Methods

casper_getAccount

Take one optional parameter which is addressIndex. Default to 0.

Define the index of the Casper address to derive.

casper_sign

Take 3 arguments :

deployInfo -> An object used to display what's inside the deploy we want to sign. Ex:

{
  "deployType": "Deploy Type",
  "deployHash": "Deploy Hash",
  "signingKey": "Signing key",
  "account": "Account hash",
  "bodyHash": "Body hash",
  "chainName": "Chain name",
  "timestamp": "Timestamp",
  "payment": "Cost of the deploy",
  "deployArgs": {
    "arg1": "value1"
  }
}

message -> Your deploy hash to sign. Ex: Buffer.from(deploy.hash).toString('hex')

addressIndex -> Default to 0. Define the index of the Casper address to derive.

casper_signMessage

Take 2 arguments :

message -> Your message to sign. Ex: Hello World

addressIndex -> Default to 0. Define the index of the Casper address to derive.

Readme

Keywords

none

Package Sidebar

Install

npm i @casperholders/casper-snap

Weekly Downloads

1

Version

1.0.6

License

Apache-2.0

Unpacked Size

712 kB

Total Files

6

Last publish

Collaborators

  • killianhascoet