-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
icon: link | ||
expanded: true | ||
order: 999 | ||
--- | ||
|
||
# EIP155 RPC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
icon: link | ||
expanded: true | ||
order: 999 | ||
--- | ||
|
||
# Supported Methods | ||
|
||
### personal_sign | ||
The sign method calculates an Ethereum specific signature with: `sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. | ||
|
||
By adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim. | ||
|
||
Note See ecRecover to verify the signature. | ||
|
||
#### Parameters | ||
message, account | ||
|
||
`DATA`, N Bytes - message to sign. | ||
`DATA`, 20 Bytes - address. | ||
|
||
#### Returns | ||
`DATA`: Signature | ||
|
||
#### Example | ||
|
||
``` | ||
// Request | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"method": "personal_sign", | ||
"params":["0xdeadbeaf","0x9b2055d370f73ec7d8a03e965129118dc8f5bf83"], | ||
} | ||
// Result | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b" | ||
} | ||
``` | ||
|
||
|
||
### eth_sign | ||
The sign method calculates an Ethereum specific signature with: `sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. | ||
|
||
By adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim. | ||
|
||
Note the address to sign with must be unlocked. | ||
|
||
#### Parameters | ||
account, message | ||
|
||
`DATA`, 20 Bytes - address. | ||
`DATA`, N Bytes - message to sign. | ||
#### Returns | ||
`DATA`: Signature | ||
|
||
#### Example | ||
|
||
``` | ||
// Request | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"method": "eth_sign", | ||
"params": ["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", "0xdeadbeaf"], | ||
} | ||
// Result | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b" | ||
} | ||
``` | ||
|
||
An example how to use solidity ecrecover to verify the signature calculated with eth_sign can be found here. The contract is deployed on the testnet Ropsten and Rinkeby. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
icon: book | ||
order: 1000 | ||
--- | ||
|
||
# Guide | ||
|
||
`WalletConnect`s `Web3Modal` has many suggestions on wallets on all ecosystems, but these suggestions can be adapted and changed by the dApp developer. If `Bloom` wallet implements features that your app requires, or if you generally want to recomment `Bloom` for your dApp's users, you can include the following code into your code base: | ||
|
||
``` | ||
createWeb3Modal({ | ||
//... | ||
featuredWalletIds: [ | ||
'1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // Bloom wallet | ||
] | ||
}) | ||
``` | ||
|
||
If your dApp requires a feature that most of the wallets don't implement, but `Bloom` does, you can use the following code instead of the code on top: | ||
|
||
``` | ||
createWeb3Modal({ | ||
//... | ||
includeWalletIds: [ | ||
'1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // Bloom wallet | ||
] | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
icon: link | ||
expanded: true | ||
order: 999 | ||
--- | ||
|
||
# WalletConnect | ||
|
||
To be able to connect with the IOTA / Shimmer ecosystem, Bloom implements `WalletConnect`(ref: https://docs.walletconnect.com/quickstart). WalletConnect is a generic interface, which offers the user the freedom to connect their trusted wallet to the dApp. | ||
|
||
If you're a dApp developer and plan to implement `WalletConnect` into your dApp, checkout https://docs.walletconnect.com/web3modal/about. | ||
|
||
[Include Bloom](guide.md) | ||
[Supported Networks and Methods](supported.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
icon: search | ||
order: 998 | ||
--- | ||
|
||
# Supported Networks and Methods | ||
|
||
Bloom currently supports the following events for the following chains: | ||
|
||
## EIP155 | ||
|
||
#### Supported Networks | ||
`eip155:1073`, `eip155:1074` | ||
|
||
#### Supported Methods | ||
`personal_sign`, `eth_sign` | ||
|
||
|
||
#### Implemented Events | ||
`accountsChanged`, `chainChanged` | ||
|
||
|
||
## TIP32 | ||
|
||
#### Supported Networks | ||
|
||
#### Supported Methods | ||
|
||
#### Implemented Events | ||
`accountsChanged`, `chainChanged` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
icon: link | ||
expanded: true | ||
order: 999 | ||
--- | ||
|
||
# TIP32 RPC | ||
|
||
## TBD |