Merge branch 'wallets'
This commit is contained in:
commit
8963cc8cc4
@ -32,6 +32,6 @@ export const SOLANA_CHAINS = { ...SOLANA_MAINNET_CHAINS, ...SOLANA_TEST_CHAINS }
|
|||||||
* Methods
|
* Methods
|
||||||
*/
|
*/
|
||||||
export const SOLANA_SIGNING_METHODS = {
|
export const SOLANA_SIGNING_METHODS = {
|
||||||
SOLANA_SIGN_TRANSACTION: 'sol_signTransaction',
|
SOLANA_SIGN_TRANSACTION: 'solana_signTransaction',
|
||||||
SOLANA_SIGN_MESSAGE: 'sol_signMessage'
|
SOLANA_SIGN_MESSAGE: 'solana_signMessage'
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,9 @@ export default class SolanaLib {
|
|||||||
|
|
||||||
public async signMessage(message: string) {
|
public async signMessage(message: string) {
|
||||||
const signature = nacl.sign.detached(bs58.decode(message), this.keypair.secretKey)
|
const signature = nacl.sign.detached(bs58.decode(message), this.keypair.secretKey)
|
||||||
|
const bs58Signature = bs58.encode(signature)
|
||||||
|
|
||||||
return signature
|
return { signature: bs58Signature }
|
||||||
}
|
}
|
||||||
|
|
||||||
public async signTransaction(
|
public async signTransaction(
|
||||||
|
Loading…
Reference in New Issue
Block a user