1.0.6 • Published 12 months ago

@casperholders/casper-snap v1.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

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.

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago