Skip to content

Commit

Permalink
Merge pull request #24 from labscommunity/feat-batch-sign-dataitem
Browse files Browse the repository at this point in the history
Add `batchSignDataItem` to Arconnect Strategy
  • Loading branch information
7i7o authored Oct 10, 2024
2 parents 108552e + dca727c commit 469e87f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "arweave-wallet-kit",
"private": false,
"version": "1.0.6",
"version": "1.0.7",
"type": "module",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -58,7 +58,7 @@
"@types/react-dom": "^18.0.10",
"@types/react-helmet": "^6.1.6",
"@vitejs/plugin-react": "^3.0.0",
"arconnect": "^1.0.3",
"arconnect": "^1.0.4",
"babel-loader": "^8.3.0",
"prettier": "^2.8.2",
"react": "^18.2.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions src/strategy/strategies/ArConnect.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BrowserWalletStrategy from "./BrowserWallet";
import { callWindowApi } from "../../utils";
import type Strategy from "../Strategy";
import type { DataItem } from "arconnect";

export default class ArConnectStrategy
extends BrowserWalletStrategy
Expand Down Expand Up @@ -31,4 +32,8 @@ export default class ArConnectStrategy
public async addToken(id: string): Promise<void> {
return await callWindowApi("addToken", [id]);
}

public async batchSignDataItem(dataItems: DataItem[]): Promise<ArrayBufferLike[]> {
return await callWindowApi("batchSignDataItem", [dataItems]);
}
}

0 comments on commit 469e87f

Please sign in to comment.