-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept only string for signing (#215)
* don't take bytes, use hashMessage from ethers * add changeset * devDep bump * include dist files
- Loading branch information
Showing
19 changed files
with
418 additions
and
406 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,5 @@ | ||
--- | ||
'@gnosis.pm/safe-apps-sdk': patch | ||
--- | ||
|
||
Don't accept bytes for signing, use hashMessage from ethers (eip-191) |
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
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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Communicator, SafeInfo, SafeBalances, GetBalanceParams, BytesLike } from '../types'; | ||
import { Communicator, SafeInfo, SafeBalances, GetBalanceParams } from '../types'; | ||
declare class Safe { | ||
private readonly communicator; | ||
constructor(communicator: Communicator); | ||
getInfo(): Promise<SafeInfo>; | ||
experimental_getBalances({ currency }?: GetBalanceParams): Promise<SafeBalances>; | ||
private check1271Signature; | ||
private check1271SignatureBytes; | ||
isMessageSigned(message: BytesLike, signature?: string): Promise<boolean>; | ||
isMessageSigned(message: string, signature?: string): Promise<boolean>; | ||
isMessageHashSigned(messageHash: string, signature?: string): Promise<boolean>; | ||
} | ||
export { Safe }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { ethers } from 'ethers'; | ||
import { BytesLike } from '../types'; | ||
declare const MAGIC_VALUE = "0x1626ba7e"; | ||
declare const MAGIC_VALUE_BYTES = "0x20c13b0b"; | ||
declare const EIP_1271_INTERFACE: ethers.utils.Interface; | ||
declare const EIP_1271_BYTES_INTERFACE: ethers.utils.Interface; | ||
declare const calculateMessageHash: (message: BytesLike) => string; | ||
declare const calculateMessageHash: (message: string) => string; | ||
export { EIP_1271_INTERFACE, EIP_1271_BYTES_INTERFACE, MAGIC_VALUE, MAGIC_VALUE_BYTES, calculateMessageHash }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { GatewayTransactionDetails, SendTransactionsParams, Communicator, SendTransactionsResponse, BytesLike } from '../types'; | ||
import { GatewayTransactionDetails, SendTransactionsParams, Communicator, SendTransactionsResponse } from '../types'; | ||
declare class TXs { | ||
private readonly communicator; | ||
constructor(communicator: Communicator); | ||
getBySafeTxHash(safeTxHash: string): Promise<GatewayTransactionDetails>; | ||
signMessage(message: BytesLike): Promise<SendTransactionsResponse>; | ||
signMessage(message: string): Promise<SendTransactionsResponse>; | ||
send({ txs, params }: SendTransactionsParams): Promise<SendTransactionsResponse>; | ||
} | ||
export { TXs }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.