-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
* add signMessage method * add changest * add type guard to signMessage * add readme for signing a message * calculating hash/validation wip * Add methods to validate sig * remove unused codes, slice return value * dep bump * fix types in tests * add test for generating a message hash * add test comments * add test for check1271Signature * add tests for check1271SignatureBytes * add tests for isSignedMessage * remove console logs * message validation docs wip * add docs for validating message * fix tests for calculating message hash * why tf this test is failing * fix the test by adding timeout * add test for check1271SignatureBytes * fix sdk build command * Separate isMessageHashSigned and isMessageSigned * remove unused comment * fix prettier formatting
- v0.0.0
- @safe-global/safe-apps-web3modal@23.0.0
- @safe-global/safe-apps-web3modal@22.0.0
- @safe-global/safe-apps-web3modal@22.0.0-next.0
- @safe-global/safe-apps-web3modal@21.0.0
- @safe-global/safe-apps-web3modal@20.0.0
- @safe-global/safe-apps-web3modal@19.0.2
- @safe-global/safe-apps-web3modal@19.0.0
- @safe-global/safe-apps-web3modal@18.0.0
- @safe-global/safe-apps-sdk@9.1.0
- @safe-global/safe-apps-sdk@9.0.0
- @safe-global/safe-apps-sdk@9.0.0-next.0
- @safe-global/safe-apps-sdk@8.1.0
- @safe-global/safe-apps-sdk@8.0.0
- @safe-global/safe-apps-sdk@7.11.0
- @safe-global/safe-apps-sdk@7.10.0
- @safe-global/safe-apps-sdk@7.9.0
- @safe-global/safe-apps-react-sdk@4.7.2
- @safe-global/safe-apps-react-sdk@4.7.1
- @safe-global/safe-apps-react-sdk@4.7.1-next.0
- @safe-global/safe-apps-react-sdk@4.7.0
- @safe-global/safe-apps-react-sdk@4.6.7
- @safe-global/safe-apps-react-sdk@4.6.6
- @safe-global/safe-apps-react-sdk@4.6.4
- @safe-global/safe-apps-react-sdk@4.6.3
- @safe-global/safe-apps-provider@0.18.5
- @safe-global/safe-apps-provider@0.18.4
- @safe-global/safe-apps-provider@0.18.3
- @safe-global/safe-apps-provider@0.18.2
- @safe-global/safe-apps-provider@0.18.1
- @safe-global/safe-apps-provider@0.18.1-next.0
- @safe-global/safe-apps-provider@0.18.0
- @safe-global/safe-apps-provider@0.17.1
- @safe-global/safe-apps-provider@0.17.0
- @safe-global/safe-apps-provider@0.16.0
- @safe-global/safe-apps-provider@0.15.2
- @safe-global/cra-template-safe-app@5.0.0
- @safe-global/cra-template-safe-app@4.2.1
- @gnosis.pm/safe-apps-web3modal@17.0.4
- @gnosis.pm/safe-apps-web3modal@17.0.3
- @gnosis.pm/safe-apps-web3modal@17.0.2
- @gnosis.pm/safe-apps-web3modal@17.0.1
- @gnosis.pm/safe-apps-web3modal@17.0.0
- @gnosis.pm/safe-apps-web3modal@16.0.0
- @gnosis.pm/safe-apps-web3modal@15.0.0
- @gnosis.pm/safe-apps-web3modal@14.0.0
- @gnosis.pm/safe-apps-web3modal@13.0.1
- @gnosis.pm/safe-apps-web3modal@13.0.0
- @gnosis.pm/safe-apps-web3modal@12.0.0
- @gnosis.pm/safe-apps-web3modal@11.0.0
- @gnosis.pm/safe-apps-web3modal@10.0.0
- @gnosis.pm/safe-apps-web3modal@9.0.0
- @gnosis.pm/safe-apps-web3modal@8.0.0
- @gnosis.pm/safe-apps-web3modal@7.0.0
- @gnosis.pm/safe-apps-web3modal@6.0.1
- @gnosis.pm/safe-apps-web3modal@6.0.0
- @gnosis.pm/safe-apps-web3modal@5.0.0
- @gnosis.pm/safe-apps-web3modal@4.0.0
- @gnosis.pm/safe-apps-web3modal@4.0.0-next.2
- @gnosis.pm/safe-apps-web3modal@3.0.1-next.1
- @gnosis.pm/safe-apps-web3modal@3.0.1-next.0
- @gnosis.pm/safe-apps-web3modal@3.0.0
- @gnosis.pm/safe-apps-web3modal@3.0.0-next.3
- @gnosis.pm/safe-apps-web3modal@3.0.0-next.2
- @gnosis.pm/safe-apps-web3modal@3.0.0-next.1
- @gnosis.pm/safe-apps-web3modal@3.0.0-next.0
- @gnosis.pm/safe-apps-web3-react@1.5.3
- @gnosis.pm/safe-apps-web3-react@1.5.2
- @gnosis.pm/safe-apps-web3-react@1.5.1
- @gnosis.pm/safe-apps-web3-react@1.5.0
- @gnosis.pm/safe-apps-web3-react@1.4.2
- @gnosis.pm/safe-apps-web3-react@1.4.1
- @gnosis.pm/safe-apps-web3-react@1.4.0
- @gnosis.pm/safe-apps-web3-react@1.3.0
- @gnosis.pm/safe-apps-web3-react@1.2.0
- @gnosis.pm/safe-apps-web3-react@1.1.0
- @gnosis.pm/safe-apps-web3-react@1.0.0
- @gnosis.pm/safe-apps-web3-react@0.7.0
- @gnosis.pm/safe-apps-web3-react@0.6.8
- @gnosis.pm/safe-apps-web3-react@0.6.7
- @gnosis.pm/safe-apps-web3-react@0.6.6
- @gnosis.pm/safe-apps-web3-react@0.6.5
- @gnosis.pm/safe-apps-web3-react@0.6.4
- @gnosis.pm/safe-apps-web3-react@0.6.4-next.2
- @gnosis.pm/safe-apps-web3-react@0.6.4-next.1
- @gnosis.pm/safe-apps-web3-react@0.6.4-next.0
- @gnosis.pm/safe-apps-web3-react@0.6.3
- @gnosis.pm/safe-apps-web3-react@0.6.3-next.3
- @gnosis.pm/safe-apps-web3-react@0.6.3-next.2
- @gnosis.pm/safe-apps-web3-react@0.6.3-next.1
- @gnosis.pm/safe-apps-web3-react@0.6.3-next.0
- @gnosis.pm/safe-apps-wagmi@2.1.0
- @gnosis.pm/safe-apps-wagmi@1.2.0
- @gnosis.pm/safe-apps-wagmi@1.1.0
- @gnosis.pm/safe-apps-wagmi@1.0.4
- @gnosis.pm/safe-apps-wagmi@1.0.3
- @gnosis.pm/safe-apps-wagmi@1.0.2
- @gnosis.pm/safe-apps-wagmi@1.0.1
- @gnosis.pm/safe-apps-wagmi@1.0.0
- @gnosis.pm/safe-apps-sdk@7.8.0
- @gnosis.pm/safe-apps-sdk@7.7.0
- @gnosis.pm/safe-apps-sdk@7.6.0
- @gnosis.pm/safe-apps-sdk@7.5.0
- @gnosis.pm/safe-apps-sdk@7.4.1
- @gnosis.pm/safe-apps-sdk@7.4.0
- @gnosis.pm/safe-apps-sdk@7.3.0
- @gnosis.pm/safe-apps-sdk@7.2.0
- @gnosis.pm/safe-apps-sdk@7.1.0
- @gnosis.pm/safe-apps-sdk@7.0.0
- @gnosis.pm/safe-apps-sdk@6.3.0
- @gnosis.pm/safe-apps-sdk@6.2.0
- @gnosis.pm/safe-apps-sdk@6.1.1
- @gnosis.pm/safe-apps-sdk@6.1.0
- @gnosis.pm/safe-apps-sdk@6.0.0
- @gnosis.pm/safe-apps-sdk@5.0.0
- @gnosis.pm/safe-apps-sdk@5.0.0-next.1
- @gnosis.pm/safe-apps-sdk@4.3.1-next.0
- @gnosis.pm/safe-apps-sdk@4.3.0
- @gnosis.pm/safe-apps-sdk@4.3.0-next.2
- @gnosis.pm/safe-apps-sdk@4.3.0-next.1
- @gnosis.pm/safe-apps-sdk@4.3.0-next.0
- @gnosis.pm/safe-apps-react-sdk@4.6.2
- @gnosis.pm/safe-apps-react-sdk@4.6.1
- @gnosis.pm/safe-apps-react-sdk@4.6.0
- @gnosis.pm/safe-apps-react-sdk@4.5.1
- @gnosis.pm/safe-apps-react-sdk@4.5.0
- @gnosis.pm/safe-apps-react-sdk@4.4.0
- @gnosis.pm/safe-apps-react-sdk@4.3.1
- @gnosis.pm/safe-apps-react-sdk@4.2.3
- @gnosis.pm/safe-apps-react-sdk@4.2.2
- @gnosis.pm/safe-apps-react-sdk@4.2.1
- @gnosis.pm/safe-apps-react-sdk@4.2.0
- @gnosis.pm/safe-apps-react-sdk@4.1.0
- @gnosis.pm/safe-apps-react-sdk@4.0.8
- @gnosis.pm/safe-apps-react-sdk@4.0.7
- @gnosis.pm/safe-apps-react-sdk@4.0.6
- @gnosis.pm/safe-apps-react-sdk@4.0.5
- @gnosis.pm/safe-apps-react-sdk@4.0.5-next.1
- @gnosis.pm/safe-apps-react-sdk@4.0.5-next.0
- @gnosis.pm/safe-apps-react-sdk@4.0.4
- @gnosis.pm/safe-apps-react-sdk@4.0.4-next.2
- @gnosis.pm/safe-apps-react-sdk@4.0.4-next.1
- @gnosis.pm/safe-apps-react-sdk@4.0.4-next.0
- @gnosis.pm/safe-apps-provider@0.15.1
- @gnosis.pm/safe-apps-provider@0.15.0
- @gnosis.pm/safe-apps-provider@0.14.0
- @gnosis.pm/safe-apps-provider@0.13.2
- @gnosis.pm/safe-apps-provider@0.13.1
- @gnosis.pm/safe-apps-provider@0.13.0
- @gnosis.pm/safe-apps-provider@0.12.0
- @gnosis.pm/safe-apps-provider@0.11.3
- @gnosis.pm/safe-apps-provider@0.11.2
- @gnosis.pm/safe-apps-provider@0.11.1
- @gnosis.pm/safe-apps-provider@0.11.0
- @gnosis.pm/safe-apps-provider@0.10.3
- @gnosis.pm/safe-apps-provider@0.10.2
- @gnosis.pm/safe-apps-provider@0.10.1
- @gnosis.pm/safe-apps-provider@0.10.0
- @gnosis.pm/safe-apps-provider@0.9.3
- @gnosis.pm/safe-apps-provider@0.9.2
- @gnosis.pm/safe-apps-provider@0.9.1
- @gnosis.pm/safe-apps-provider@0.9.0
- @gnosis.pm/safe-apps-provider@0.8.1
- @gnosis.pm/safe-apps-provider@0.8.1-next.1
- @gnosis.pm/safe-apps-provider@0.8.1-next.0
- @gnosis.pm/safe-apps-provider@0.8.0
- @gnosis.pm/safe-apps-provider@0.8.0-next.3
- @gnosis.pm/safe-apps-provider@0.7.2-next.2
- @gnosis.pm/safe-apps-provider@0.7.2-next.1
- @gnosis.pm/safe-apps-provider@0.7.2-next.0
- @gnosis.pm/cra-template-safe-app@4.2.1
- @gnosis.pm/cra-template-safe-app@4.2.0
- @gnosis.pm/cra-template-safe-app@4.1.1
- @gnosis.pm/cra-template-safe-app@4.1.0
- @gnosis.pm/cra-template-safe-app@4.0.1
- @gnosis.pm/cra-template-safe-app@4.0.1-next.1
- @gnosis.pm/cra-template-safe-app@4.0.1-next.0
- example-safe-apps-wagmi-cra@0.1.5
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@gnosis.pm/safe-apps-sdk': minor | ||
--- | ||
|
||
Add txs.signMessage method that triggers a call to SignMessageLib |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"mode": "pre", | ||
"tag": "next", | ||
"initialVersions": { | ||
"@gnosis.pm/cra-template-safe-app": "4.0.0", | ||
"@gnosis.pm/safe-apps-provider": "0.7.1", | ||
"@gnosis.pm/safe-apps-react-sdk": "4.0.3", | ||
"@gnosis.pm/safe-apps-sdk": "4.2.0", | ||
"@gnosis.pm/safe-apps-web3-react": "0.6.2", | ||
"@gnosis.pm/safe-apps-web3modal": "2.0.0" | ||
}, | ||
"changesets": [] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { Communicator, SafeInfo, SafeBalances, GetBalanceParams } from '../types'; | ||
import { Communicator, SafeInfo, SafeBalances, GetBalanceParams, BytesLike } from '../types'; | ||
declare class Safe { | ||
private readonly communicator; | ||
constructor(communicator: Communicator); | ||
getInfo(): Promise<SafeInfo>; | ||
experimental_getBalances({ currency }?: GetBalanceParams): Promise<SafeBalances>; | ||
calculateMessageHash(message: BytesLike): string; | ||
private check1271Signature; | ||
private check1271SignatureBytes; | ||
isMessageSigned(message: BytesLike, signature?: string): Promise<boolean>; | ||
} | ||
export { Safe }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ethers } from 'ethers'; | ||
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; | ||
export { EIP_1271_INTERFACE, EIP_1271_BYTES_INTERFACE, MAGIC_VALUE, MAGIC_VALUE_BYTES }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { GatewayTransactionDetails, SendTransactionsParams, Communicator, SendTransactionsResponse } from '../types'; | ||
import { GatewayTransactionDetails, SendTransactionsParams, Communicator, SendTransactionsResponse, BytesLike } from '../types'; | ||
declare class TXs { | ||
private readonly communicator; | ||
constructor(communicator: Communicator); | ||
getBySafeTxHash(safeTxHash: string): Promise<GatewayTransactionDetails>; | ||
signMessage(message: BytesLike): 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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ethers } from 'ethers'; | ||
|
||
const MAGIC_VALUE = '0x1626ba7e'; | ||
const MAGIC_VALUE_BYTES = '0x20c13b0b'; | ||
|
||
const EIP_1271_INTERFACE = new ethers.utils.Interface([ | ||
'function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view', | ||
]); | ||
const EIP_1271_BYTES_INTERFACE = new ethers.utils.Interface([ | ||
'function isValidSignature(bytes calldata _data, bytes calldata _signature) public view', | ||
]); | ||
|
||
export { EIP_1271_INTERFACE, EIP_1271_BYTES_INTERFACE, MAGIC_VALUE, MAGIC_VALUE_BYTES }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import pkg from '../package.json'; | ||
// console.log({ pkg }); | ||
|
||
// Slice is needed for versions like '1.0.0-beta.0' | ||
export const getSDKVersion = (): string => pkg.version.slice(0, 5); |