@mcpsovereign/sdk 0.1.0 → 0.2.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.
- package/dist/index.d.ts +55 -0
- package/dist/index.js +84 -0
- package/dist/setup.js +168 -16
- package/dist/wallet/index.d.ts +55 -0
- package/dist/wallet/index.js +189 -0
- package/dist/wallet/lightning.d.ts +48 -0
- package/dist/wallet/lightning.js +267 -0
- package/dist/wallet/lnd-setup.d.ts +117 -0
- package/dist/wallet/lnd-setup.js +501 -0
- package/dist/wallet/types.d.ts +89 -0
- package/dist/wallet/types.js +149 -0
- package/dist/wallet/wizard.d.ts +41 -0
- package/dist/wallet/wizard.js +498 -0
- package/package.json +5 -3
- package/dist/types.d.ts +0 -299
- package/dist/types.js +0 -95
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet Types for mcpSovereign
|
|
3
|
+
*
|
|
4
|
+
* Lightning-first wallet setup and management
|
|
5
|
+
*/
|
|
6
|
+
export const WALLET_PROVIDERS = {
|
|
7
|
+
alby: {
|
|
8
|
+
id: 'alby',
|
|
9
|
+
name: 'Alby',
|
|
10
|
+
emoji: '🐝',
|
|
11
|
+
description: 'Browser extension with Lightning address. Best for agents!',
|
|
12
|
+
type: 'custodial',
|
|
13
|
+
platforms: ['web', 'desktop'],
|
|
14
|
+
supportsLNURL: true,
|
|
15
|
+
supportsLightningAddress: true,
|
|
16
|
+
setupUrl: 'https://getalby.com',
|
|
17
|
+
difficulty: 'easy',
|
|
18
|
+
recommended: true
|
|
19
|
+
},
|
|
20
|
+
walletofsatoshi: {
|
|
21
|
+
id: 'walletofsatoshi',
|
|
22
|
+
name: 'Wallet of Satoshi',
|
|
23
|
+
emoji: '🟠',
|
|
24
|
+
description: 'Simplest mobile wallet. Download, done.',
|
|
25
|
+
type: 'custodial',
|
|
26
|
+
platforms: ['ios', 'android'],
|
|
27
|
+
supportsLNURL: true,
|
|
28
|
+
supportsLightningAddress: true,
|
|
29
|
+
setupUrl: 'https://walletofsatoshi.com',
|
|
30
|
+
difficulty: 'easy',
|
|
31
|
+
recommended: true
|
|
32
|
+
},
|
|
33
|
+
phoenix: {
|
|
34
|
+
id: 'phoenix',
|
|
35
|
+
name: 'Phoenix',
|
|
36
|
+
emoji: '🔥',
|
|
37
|
+
description: 'Self-custodial mobile wallet. Your keys, your Bitcoin.',
|
|
38
|
+
type: 'non-custodial',
|
|
39
|
+
platforms: ['ios', 'android'],
|
|
40
|
+
supportsLNURL: true,
|
|
41
|
+
supportsLightningAddress: true,
|
|
42
|
+
setupUrl: 'https://phoenix.acinq.co',
|
|
43
|
+
difficulty: 'medium'
|
|
44
|
+
},
|
|
45
|
+
muun: {
|
|
46
|
+
id: 'muun',
|
|
47
|
+
name: 'Muun',
|
|
48
|
+
emoji: '🌙',
|
|
49
|
+
description: 'Non-custodial with on-chain and Lightning.',
|
|
50
|
+
type: 'non-custodial',
|
|
51
|
+
platforms: ['ios', 'android'],
|
|
52
|
+
supportsLNURL: false,
|
|
53
|
+
supportsLightningAddress: false,
|
|
54
|
+
setupUrl: 'https://muun.com',
|
|
55
|
+
difficulty: 'medium'
|
|
56
|
+
},
|
|
57
|
+
bluewallet: {
|
|
58
|
+
id: 'bluewallet',
|
|
59
|
+
name: 'BlueWallet',
|
|
60
|
+
emoji: '🔵',
|
|
61
|
+
description: 'Feature-rich wallet for mobile and desktop.',
|
|
62
|
+
type: 'non-custodial',
|
|
63
|
+
platforms: ['ios', 'android', 'desktop'],
|
|
64
|
+
supportsLNURL: true,
|
|
65
|
+
supportsLightningAddress: false,
|
|
66
|
+
setupUrl: 'https://bluewallet.io',
|
|
67
|
+
difficulty: 'medium'
|
|
68
|
+
},
|
|
69
|
+
breez: {
|
|
70
|
+
id: 'breez',
|
|
71
|
+
name: 'Breez',
|
|
72
|
+
emoji: '🌊',
|
|
73
|
+
description: 'Non-custodial Lightning with podcasting features.',
|
|
74
|
+
type: 'non-custodial',
|
|
75
|
+
platforms: ['ios', 'android'],
|
|
76
|
+
supportsLNURL: true,
|
|
77
|
+
supportsLightningAddress: false,
|
|
78
|
+
setupUrl: 'https://breez.technology',
|
|
79
|
+
difficulty: 'medium'
|
|
80
|
+
},
|
|
81
|
+
zeus: {
|
|
82
|
+
id: 'zeus',
|
|
83
|
+
name: 'Zeus',
|
|
84
|
+
emoji: '⚡',
|
|
85
|
+
description: 'Connect to your own Lightning node.',
|
|
86
|
+
type: 'self-hosted',
|
|
87
|
+
platforms: ['ios', 'android'],
|
|
88
|
+
supportsLNURL: true,
|
|
89
|
+
supportsLightningAddress: false,
|
|
90
|
+
setupUrl: 'https://zeusln.com',
|
|
91
|
+
difficulty: 'advanced'
|
|
92
|
+
},
|
|
93
|
+
custom: {
|
|
94
|
+
id: 'custom',
|
|
95
|
+
name: 'Custom / Other',
|
|
96
|
+
emoji: '🔧',
|
|
97
|
+
description: 'Use any wallet with a Lightning address.',
|
|
98
|
+
type: 'non-custodial',
|
|
99
|
+
platforms: ['web', 'ios', 'android', 'desktop'],
|
|
100
|
+
supportsLNURL: true,
|
|
101
|
+
supportsLightningAddress: true,
|
|
102
|
+
setupUrl: '',
|
|
103
|
+
difficulty: 'medium'
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
export const WALLET_SETUP_STEPS = [
|
|
107
|
+
{
|
|
108
|
+
id: 'intro',
|
|
109
|
+
title: 'Lightning Wallet Required',
|
|
110
|
+
description: 'mcpSovereign runs on Bitcoin Lightning. Let\'s set up your wallet.',
|
|
111
|
+
emoji: '⚡',
|
|
112
|
+
action: 'continue'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'choose_provider',
|
|
116
|
+
title: 'Choose Your Wallet',
|
|
117
|
+
description: 'Pick a Lightning wallet provider.',
|
|
118
|
+
emoji: '💳',
|
|
119
|
+
action: 'select_provider'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: 'setup_wallet',
|
|
123
|
+
title: 'Set Up Your Wallet',
|
|
124
|
+
description: 'Follow the guide to create your wallet.',
|
|
125
|
+
emoji: '🛠️',
|
|
126
|
+
action: 'external_setup'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'enter_address',
|
|
130
|
+
title: 'Enter Your Lightning Address',
|
|
131
|
+
description: 'Paste your Lightning address (e.g., you@getalby.com)',
|
|
132
|
+
emoji: '📧',
|
|
133
|
+
action: 'input_address'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'verify',
|
|
137
|
+
title: 'Verify Connection',
|
|
138
|
+
description: 'We\'ll verify your wallet can receive payments.',
|
|
139
|
+
emoji: '✅',
|
|
140
|
+
action: 'verify'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'complete',
|
|
144
|
+
title: 'Wallet Connected!',
|
|
145
|
+
description: 'You\'re ready to buy credits and start trading.',
|
|
146
|
+
emoji: '🎉',
|
|
147
|
+
action: 'complete'
|
|
148
|
+
}
|
|
149
|
+
];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet Setup Wizard
|
|
3
|
+
*
|
|
4
|
+
* Interactive guide for setting up Lightning wallet
|
|
5
|
+
* MUST be completed before buying/selling (browsing is free)
|
|
6
|
+
*/
|
|
7
|
+
import { WalletConfig, WalletProvider, WalletSetupProgress } from './types.js';
|
|
8
|
+
export declare class WalletSetupWizard {
|
|
9
|
+
private progress;
|
|
10
|
+
private outputHandler;
|
|
11
|
+
private inputHandler?;
|
|
12
|
+
private config;
|
|
13
|
+
constructor(outputHandler?: (message: string) => void, inputHandler?: (prompt: string, options?: string[]) => Promise<string>);
|
|
14
|
+
private print;
|
|
15
|
+
private printDivider;
|
|
16
|
+
private printHeader;
|
|
17
|
+
private loadProgress;
|
|
18
|
+
private saveProgress;
|
|
19
|
+
runIntro(): Promise<void>;
|
|
20
|
+
runChoosePath(): Promise<'hosted' | 'self-hosted' | 'skip'>;
|
|
21
|
+
runHostedWalletSetup(): Promise<WalletProvider | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Show setup instructions for a specific provider
|
|
24
|
+
*/
|
|
25
|
+
private showProviderSetup;
|
|
26
|
+
runSelfHostedSetup(): Promise<boolean>;
|
|
27
|
+
runEnterAddress(): Promise<string | null>;
|
|
28
|
+
runVerifyAddress(address: string): Promise<boolean>;
|
|
29
|
+
runComplete(): Promise<void>;
|
|
30
|
+
runSkip(): Promise<void>;
|
|
31
|
+
run(): Promise<{
|
|
32
|
+
config: WalletConfig | null;
|
|
33
|
+
skipped: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
private waitForContinue;
|
|
36
|
+
private getInput;
|
|
37
|
+
private getChoice;
|
|
38
|
+
getConfig(): WalletConfig | null;
|
|
39
|
+
getProgress(): WalletSetupProgress;
|
|
40
|
+
}
|
|
41
|
+
export default WalletSetupWizard;
|