Files
varan-connect/src/types.ts
T
odiinnn 4b7a39d332 Update dependencies and enhance App component functionality
- Added new dependencies: @polkadot/util and @gear-js/api to package.json and example/package.json.
- Implemented a test function in App component to interact with GearApi for balance transfer.
- Updated transaction signing logic to support both raw and payload types.
- Refactored Wallet class to improve socket connection handling and transaction management.
- Enhanced WalletStore by removing unnecessary listener setup code.
2025-11-05 21:36:10 +03:00

35 lines
752 B
TypeScript

import { default as WebAppConst } from "@twa-dev/sdk";
import type { InjectedWindow } from "@polkadot/extension-inject/types";
declare global {
interface Window extends InjectedWindow {}
}
export type WalletStorage = Storage;
export type WebApp = typeof WebAppConst;
export interface ConnectRequest {
method: 'connect';
callback: string;
}
export interface SignTransactionRequest {
method: 'sT';
id: number;
tx: `p:${string}` | `bytes:${string}`;
wallet?: string;
callback: string;
}
export interface ConnectResult {
success: boolean;
wallets?: string[];
error?: string;
}
export interface SignTransactionResult {
success: boolean;
id: number;
signedTx?: string;
error?: string;
}