@algovoi/use-wallet-algovoi 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ import algosdk from "algosdk";
2
+ import { AdapterConstructorParams, BaseWallet, WalletAccount, WalletMetadata } from "@txnlab/use-wallet/adapter";
3
+ import { WalletAdapterConfig } from "@txnlab/use-wallet";
4
+
5
+ //#region src/adapter.d.ts
6
+ /** ARC-27 signed-or-skipped transaction format sent to the extension. */
7
+ interface WalletTransaction {
8
+ txn: string;
9
+ signers?: string[];
10
+ }
11
+ /**
12
+ * ARC-27 compliant provider injected at `window.algorand`
13
+ * by the AlgoVoi browser extension.
14
+ */
15
+ interface AlgoVoiProvider {
16
+ id: string;
17
+ version: string;
18
+ isAlgoVoi: boolean;
19
+ enable(options?: {
20
+ genesisHash?: string;
21
+ }): Promise<{
22
+ accounts: string[];
23
+ }>;
24
+ disable(options?: {
25
+ genesisHash?: string;
26
+ }): Promise<void>;
27
+ signTransactions(txns: WalletTransaction[], indexesToSign?: number[]): Promise<(string | null)[]>;
28
+ signBytes?(data: Uint8Array, signer: string): Promise<{
29
+ sig: Uint8Array;
30
+ }>;
31
+ }
32
+ declare global {
33
+ interface Window {
34
+ algorand?: AlgoVoiProvider;
35
+ }
36
+ }
37
+ interface AlgoVoiOptions {
38
+ /** Override the provider detection timeout in milliseconds. Default: 180 000 (3 min). */
39
+ timeout?: number;
40
+ }
41
+ declare class AlgoVoiAdapter extends BaseWallet<AlgoVoiOptions> {
42
+ private _provider;
43
+ constructor(params: AdapterConstructorParams<AlgoVoiOptions>);
44
+ static defaultMetadata: WalletMetadata;
45
+ private getProvider;
46
+ connect: () => Promise<WalletAccount[]>;
47
+ disconnect: () => Promise<void>;
48
+ resumeSession: () => Promise<void>;
49
+ private processTxns;
50
+ private processEncodedTxns;
51
+ signTransactions: <T extends algosdk.Transaction[] | Uint8Array[]>(txnGroup: T | T[], indexesToSign?: number[]) => Promise<(Uint8Array | null)[]>;
52
+ }
53
+ //#endregion
54
+ //#region src/index.d.ts
55
+ declare const WALLET_ID: "algovoi";
56
+ declare function algovoi(options?: AlgoVoiOptions): WalletAdapterConfig;
57
+ //#endregion
58
+ export { AlgoVoiAdapter, type AlgoVoiOptions, WALLET_ID, algovoi };
59
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,155 @@
1
+ import algosdk from "algosdk";
2
+ import { BaseWallet, byteArrayToBase64, flattenTxnGroup, isSignedTxn, isTransactionArray } from "@txnlab/use-wallet/adapter";
3
+ //#region src/icon.ts
4
+ const icon = `<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
5
+ <rect width="128" height="128" rx="28" fill="#0D1117"/>
6
+ <circle cx="64" cy="52" r="20" fill="none" stroke="#00E5FF" stroke-width="3"/>
7
+ <path d="M44 52 a20 20 0 0 1 40 0" fill="none" stroke="#00E5FF" stroke-width="3"/>
8
+ <line x1="64" y1="72" x2="64" y2="100" stroke="#00E5FF" stroke-width="3"/>
9
+ <line x1="50" y1="86" x2="78" y2="86" stroke="#00E5FF" stroke-width="3"/>
10
+ <text x="64" y="118" text-anchor="middle" font-family="monospace" font-size="10" fill="#8B949E">AV</text>
11
+ </svg>`;
12
+ //#endregion
13
+ //#region src/adapter.ts
14
+ const DEFAULT_TIMEOUT = 18e4;
15
+ /**
16
+ * Waits for the AlgoVoi provider to be injected.
17
+ * Returns immediately if already present, otherwise listens for the
18
+ * `algorand#initialized` event fired by the extension content script.
19
+ */
20
+ function waitForProvider(timeout) {
21
+ return new Promise((resolve, reject) => {
22
+ if (window.algorand?.isAlgoVoi) return resolve(window.algorand);
23
+ const timer = window.setTimeout(() => {
24
+ window.removeEventListener("algorand#initialized", handler);
25
+ reject(/* @__PURE__ */ new Error("AlgoVoi extension not detected — timed out waiting for provider"));
26
+ }, timeout);
27
+ function handler() {
28
+ window.clearTimeout(timer);
29
+ window.removeEventListener("algorand#initialized", handler);
30
+ if (window.algorand?.isAlgoVoi) resolve(window.algorand);
31
+ else reject(/* @__PURE__ */ new Error("algorand#initialized fired but AlgoVoi provider not found"));
32
+ }
33
+ window.addEventListener("algorand#initialized", handler);
34
+ });
35
+ }
36
+ const ICON = `data:image/svg+xml;base64,${btoa(icon)}`;
37
+ var AlgoVoiAdapter = class extends BaseWallet {
38
+ _provider = null;
39
+ constructor(params) {
40
+ super(params);
41
+ }
42
+ static defaultMetadata = {
43
+ name: "AlgoVoi",
44
+ icon: ICON
45
+ };
46
+ async getProvider() {
47
+ if (this._provider) return this._provider;
48
+ this.logger.info("Waiting for AlgoVoi provider...");
49
+ this._provider = await waitForProvider(this.options?.timeout ?? DEFAULT_TIMEOUT);
50
+ this.logger.info("AlgoVoi provider detected");
51
+ return this._provider;
52
+ }
53
+ connect = async () => {
54
+ this.logger.info("Connecting...");
55
+ const result = await (await this.getProvider()).enable();
56
+ if (result.accounts.length === 0) {
57
+ this.logger.error("No accounts found!");
58
+ throw new Error("No accounts found!");
59
+ }
60
+ const walletAccounts = result.accounts.map((address, idx) => ({
61
+ name: `AlgoVoi Account ${idx + 1}`,
62
+ address
63
+ }));
64
+ const walletState = {
65
+ accounts: walletAccounts,
66
+ activeAccount: walletAccounts[0]
67
+ };
68
+ this.store.addWallet(walletState);
69
+ this.logger.info("Connected successfully", walletState);
70
+ return walletAccounts;
71
+ };
72
+ disconnect = async () => {
73
+ this.logger.info("Disconnecting...");
74
+ try {
75
+ await (await this.getProvider()).disable();
76
+ } catch {}
77
+ this.onDisconnect();
78
+ this.logger.info("Disconnected");
79
+ };
80
+ resumeSession = async () => {
81
+ try {
82
+ if (!this.store.getWalletState()) {
83
+ this.logger.info("No session to resume");
84
+ return;
85
+ }
86
+ this.logger.info("Resuming session...");
87
+ await this.getProvider();
88
+ this.logger.info("Session resumed successfully");
89
+ } catch (error) {
90
+ const message = error instanceof Error ? error.message : String(error);
91
+ this.logger.error("Error resuming session:", message);
92
+ this.onDisconnect();
93
+ throw error;
94
+ }
95
+ };
96
+ processTxns(txnGroup, indexesToSign) {
97
+ return txnGroup.map((txn, index) => {
98
+ const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
99
+ const signer = txn.sender.toString();
100
+ const canSign = this.addresses.includes(signer);
101
+ const txnString = byteArrayToBase64(txn.toByte());
102
+ return isIndexMatch && canSign ? { txn: txnString } : {
103
+ txn: txnString,
104
+ signers: []
105
+ };
106
+ });
107
+ }
108
+ processEncodedTxns(txnGroup, indexesToSign) {
109
+ return txnGroup.map((txnBuffer, index) => {
110
+ const isSigned = isSignedTxn(algosdk.msgpackRawDecode(txnBuffer));
111
+ const txn = isSigned ? algosdk.decodeSignedTransaction(txnBuffer).txn : algosdk.decodeUnsignedTransaction(txnBuffer);
112
+ const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
113
+ const signer = txn.sender.toString();
114
+ const canSign = !isSigned && this.addresses.includes(signer);
115
+ const txnString = byteArrayToBase64(txn.toByte());
116
+ return isIndexMatch && canSign ? { txn: txnString } : {
117
+ txn: txnString,
118
+ signers: []
119
+ };
120
+ });
121
+ }
122
+ signTransactions = async (txnGroup, indexesToSign) => {
123
+ this.logger.debug("Signing transactions...", {
124
+ txnGroup,
125
+ indexesToSign
126
+ });
127
+ const txnsToSign = isTransactionArray(txnGroup) ? this.processTxns(flattenTxnGroup(txnGroup), indexesToSign) : this.processEncodedTxns(flattenTxnGroup(txnGroup), indexesToSign);
128
+ const provider = await this.getProvider();
129
+ this.logger.debug("Sending transactions to AlgoVoi for signing...", txnsToSign);
130
+ const result = (await provider.signTransactions(txnsToSign)).map((value) => {
131
+ if (value === null) return null;
132
+ const binary = atob(value);
133
+ const bytes = new Uint8Array(binary.length);
134
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
135
+ return bytes;
136
+ });
137
+ this.logger.debug("Transactions signed successfully", result);
138
+ return result;
139
+ };
140
+ };
141
+ //#endregion
142
+ //#region src/index.ts
143
+ const WALLET_ID = "algovoi";
144
+ function algovoi(options) {
145
+ return {
146
+ id: WALLET_ID,
147
+ metadata: AlgoVoiAdapter.defaultMetadata,
148
+ Adapter: AlgoVoiAdapter,
149
+ options
150
+ };
151
+ }
152
+ //#endregion
153
+ export { AlgoVoiAdapter, WALLET_ID, algovoi };
154
+
155
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/icon.ts","../src/adapter.ts","../src/index.ts"],"sourcesContent":["export const icon = `<svg viewBox=\"0 0 128 128\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"128\" height=\"128\" rx=\"28\" fill=\"#0D1117\"/>\n <circle cx=\"64\" cy=\"52\" r=\"20\" fill=\"none\" stroke=\"#00E5FF\" stroke-width=\"3\"/>\n <path d=\"M44 52 a20 20 0 0 1 40 0\" fill=\"none\" stroke=\"#00E5FF\" stroke-width=\"3\"/>\n <line x1=\"64\" y1=\"72\" x2=\"64\" y2=\"100\" stroke=\"#00E5FF\" stroke-width=\"3\"/>\n <line x1=\"50\" y1=\"86\" x2=\"78\" y2=\"86\" stroke=\"#00E5FF\" stroke-width=\"3\"/>\n <text x=\"64\" y=\"118\" text-anchor=\"middle\" font-family=\"monospace\" font-size=\"10\" fill=\"#8B949E\">AV</text>\n</svg>`\n","import algosdk from 'algosdk'\nimport {\n BaseWallet,\n byteArrayToBase64,\n flattenTxnGroup,\n isSignedTxn,\n isTransactionArray,\n type AdapterConstructorParams,\n type WalletAccount,\n type WalletMetadata,\n type WalletState\n} from '@txnlab/use-wallet/adapter'\nimport { icon } from './icon'\n\n// ── ARC-27 provider interface ──────────────────────────────────────────────────\n\n/** ARC-27 signed-or-skipped transaction format sent to the extension. */\ninterface WalletTransaction {\n txn: string // base64-encoded unsigned transaction\n signers?: string[] // empty array = wallet should not sign this txn\n}\n\n/**\n * ARC-27 compliant provider injected at `window.algorand`\n * by the AlgoVoi browser extension.\n */\ninterface AlgoVoiProvider {\n id: string\n version: string\n isAlgoVoi: boolean\n enable(options?: { genesisHash?: string }): Promise<{ accounts: string[] }>\n disable(options?: { genesisHash?: string }): Promise<void>\n signTransactions(txns: WalletTransaction[], indexesToSign?: number[]): Promise<(string | null)[]>\n signBytes?(data: Uint8Array, signer: string): Promise<{ sig: Uint8Array }>\n}\n\ndeclare global {\n interface Window {\n algorand?: AlgoVoiProvider\n }\n}\n\n// ── Options ────────────────────────────────────────────────────────────────────\n\nexport interface AlgoVoiOptions {\n /** Override the provider detection timeout in milliseconds. Default: 180 000 (3 min). */\n timeout?: number\n}\n\n// ── Provider detection ─────────────────────────────────────────────────────────\n\nconst DEFAULT_TIMEOUT = 180_000\n\n/**\n * Waits for the AlgoVoi provider to be injected.\n * Returns immediately if already present, otherwise listens for the\n * `algorand#initialized` event fired by the extension content script.\n */\nfunction waitForProvider(timeout: number): Promise<AlgoVoiProvider> {\n return new Promise((resolve, reject) => {\n if (window.algorand?.isAlgoVoi) {\n return resolve(window.algorand)\n }\n\n const timer = window.setTimeout(() => {\n window.removeEventListener('algorand#initialized', handler)\n reject(new Error('AlgoVoi extension not detected — timed out waiting for provider'))\n }, timeout)\n\n function handler() {\n window.clearTimeout(timer)\n window.removeEventListener('algorand#initialized', handler)\n if (window.algorand?.isAlgoVoi) {\n resolve(window.algorand)\n } else {\n reject(new Error('algorand#initialized fired but AlgoVoi provider not found'))\n }\n }\n\n window.addEventListener('algorand#initialized', handler)\n })\n}\n\n// ── Adapter ────────────────────────────────────────────────────────────────────\n\nconst ICON = `data:image/svg+xml;base64,${btoa(icon)}`\n\nexport class AlgoVoiAdapter extends BaseWallet<AlgoVoiOptions> {\n private _provider: AlgoVoiProvider | null = null\n\n constructor(params: AdapterConstructorParams<AlgoVoiOptions>) {\n super(params)\n }\n\n static defaultMetadata: WalletMetadata = {\n name: 'AlgoVoi',\n icon: ICON\n }\n\n // ── Provider ─────────────────────────────────────────────────────────────────\n\n private async getProvider(): Promise<AlgoVoiProvider> {\n if (this._provider) return this._provider\n this.logger.info('Waiting for AlgoVoi provider...')\n this._provider = await waitForProvider(this.options?.timeout ?? DEFAULT_TIMEOUT)\n this.logger.info('AlgoVoi provider detected')\n return this._provider\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────────\n\n public connect = async (): Promise<WalletAccount[]> => {\n this.logger.info('Connecting...')\n const provider = await this.getProvider()\n const result = await provider.enable()\n\n if (result.accounts.length === 0) {\n this.logger.error('No accounts found!')\n throw new Error('No accounts found!')\n }\n\n const walletAccounts: WalletAccount[] = result.accounts.map((address, idx) => ({\n name: `AlgoVoi Account ${idx + 1}`,\n address\n }))\n\n const walletState: WalletState = {\n accounts: walletAccounts,\n activeAccount: walletAccounts[0]\n }\n\n this.store.addWallet(walletState)\n this.logger.info('Connected successfully', walletState)\n return walletAccounts\n }\n\n public disconnect = async (): Promise<void> => {\n this.logger.info('Disconnecting...')\n try {\n const provider = await this.getProvider()\n await provider.disable()\n } catch {\n // Extension may not be available — clean up local state regardless\n }\n this.onDisconnect()\n this.logger.info('Disconnected')\n }\n\n public resumeSession = async (): Promise<void> => {\n try {\n const walletState = this.store.getWalletState()\n if (!walletState) {\n this.logger.info('No session to resume')\n return\n }\n this.logger.info('Resuming session...')\n // Verify the extension is still present without re-prompting the user\n await this.getProvider()\n this.logger.info('Session resumed successfully')\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : String(error)\n this.logger.error('Error resuming session:', message)\n this.onDisconnect()\n throw error\n }\n }\n\n // ── Transaction helpers ───────────────────────────────────────────────────────\n\n private processTxns(\n txnGroup: algosdk.Transaction[],\n indexesToSign?: number[]\n ): WalletTransaction[] {\n return txnGroup.map((txn, index) => {\n const isIndexMatch = !indexesToSign || indexesToSign.includes(index)\n const signer = txn.sender.toString()\n const canSign = this.addresses.includes(signer)\n const txnString = byteArrayToBase64(txn.toByte())\n return isIndexMatch && canSign\n ? { txn: txnString }\n : { txn: txnString, signers: [] }\n })\n }\n\n private processEncodedTxns(\n txnGroup: Uint8Array[],\n indexesToSign?: number[]\n ): WalletTransaction[] {\n return txnGroup.map((txnBuffer, index) => {\n const decodedObj = algosdk.msgpackRawDecode(txnBuffer)\n const isSigned = isSignedTxn(decodedObj)\n const txn = isSigned\n ? algosdk.decodeSignedTransaction(txnBuffer).txn\n : algosdk.decodeUnsignedTransaction(txnBuffer)\n\n const isIndexMatch = !indexesToSign || indexesToSign.includes(index)\n const signer = txn.sender.toString()\n const canSign = !isSigned && this.addresses.includes(signer)\n const txnString = byteArrayToBase64(txn.toByte())\n return isIndexMatch && canSign\n ? { txn: txnString }\n : { txn: txnString, signers: [] }\n })\n }\n\n // ── Signing ───────────────────────────────────────────────────────────────────\n\n public signTransactions = async <T extends algosdk.Transaction[] | Uint8Array[]>(\n txnGroup: T | T[],\n indexesToSign?: number[]\n ): Promise<(Uint8Array | null)[]> => {\n this.logger.debug('Signing transactions...', { txnGroup, indexesToSign })\n\n const txnsToSign: WalletTransaction[] = isTransactionArray(txnGroup)\n ? this.processTxns(flattenTxnGroup(txnGroup), indexesToSign)\n : this.processEncodedTxns(flattenTxnGroup(txnGroup as Uint8Array[]), indexesToSign)\n\n const provider = await this.getProvider()\n this.logger.debug('Sending transactions to AlgoVoi for signing...', txnsToSign)\n\n const signedB64s = await provider.signTransactions(txnsToSign)\n\n const result = signedB64s.map((value) => {\n if (value === null) return null\n const binary = atob(value)\n const bytes = new Uint8Array(binary.length)\n for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n return bytes\n })\n\n this.logger.debug('Transactions signed successfully', result)\n return result\n }\n}\n","import { AlgoVoiAdapter } from './adapter'\nimport type { AlgoVoiOptions } from './adapter'\nimport type { WalletAdapterConfig } from '@txnlab/use-wallet'\n\nexport const WALLET_ID = 'algovoi' as const\n\nexport function algovoi(options?: AlgoVoiOptions): WalletAdapterConfig {\n return {\n id: WALLET_ID,\n metadata: AlgoVoiAdapter.defaultMetadata,\n Adapter: AlgoVoiAdapter as unknown as WalletAdapterConfig['Adapter'],\n options: options as unknown as Record<string, unknown> | undefined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AAiB,cAAc,SAAS,MAAM;GACpE,MAAM,SAAS,IAAI,OAAO,UAAU;GACpC,MAAM,UAAU,CAAC,YAAY,KAAK,UAAU,SAAS,OAAO;GAC5D,MAAM,YAAY,kBAAkB,IAAI,QAAQ,CAAC;AACjD,UAAO,gBAAgB,UACnB,EAAE,KAAK,WAAW,GAClB;IAAE,KAAK;IAAW,SAAS,EAAE;IAAE;IACnC;;CAKJ,mBAA0B,OACxB,UACA,kBACmC;AACnC,OAAK,OAAO,MAAM,2BAA2B;GAAE;GAAU;GAAe,CAAC;EAEzE,MAAM,aAAkC,mBAAmB,SAAS,GAChE,KAAK,YAAY,gBAAgB,SAAS,EAAE,cAAc,GAC1D,KAAK,mBAAmB,gBAAgB,SAAyB,EAAE,cAAc;EAErF,MAAM,WAAW,MAAM,KAAK,aAAa;AACzC,OAAK,OAAO,MAAM,kDAAkD,WAAW;EAI/E,MAAM,UAAS,MAFU,SAAS,iBAAiB,WAAW,EAEpC,KAAK,UAAU;AACvC,OAAI,UAAU,KAAM,QAAO;GAC3B,MAAM,SAAS,KAAK,MAAM;GAC1B,MAAM,QAAQ,IAAI,WAAW,OAAO,OAAO;AAC3C,QAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,IAAK,OAAM,KAAK,OAAO,WAAW,EAAE;AACvE,UAAO;IACP;AAEF,OAAK,OAAO,MAAM,oCAAoC,OAAO;AAC7D,SAAO;;;;;ACnOX,MAAa,YAAY;AAEzB,SAAgB,QAAQ,SAA+C;AACrE,QAAO;EACL,IAAI;EACJ,UAAU,eAAe;EACzB,SAAS;EACA;EACV"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@algovoi/use-wallet-algovoi",
3
+ "version": "1.0.0",
4
+ "description": "AlgoVoi wallet adapter for @txnlab/use-wallet",
5
+ "author": "AlgoVoi <support@algovoi.co.uk>",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/ArmyITC/AlgoVoi.git",
10
+ "directory": "packages/use-wallet-algovoi"
11
+ },
12
+ "type": "module",
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "peerDependencies": {
25
+ "@txnlab/use-wallet": "^5.0.0",
26
+ "algosdk": "^3.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@txnlab/use-wallet": "^5.0.0-rc.1",
30
+ "algosdk": "^3.5.0",
31
+ "jsdom": "^29.1.1",
32
+ "tsdown": "^0.21.0",
33
+ "typescript": "^5.9.0",
34
+ "vitest": "^2.0.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "tsdown",
41
+ "start": "tsdown --watch",
42
+ "test": "vitest run",
43
+ "test:watch": "vitest --watch",
44
+ "lint": "eslint \"src/**/*.{js,ts}\"",
45
+ "typecheck": "tsc --noEmit"
46
+ },
47
+ "engines": {
48
+ "node": ">=18"
49
+ },
50
+ "keywords": [
51
+ "algorand",
52
+ "voi",
53
+ "algovoi",
54
+ "use-wallet",
55
+ "wallet",
56
+ "blockchain"
57
+ ]
58
+ }