Skip to content

Commit

Permalink
Merge pull request #142 from perawallet/next-release
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
yigitguler authored Jul 3, 2023
2 parents 097b959 + 40dbacf commit 0b2b756
Show file tree
Hide file tree
Showing 21 changed files with 1,326 additions and 564 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,27 @@ Checks if there's any active session regardless of platform. Possible responses:
Starts the sign process and returns the signed transaction in `Uint8Array`
#### `PeraWalletConnect.signData(data: PeraWalletArbitraryData[], signer: string): Promise<Uint8Array[]>`
Starts the signing process for arbitrary data signing and returns the signed data in `Uint8Array`. Uses `signBytes` method of `algosdk` behind the scenes. `signer` should be a valid Algorand address that exists in the user's wallet.
<details>
<summary>See example</summary>
```typescript
const signedData: Uint8Array[] = await peraWallet.signData([
{
data: new Uint8Array(Buffer.from(`timestamp//${Date.now()}`)),
message: "Timestamp confirmation"
},
{
data: new Uint8Array(Buffer.from(`agent//${navigator.userAgent}`)),
message: "User agent confirmation"
}
], "SAHBJDRHHRR72JHTWSXZR5VHQQUVC7S757TJZI656FWSDO3TZZWV3IGJV4");
```
</details>
## Customizing Style
You can override the z-index using the `.pera-wallet-modal` class so that the modal does not conflict with another component on your application.
Expand Down
163 changes: 163 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.3",
"version": "1.2.4",
"name": "@perawallet/connect",
"description": "JavaScript SDK for integrating Pera Wallet to web applications.",
"main": "dist/index.js",
Expand All @@ -16,6 +16,7 @@
"@hipo/eslint-config-typescript": "^1.1.0",
"@rollup/plugin-image": "^2.1.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"eslint": "^8.12.0",
Expand All @@ -25,6 +26,7 @@
"rollup": "^2.70.1",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-sizes": "^1.0.5",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.2",
"sass": "^1.49.11",
Expand Down
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import {version as PeraConnectVersion} from "./package.json";

import typescript from "rollup-plugin-typescript2";
import {terser} from "rollup-plugin-terser";
import postcss from "rollup-plugin-postcss";
import image from "@rollup/plugin-image";
import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import sizes from "rollup-plugin-sizes";

export default [
{
Expand Down Expand Up @@ -40,7 +44,12 @@ export default [
exclude: "**/__tests__/**",
clean: true
}),
json()
json(),
sizes(),
replace({
PERA_CONNECT_VERSION: `v${PeraConnectVersion}`,
preventAssignment: true
})
]
}
];
Loading

0 comments on commit 0b2b756

Please sign in to comment.