rapay 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.
- package/LICENSE +26 -0
- package/README.md +69 -0
- package/bin/ra +4 -0
- package/install.js +187 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Ra Pay AI Proprietary Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ra Pay AI, LLC. All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
This software ("Software") is proprietary and confidential.
|
|
6
|
+
|
|
7
|
+
PERMITTED USES:
|
|
8
|
+
- Install and use Software per Terms of Service at https://rapay.ai/terms
|
|
9
|
+
- Use Software for personal or commercial purposes in accordance with Terms of Service
|
|
10
|
+
|
|
11
|
+
PROHIBITED USES:
|
|
12
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
13
|
+
- Copy, modify, distribute, or create derivative works
|
|
14
|
+
- Remove proprietary notices or labels
|
|
15
|
+
- Use the Software to compete with Ra Pay AI, LLC
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
|
|
25
|
+
Full Terms of Service: https://rapay.ai/terms
|
|
26
|
+
Privacy Policy: https://rapay.ai/privacy
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Ra Pay CLI
|
|
2
|
+
|
|
3
|
+
**Payment infrastructure for AI agents.** Send fiat USD payments via Stripe without browser automation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g rapay
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Link your bank account (one-time setup)
|
|
15
|
+
ra link-bank
|
|
16
|
+
|
|
17
|
+
# Send a payment
|
|
18
|
+
ra send 100 USD to acct_1234567890
|
|
19
|
+
|
|
20
|
+
# Check your balance
|
|
21
|
+
ra balance
|
|
22
|
+
|
|
23
|
+
# View transaction history
|
|
24
|
+
ra history
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- **40x more token-efficient** than browser automation (JSON vs HTML)
|
|
30
|
+
- **99% reliability** vs 50% with browser automation
|
|
31
|
+
- **2 seconds** vs 60 seconds per payment
|
|
32
|
+
- **Zero browser tracking** - terminal-native privacy
|
|
33
|
+
- **Prompt injection protection** - JSON-only responses
|
|
34
|
+
|
|
35
|
+
## For AI Agents
|
|
36
|
+
|
|
37
|
+
Ra Pay is designed for autonomous AI agents:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# JSON output mode for programmatic parsing
|
|
41
|
+
ra send 100 USD to acct_1234567890 --json
|
|
42
|
+
ra balance --json
|
|
43
|
+
ra history --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Commands
|
|
47
|
+
|
|
48
|
+
| Command | Description |
|
|
49
|
+
|---------|-------------|
|
|
50
|
+
| `ra link-bank` | Link your Stripe account (one-time) |
|
|
51
|
+
| `ra send <amount> USD to <account>` | Send a payment |
|
|
52
|
+
| `ra balance` | Check your balance |
|
|
53
|
+
| `ra history` | View transaction history |
|
|
54
|
+
| `ra whoami` | Show your account info |
|
|
55
|
+
| `ra schema` | Print AEO schema for AI discovery |
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
- Website: https://rapay.ai
|
|
60
|
+
- API Docs: https://api.rapay.ai/docs
|
|
61
|
+
|
|
62
|
+
## Support
|
|
63
|
+
|
|
64
|
+
- Email: e@rapay.ai
|
|
65
|
+
- Issues: https://github.com/Ra-Pay-AI/rapay/issues
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
Proprietary - Ra Pay AI, LLC
|
package/bin/ra
ADDED
package/install.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ra Pay CLI installer
|
|
5
|
+
* Downloads the correct binary for the user's platform from GitHub Releases
|
|
6
|
+
* Verifies SHA256 checksum before installation for security
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const { createHash } = require('crypto');
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const https = require('https');
|
|
13
|
+
const os = require('os');
|
|
14
|
+
|
|
15
|
+
const VERSION = '1.0.0';
|
|
16
|
+
const REPO = 'Ra-Pay-AI/rapay';
|
|
17
|
+
|
|
18
|
+
// Platform/arch to binary name mapping
|
|
19
|
+
// NOTE: linux-arm64 not supported yet (keyring native libs don't cross-compile)
|
|
20
|
+
const BINARY_MAP = {
|
|
21
|
+
'darwin-x64': 'ra-darwin-x64',
|
|
22
|
+
'darwin-arm64': 'ra-darwin-arm64',
|
|
23
|
+
'linux-x64': 'ra-linux-x64',
|
|
24
|
+
'win32-x64': 'ra-win32-x64.exe',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function getPlatformKey() {
|
|
28
|
+
const platform = os.platform();
|
|
29
|
+
const arch = os.arch();
|
|
30
|
+
return `${platform}-${arch}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getBinaryName() {
|
|
34
|
+
const key = getPlatformKey();
|
|
35
|
+
const binary = BINARY_MAP[key];
|
|
36
|
+
|
|
37
|
+
if (!binary) {
|
|
38
|
+
console.error(`Unsupported platform: ${key}`);
|
|
39
|
+
console.error(`Supported platforms: ${Object.keys(BINARY_MAP).join(', ')}`);
|
|
40
|
+
console.error('');
|
|
41
|
+
console.error('For linux-arm64, please build from source:');
|
|
42
|
+
console.error(' git clone https://github.com/Ra-Pay-AI/rapay');
|
|
43
|
+
console.error(' cd rapay/cli && cargo build --release');
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return binary;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getDownloadUrl(filename) {
|
|
51
|
+
return `https://github.com/${REPO}/releases/download/v${VERSION}/${filename}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function download(url) {
|
|
55
|
+
return new Promise((resolve, reject) => {
|
|
56
|
+
const chunks = [];
|
|
57
|
+
|
|
58
|
+
const request = (url) => {
|
|
59
|
+
https.get(url, (response) => {
|
|
60
|
+
// Handle redirects (GitHub uses them)
|
|
61
|
+
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
62
|
+
request(response.headers.location);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (response.statusCode !== 200) {
|
|
67
|
+
reject(new Error(`Failed to download: HTTP ${response.statusCode}`));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
response.on('data', (chunk) => chunks.push(chunk));
|
|
72
|
+
response.on('end', () => resolve(Buffer.concat(chunks)));
|
|
73
|
+
response.on('error', reject);
|
|
74
|
+
}).on('error', reject);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
request(url);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function calculateSha256(buffer) {
|
|
82
|
+
return createHash('sha256').update(buffer).digest('hex');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function parseChecksums(content) {
|
|
86
|
+
const checksums = {};
|
|
87
|
+
const lines = content.toString().split('\n');
|
|
88
|
+
|
|
89
|
+
for (const line of lines) {
|
|
90
|
+
// Skip comments and empty lines
|
|
91
|
+
if (line.startsWith('#') || !line.trim()) continue;
|
|
92
|
+
|
|
93
|
+
// Format: "hash filename" or "hash filename"
|
|
94
|
+
const match = line.match(/^([a-f0-9]{64})\s+(.+)$/i);
|
|
95
|
+
if (match) {
|
|
96
|
+
const [, hash, filename] = match;
|
|
97
|
+
checksums[filename.trim()] = hash.toLowerCase();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return checksums;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function install() {
|
|
105
|
+
const binDir = path.join(__dirname, 'bin');
|
|
106
|
+
const platform = os.platform();
|
|
107
|
+
const binaryName = getBinaryName();
|
|
108
|
+
const destName = platform === 'win32' ? 'ra.exe' : 'ra';
|
|
109
|
+
const destPath = path.join(binDir, destName);
|
|
110
|
+
const binaryUrl = getDownloadUrl(binaryName);
|
|
111
|
+
const checksumsUrl = getDownloadUrl('checksums.txt');
|
|
112
|
+
|
|
113
|
+
console.log(`Installing Ra Pay CLI v${VERSION} for ${getPlatformKey()}...`);
|
|
114
|
+
|
|
115
|
+
// Create bin directory
|
|
116
|
+
if (!fs.existsSync(binDir)) {
|
|
117
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
// Step 1: Download checksums.txt
|
|
122
|
+
console.log('Downloading checksums...');
|
|
123
|
+
let checksums = {};
|
|
124
|
+
try {
|
|
125
|
+
const checksumsContent = await download(checksumsUrl);
|
|
126
|
+
checksums = parseChecksums(checksumsContent);
|
|
127
|
+
console.log(` Found ${Object.keys(checksums).length} checksums`);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
console.warn(' Warning: Could not download checksums.txt');
|
|
130
|
+
console.warn(' Proceeding without verification (first release may not have checksums)');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Step 2: Download binary
|
|
134
|
+
console.log(`Downloading ${binaryName}...`);
|
|
135
|
+
const binaryBuffer = await download(binaryUrl);
|
|
136
|
+
console.log(` Downloaded ${(binaryBuffer.length / 1024 / 1024).toFixed(2)} MB`);
|
|
137
|
+
|
|
138
|
+
// Step 3: Verify checksum (if available)
|
|
139
|
+
const expectedHash = checksums[binaryName];
|
|
140
|
+
if (expectedHash) {
|
|
141
|
+
console.log('Verifying checksum...');
|
|
142
|
+
const actualHash = calculateSha256(binaryBuffer);
|
|
143
|
+
|
|
144
|
+
if (actualHash !== expectedHash) {
|
|
145
|
+
console.error('');
|
|
146
|
+
console.error('SECURITY ERROR: Checksum verification failed!');
|
|
147
|
+
console.error(` Expected: ${expectedHash}`);
|
|
148
|
+
console.error(` Got: ${actualHash}`);
|
|
149
|
+
console.error('');
|
|
150
|
+
console.error('The downloaded binary may have been tampered with.');
|
|
151
|
+
console.error('Please report this issue at: https://github.com/Ra-Pay-AI/rapay/issues');
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
console.log(' Checksum verified OK');
|
|
156
|
+
} else if (Object.keys(checksums).length > 0) {
|
|
157
|
+
// We have checksums but not for this binary - suspicious
|
|
158
|
+
console.warn(` Warning: No checksum found for ${binaryName}`);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Step 4: Write binary to disk
|
|
162
|
+
fs.writeFileSync(destPath, binaryBuffer);
|
|
163
|
+
|
|
164
|
+
// Step 5: Make executable on Unix
|
|
165
|
+
if (platform !== 'win32') {
|
|
166
|
+
fs.chmodSync(destPath, 0o755);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
console.log('');
|
|
170
|
+
console.log('Ra Pay CLI installed successfully!');
|
|
171
|
+
console.log('Run "ra --help" to get started.');
|
|
172
|
+
console.log('');
|
|
173
|
+
console.log('Quick start:');
|
|
174
|
+
console.log(' ra link-bank Connect your Stripe account');
|
|
175
|
+
console.log(' ra balance Check your balance');
|
|
176
|
+
console.log(' ra send Send payments');
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error('');
|
|
179
|
+
console.error('Failed to install Ra Pay CLI:', error.message);
|
|
180
|
+
console.error('');
|
|
181
|
+
console.error('You can manually download the binary from:');
|
|
182
|
+
console.error(`https://github.com/${REPO}/releases/tag/v${VERSION}`);
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
install();
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rapay",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI-native payment infrastructure for AI agents. Send fiat USD payments via Stripe without browser automation.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"payments",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"stripe",
|
|
10
|
+
"fiat",
|
|
11
|
+
"terminal",
|
|
12
|
+
"automation",
|
|
13
|
+
"mcp",
|
|
14
|
+
"claude",
|
|
15
|
+
"chatgpt"
|
|
16
|
+
],
|
|
17
|
+
"author": "Ra Pay AI, LLC <e@rapay.ai>",
|
|
18
|
+
"license": "UNLICENSED",
|
|
19
|
+
"homepage": "https://rapay.ai",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/Ra-Pay-AI/rapay"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/Ra-Pay-AI/rapay/issues"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"ra": "bin/ra"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"postinstall": "node install.js"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=14.0.0"
|
|
35
|
+
},
|
|
36
|
+
"os": [
|
|
37
|
+
"darwin",
|
|
38
|
+
"linux",
|
|
39
|
+
"win32"
|
|
40
|
+
],
|
|
41
|
+
"cpu": [
|
|
42
|
+
"x64",
|
|
43
|
+
"arm64"
|
|
44
|
+
],
|
|
45
|
+
"files": [
|
|
46
|
+
"bin",
|
|
47
|
+
"install.js",
|
|
48
|
+
"README.md",
|
|
49
|
+
"LICENSE"
|
|
50
|
+
]
|
|
51
|
+
}
|