-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwallet.ts
More file actions
31 lines (28 loc) · 1.04 KB
/
Copy pathwallet.ts
File metadata and controls
31 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Wallet connection utilities — frontend integration surface.
*
* This is the shape matchids-web's checkout will call to prompt a wallet
* connection (e.g. via Valora, MetaMask + Celo network, or whatever
* wallet CeloHT's flow expects). No real connection logic is wired in —
* CeloHT's docs will determine exactly how a wallet handshake should
* work, and that call replaces the TODO below.
*/
export interface WalletConnection {
address: string;
network: "celo-mainnet" | "celo-alfajores";
}
export async function connectWallet(): Promise<WalletConnection> {
throw new Error(
"connectWallet is an integration point — implement the real wallet " +
"connection flow once CeloHT's wallet integration details are available."
);
}
export async function getWalletBalance(
_address: string,
_asset: "CELO" | "USDM"
): Promise<{ balance: string }> {
throw new Error(
"getWalletBalance is an integration point — never fabricate a balance; " +
"this must read from the chain or CeloHT's API once connected."
);
}