@remitmd/sdk 0.1.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 +21 -0
- package/README.md +250 -0
- package/dist/a2a.d.ts +137 -0
- package/dist/a2a.d.ts.map +1 -0
- package/dist/a2a.js +121 -0
- package/dist/a2a.js.map +1 -0
- package/dist/client.d.ts +41 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +81 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +108 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +218 -0
- package/dist/errors.js.map +1 -0
- package/dist/http.d.ts +23 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +150 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/vercel-ai.d.ts +44 -0
- package/dist/integrations/vercel-ai.d.ts.map +1 -0
- package/dist/integrations/vercel-ai.js +175 -0
- package/dist/integrations/vercel-ai.js.map +1 -0
- package/dist/models/bounty.d.ts +22 -0
- package/dist/models/bounty.d.ts.map +1 -0
- package/dist/models/bounty.js +2 -0
- package/dist/models/bounty.js.map +1 -0
- package/dist/models/common.d.ts +78 -0
- package/dist/models/common.d.ts.map +1 -0
- package/dist/models/common.js +3 -0
- package/dist/models/common.js.map +1 -0
- package/dist/models/deposit.d.ts +13 -0
- package/dist/models/deposit.d.ts.map +1 -0
- package/dist/models/deposit.js +2 -0
- package/dist/models/deposit.js.map +1 -0
- package/dist/models/escrow.d.ts +16 -0
- package/dist/models/escrow.d.ts.map +1 -0
- package/dist/models/escrow.js +2 -0
- package/dist/models/escrow.js.map +1 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +9 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/invoice.d.ts +30 -0
- package/dist/models/invoice.d.ts.map +1 -0
- package/dist/models/invoice.js +2 -0
- package/dist/models/invoice.js.map +1 -0
- package/dist/models/reputation.d.ts +7 -0
- package/dist/models/reputation.d.ts.map +1 -0
- package/dist/models/reputation.js +2 -0
- package/dist/models/reputation.js.map +1 -0
- package/dist/models/stream.d.ts +15 -0
- package/dist/models/stream.d.ts.map +1 -0
- package/dist/models/stream.js +2 -0
- package/dist/models/stream.js.map +1 -0
- package/dist/models/tab.d.ts +21 -0
- package/dist/models/tab.d.ts.map +1 -0
- package/dist/models/tab.js +2 -0
- package/dist/models/tab.js.map +1 -0
- package/dist/provider.d.ts +135 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +218 -0
- package/dist/provider.js.map +1 -0
- package/dist/signer.d.ts +31 -0
- package/dist/signer.d.ts.map +1 -0
- package/dist/signer.js +35 -0
- package/dist/signer.js.map +1 -0
- package/dist/testing/local.d.ts +31 -0
- package/dist/testing/local.d.ts.map +1 -0
- package/dist/testing/local.js +100 -0
- package/dist/testing/local.js.map +1 -0
- package/dist/testing/mock.d.ts +95 -0
- package/dist/testing/mock.d.ts.map +1 -0
- package/dist/testing/mock.js +407 -0
- package/dist/testing/mock.js.map +1 -0
- package/dist/wallet.d.ts +162 -0
- package/dist/wallet.d.ts.map +1 -0
- package/dist/wallet.js +365 -0
- package/dist/wallet.js.map +1 -0
- package/dist/x402.d.ts +78 -0
- package/dist/x402.d.ts.map +1 -0
- package/dist/x402.js +151 -0
- package/dist/x402.js.map +1 -0
- package/eslint.config.js +27 -0
- package/package.json +39 -0
- package/src/a2a.ts +241 -0
- package/src/client.ts +104 -0
- package/src/errors.ts +261 -0
- package/src/http.ts +190 -0
- package/src/index.ts +94 -0
- package/src/integrations/vercel-ai.ts +213 -0
- package/src/models/bounty.ts +23 -0
- package/src/models/common.ts +106 -0
- package/src/models/deposit.ts +13 -0
- package/src/models/escrow.ts +16 -0
- package/src/models/index.ts +8 -0
- package/src/models/invoice.ts +32 -0
- package/src/models/reputation.ts +7 -0
- package/src/models/stream.ts +15 -0
- package/src/models/tab.ts +22 -0
- package/src/provider.ts +281 -0
- package/src/signer.ts +70 -0
- package/src/testing/local.ts +118 -0
- package/src/testing/mock.ts +507 -0
- package/src/wallet.ts +546 -0
- package/src/x402.ts +202 -0
- package/tests/acceptance/bounty.test.ts +82 -0
- package/tests/acceptance/deposit.test.ts +70 -0
- package/tests/acceptance/direct.test.ts +53 -0
- package/tests/acceptance/escrow.test.ts +67 -0
- package/tests/acceptance/setup.ts +113 -0
- package/tests/acceptance/stream.test.ts +98 -0
- package/tests/acceptance/tab.test.ts +108 -0
- package/tests/acceptance/x402.test.ts +140 -0
- package/tests/compliance/auth.ts +69 -0
- package/tests/compliance/escrows.ts +96 -0
- package/tests/compliance/helpers.ts +90 -0
- package/tests/compliance/payments.ts +69 -0
- package/tests/compliance/tabs.ts +52 -0
- package/tests/test_a2a.ts +151 -0
- package/tests/test_errors.ts +80 -0
- package/tests/test_golden_vectors.ts +162 -0
- package/tests/test_integrations.ts +115 -0
- package/tests/test_mock.ts +217 -0
- package/tests/test_permit.ts +216 -0
- package/tests/test_provider.ts +304 -0
- package/tests/test_wallet.ts +108 -0
- package/tests/test_x402.ts +302 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vercel AI SDK integration for remit.md.
|
|
3
|
+
*
|
|
4
|
+
* Usage with the Vercel AI SDK:
|
|
5
|
+
*
|
|
6
|
+
* import { generateText } from "ai";
|
|
7
|
+
* import { anthropic } from "@ai-sdk/anthropic";
|
|
8
|
+
* import { Wallet } from "@remitmd/sdk";
|
|
9
|
+
* import { remitTools } from "@remitmd/sdk/integrations/vercel-ai";
|
|
10
|
+
*
|
|
11
|
+
* const wallet = Wallet.fromEnv();
|
|
12
|
+
* const result = await generateText({
|
|
13
|
+
* model: anthropic("claude-opus-4-6"),
|
|
14
|
+
* tools: remitTools(wallet),
|
|
15
|
+
* prompt: "Pay agent@example.com $5 for the data analysis.",
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* Note: This module exports plain tool descriptors compatible with the AI SDK tool()
|
|
19
|
+
* format. Import `tool` from "ai" and `z` from "zod" in your application — we don't
|
|
20
|
+
* bundle them to avoid version conflicts.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Returns remit.md payment tools configured for the given wallet.
|
|
24
|
+
* Pass the result directly as the `tools` parameter to `generateText` / `streamText`.
|
|
25
|
+
*
|
|
26
|
+
* Compatible with Vercel AI SDK v3+. Each entry is a plain object with
|
|
27
|
+
* `description`, `parameters`, and `execute` — wrap with `tool()` from "ai" if needed.
|
|
28
|
+
*/
|
|
29
|
+
export function remitTools(wallet) {
|
|
30
|
+
return {
|
|
31
|
+
remit_pay_direct: {
|
|
32
|
+
description: "Send a direct USDC payment to another agent or address. Use for simple transfers, tips, or one-time payments.",
|
|
33
|
+
parameters: {
|
|
34
|
+
to: { type: "string", description: "Recipient wallet address (0x...)" },
|
|
35
|
+
amount: { type: "number", description: "Amount in USD (e.g. 5.00)" },
|
|
36
|
+
memo: { type: "string", description: "Optional payment memo", optional: true },
|
|
37
|
+
},
|
|
38
|
+
execute: async (to, amount, memo) => wallet.payDirect(String(to), Number(amount), memo ? String(memo) : ""),
|
|
39
|
+
},
|
|
40
|
+
remit_check_balance: {
|
|
41
|
+
description: "Check the current USDC balance of this wallet.",
|
|
42
|
+
parameters: {},
|
|
43
|
+
execute: async () => {
|
|
44
|
+
const b = await wallet.balance();
|
|
45
|
+
return { balance: b, currency: "USDC" };
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
remit_get_status: {
|
|
49
|
+
description: "Get detailed wallet status including tier, monthly volume, and fee rate.",
|
|
50
|
+
parameters: {},
|
|
51
|
+
execute: async () => wallet.status(),
|
|
52
|
+
},
|
|
53
|
+
remit_create_escrow: {
|
|
54
|
+
description: "Fund an escrow for a task. Funds are held until the payee completes the work and you release them.",
|
|
55
|
+
parameters: {
|
|
56
|
+
to: { type: "string", description: "Payee wallet address" },
|
|
57
|
+
amount: { type: "number", description: "Escrow amount in USD" },
|
|
58
|
+
task: { type: "string", description: "Description of the task" },
|
|
59
|
+
timeout: {
|
|
60
|
+
type: "number",
|
|
61
|
+
description: "Seconds until escrow expires (default 86400)",
|
|
62
|
+
optional: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
execute: async (to, amount, task, timeout) => wallet.pay({
|
|
66
|
+
id: `inv-${Date.now()}`,
|
|
67
|
+
from: wallet.address,
|
|
68
|
+
to: String(to),
|
|
69
|
+
amount: Number(amount),
|
|
70
|
+
chain: "base",
|
|
71
|
+
status: "pending",
|
|
72
|
+
paymentType: "escrow",
|
|
73
|
+
memo: String(task),
|
|
74
|
+
timeout: timeout ? Number(timeout) : 86400,
|
|
75
|
+
createdAt: Math.floor(Date.now() / 1000),
|
|
76
|
+
}),
|
|
77
|
+
},
|
|
78
|
+
remit_release_escrow: {
|
|
79
|
+
description: "Release escrowed funds to the payee after verifying the work is complete.",
|
|
80
|
+
parameters: {
|
|
81
|
+
invoice_id: { type: "string", description: "Invoice ID of the escrow to release" },
|
|
82
|
+
},
|
|
83
|
+
execute: async (invoice_id) => wallet.releaseEscrow(String(invoice_id)),
|
|
84
|
+
},
|
|
85
|
+
remit_open_tab: {
|
|
86
|
+
description: "Open a metered payment tab for pay-per-use services. The payee charges against the tab as the service is used.",
|
|
87
|
+
parameters: {
|
|
88
|
+
to: { type: "string", description: "Service provider wallet address" },
|
|
89
|
+
limit: { type: "number", description: "Maximum total spend in USD" },
|
|
90
|
+
per_unit: { type: "number", description: "Cost per unit of service in USD" },
|
|
91
|
+
expires: {
|
|
92
|
+
type: "number",
|
|
93
|
+
description: "Tab lifetime in seconds (default 86400)",
|
|
94
|
+
optional: true,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
execute: async (to, limit, per_unit, expires) => wallet.openTab({
|
|
98
|
+
to: String(to),
|
|
99
|
+
limit: Number(limit),
|
|
100
|
+
perUnit: Number(per_unit),
|
|
101
|
+
expires: expires ? Number(expires) : undefined,
|
|
102
|
+
}),
|
|
103
|
+
},
|
|
104
|
+
remit_close_tab: {
|
|
105
|
+
description: "Close a metered payment tab and settle final charges.",
|
|
106
|
+
parameters: {
|
|
107
|
+
tab_id: { type: "string", description: "Tab ID to close" },
|
|
108
|
+
},
|
|
109
|
+
execute: async (tab_id) => wallet.closeTab(String(tab_id)),
|
|
110
|
+
},
|
|
111
|
+
remit_open_stream: {
|
|
112
|
+
description: "Start a streaming payment to an agent. Funds flow continuously at the specified rate.",
|
|
113
|
+
parameters: {
|
|
114
|
+
to: { type: "string", description: "Recipient wallet address" },
|
|
115
|
+
rate: { type: "number", description: "Payment rate in USD per second" },
|
|
116
|
+
max_duration: {
|
|
117
|
+
type: "number",
|
|
118
|
+
description: "Maximum stream duration in seconds (default 3600)",
|
|
119
|
+
optional: true,
|
|
120
|
+
},
|
|
121
|
+
max_total: {
|
|
122
|
+
type: "number",
|
|
123
|
+
description: "Maximum total payment in USD",
|
|
124
|
+
optional: true,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
execute: async (to, rate, max_duration, max_total) => wallet.openStream({
|
|
128
|
+
to: String(to),
|
|
129
|
+
rate: Number(rate),
|
|
130
|
+
maxDuration: max_duration ? Number(max_duration) : undefined,
|
|
131
|
+
maxTotal: max_total ? Number(max_total) : undefined,
|
|
132
|
+
}),
|
|
133
|
+
},
|
|
134
|
+
remit_close_stream: {
|
|
135
|
+
description: "Stop a streaming payment. Unspent funds are returned to sender.",
|
|
136
|
+
parameters: {
|
|
137
|
+
stream_id: { type: "string", description: "Stream ID to close" },
|
|
138
|
+
},
|
|
139
|
+
execute: async (stream_id) => wallet.closeStream(String(stream_id)),
|
|
140
|
+
},
|
|
141
|
+
remit_post_bounty: {
|
|
142
|
+
description: "Post an open bounty for any agent to claim. Funds are locked until you award a winner.",
|
|
143
|
+
parameters: {
|
|
144
|
+
amount: { type: "number", description: "Bounty amount in USD" },
|
|
145
|
+
task: { type: "string", description: "Task description" },
|
|
146
|
+
deadline: { type: "number", description: "Deadline as unix timestamp" },
|
|
147
|
+
max_attempts: {
|
|
148
|
+
type: "number",
|
|
149
|
+
description: "Max number of submission attempts (default 10)",
|
|
150
|
+
optional: true,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
execute: async (amount, task, deadline, max_attempts) => wallet.postBounty({
|
|
154
|
+
amount: Number(amount),
|
|
155
|
+
task: String(task),
|
|
156
|
+
deadline: Number(deadline),
|
|
157
|
+
maxAttempts: max_attempts ? Number(max_attempts) : undefined,
|
|
158
|
+
}),
|
|
159
|
+
},
|
|
160
|
+
remit_place_deposit: {
|
|
161
|
+
description: "Lock a refundable deposit with a counterparty as a performance bond or access credential.",
|
|
162
|
+
parameters: {
|
|
163
|
+
to: { type: "string", description: "Counterparty wallet address" },
|
|
164
|
+
amount: { type: "number", description: "Deposit amount in USD" },
|
|
165
|
+
expires: { type: "number", description: "Deposit lifetime in seconds" },
|
|
166
|
+
},
|
|
167
|
+
execute: async (to, amount, expires) => wallet.placeDeposit({
|
|
168
|
+
to: String(to),
|
|
169
|
+
amount: Number(amount),
|
|
170
|
+
expires: Number(expires),
|
|
171
|
+
}),
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=vercel-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-ai.js","sourceRoot":"","sources":["../../src/integrations/vercel-ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAkBH;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO;QACL,gBAAgB,EAAE;YAChB,WAAW,EACT,+GAA+G;YACjH,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;gBACvE,MAAM,EAAE,EAAE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AAS;aAC7D,CAAC;SACL;QAED,mBAAmB,EAAE;YACnB,WAAW,EACT,2FAA2F;YAC7F,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBAClE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;gBAChE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;aACxE;YACD,OAAO,EAAE,KAAK,EAAE,EAAW,EAAE,MAAe,EAAE,OAAgB,EAAE,EAAE,CAChE,MAAM,CAAC,YAAY,CAAC;gBAClB,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;gBACd,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;gBACtB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;aACzB,CAAC;SACL;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BountyStatus } from "./common.js";
|
|
2
|
+
export interface BountySubmission {
|
|
3
|
+
submitter: string;
|
|
4
|
+
evidenceUri: string;
|
|
5
|
+
submittedAt: number;
|
|
6
|
+
accepted?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Bounty {
|
|
9
|
+
id: string;
|
|
10
|
+
poster: string;
|
|
11
|
+
amount: number;
|
|
12
|
+
task: string;
|
|
13
|
+
chain: string;
|
|
14
|
+
status: BountyStatus;
|
|
15
|
+
validation: "poster" | "oracle" | "multisig";
|
|
16
|
+
maxAttempts: number;
|
|
17
|
+
submissions: BountySubmission[];
|
|
18
|
+
winner?: string;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
deadline: number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=bounty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounty.d.ts","sourceRoot":"","sources":["../../src/models/bounty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounty.js","sourceRoot":"","sources":["../../src/models/bounty.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** Common enums and shared model types. */
|
|
2
|
+
export type ChainId = "base" | "base-sepolia";
|
|
3
|
+
export type InvoiceStatus = "pending" | "funded" | "active" | "completed" | "cancelled" | "failed";
|
|
4
|
+
export type EscrowStatus = "pending" | "funded" | "active" | "completed" | "cancelled" | "failed";
|
|
5
|
+
export type TabStatus = "open" | "closed" | "expired" | "suspended";
|
|
6
|
+
export type StreamStatus = "active" | "paused" | "closed" | "completed" | "cancelled";
|
|
7
|
+
export type BountyStatus = "open" | "closed" | "awarded" | "expired" | "cancelled";
|
|
8
|
+
export type DepositStatus = "locked" | "returned" | "forfeited" | "expired";
|
|
9
|
+
export type ReputationTier = "new" | "trusted" | "verified" | "elite";
|
|
10
|
+
/** Result of a write operation. */
|
|
11
|
+
export interface Transaction {
|
|
12
|
+
invoiceId?: string;
|
|
13
|
+
txHash?: string;
|
|
14
|
+
chain: string;
|
|
15
|
+
status: string;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
}
|
|
18
|
+
/** Wallet status including balance and tier info. */
|
|
19
|
+
export interface WalletStatus {
|
|
20
|
+
wallet: string;
|
|
21
|
+
balance: string;
|
|
22
|
+
monthly_volume: string;
|
|
23
|
+
tier: string;
|
|
24
|
+
fee_rate_bps: number;
|
|
25
|
+
active_escrows: number;
|
|
26
|
+
active_tabs: number;
|
|
27
|
+
active_streams: number;
|
|
28
|
+
}
|
|
29
|
+
/** On-chain reputation profile. */
|
|
30
|
+
export interface Reputation {
|
|
31
|
+
address: string;
|
|
32
|
+
score: number;
|
|
33
|
+
totalPaid: number;
|
|
34
|
+
totalReceived: number;
|
|
35
|
+
escrowsCompleted: number;
|
|
36
|
+
memberSince: number;
|
|
37
|
+
}
|
|
38
|
+
/** Webhook/polling event. */
|
|
39
|
+
export interface RemitEvent {
|
|
40
|
+
id: string;
|
|
41
|
+
type: string;
|
|
42
|
+
chain: string;
|
|
43
|
+
wallet: string;
|
|
44
|
+
payload: Record<string, unknown>;
|
|
45
|
+
createdAt: number;
|
|
46
|
+
}
|
|
47
|
+
/** Registered webhook endpoint. */
|
|
48
|
+
export interface Webhook {
|
|
49
|
+
id: string;
|
|
50
|
+
wallet: string;
|
|
51
|
+
url: string;
|
|
52
|
+
events: string[];
|
|
53
|
+
chains: string[];
|
|
54
|
+
active: boolean;
|
|
55
|
+
createdAt: number;
|
|
56
|
+
}
|
|
57
|
+
/** One-time operator link returned by createFundLink / createWithdrawLink. */
|
|
58
|
+
export interface LinkResponse {
|
|
59
|
+
url: string;
|
|
60
|
+
token: string;
|
|
61
|
+
expiresAt: string;
|
|
62
|
+
walletAddress: string;
|
|
63
|
+
}
|
|
64
|
+
/** Contract addresses returned by GET /contracts. */
|
|
65
|
+
export interface ContractAddresses {
|
|
66
|
+
chain_id: number;
|
|
67
|
+
usdc: string;
|
|
68
|
+
router: string;
|
|
69
|
+
escrow: string;
|
|
70
|
+
tab: string;
|
|
71
|
+
stream: string;
|
|
72
|
+
bounty: string;
|
|
73
|
+
deposit: string;
|
|
74
|
+
fee_calculator: string;
|
|
75
|
+
key_registry: string;
|
|
76
|
+
arbitration: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/models/common.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,MAAM,MAAM,OAAO,GACf,MAAM,GACN,cAAc,CAAC;AAEnB,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5E,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEtE,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,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;AAED,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/models/common.ts"],"names":[],"mappings":"AAAA,2CAA2C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DepositStatus } from "./common.js";
|
|
2
|
+
export interface Deposit {
|
|
3
|
+
id: string;
|
|
4
|
+
payer: string;
|
|
5
|
+
payee: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
chain: string;
|
|
8
|
+
status: DepositStatus;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
releasedAt?: number;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=deposit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit.d.ts","sourceRoot":"","sources":["../../src/models/deposit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit.js","sourceRoot":"","sources":["../../src/models/deposit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EscrowStatus } from "./common.js";
|
|
2
|
+
export interface Escrow {
|
|
3
|
+
invoiceId: string;
|
|
4
|
+
txHash?: string;
|
|
5
|
+
payer: string;
|
|
6
|
+
payee: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
chain: string;
|
|
9
|
+
status: EscrowStatus;
|
|
10
|
+
milestoneIndex?: number;
|
|
11
|
+
claimStartedAt?: number;
|
|
12
|
+
evidenceUri?: string;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
expiresAt?: number;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=escrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../src/models/escrow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escrow.js","sourceRoot":"","sources":["../../src/models/escrow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./common.js";
|
|
2
|
+
export * from "./invoice.js";
|
|
3
|
+
export * from "./escrow.js";
|
|
4
|
+
export * from "./tab.js";
|
|
5
|
+
export * from "./stream.js";
|
|
6
|
+
export * from "./bounty.js";
|
|
7
|
+
export * from "./deposit.js";
|
|
8
|
+
export * from "./reputation.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./common.js";
|
|
2
|
+
export * from "./invoice.js";
|
|
3
|
+
export * from "./escrow.js";
|
|
4
|
+
export * from "./tab.js";
|
|
5
|
+
export * from "./stream.js";
|
|
6
|
+
export * from "./bounty.js";
|
|
7
|
+
export * from "./deposit.js";
|
|
8
|
+
export * from "./reputation.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { InvoiceStatus } from "./common.js";
|
|
2
|
+
export interface Milestone {
|
|
3
|
+
index: number;
|
|
4
|
+
description: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
deadline?: number;
|
|
7
|
+
evidenceUri?: string;
|
|
8
|
+
releasedAt?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Split {
|
|
11
|
+
recipient: string;
|
|
12
|
+
basisPoints: number;
|
|
13
|
+
}
|
|
14
|
+
export interface Invoice {
|
|
15
|
+
id: string;
|
|
16
|
+
from: string;
|
|
17
|
+
to: string;
|
|
18
|
+
amount: number;
|
|
19
|
+
chain: string;
|
|
20
|
+
status: InvoiceStatus;
|
|
21
|
+
paymentType: "escrow" | "tab" | "stream" | "bounty" | "deposit" | "direct";
|
|
22
|
+
memo?: string;
|
|
23
|
+
milestones?: Milestone[];
|
|
24
|
+
splits?: Split[];
|
|
25
|
+
timeout?: number;
|
|
26
|
+
createdAt: number;
|
|
27
|
+
expiresAt?: number;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=invoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../../src/models/invoice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/models/invoice.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reputation.d.ts","sourceRoot":"","sources":["../../src/models/reputation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AAE3C,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reputation.js","sourceRoot":"","sources":["../../src/models/reputation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StreamStatus } from "./common.js";
|
|
2
|
+
export interface Stream {
|
|
3
|
+
id: string;
|
|
4
|
+
payer: string;
|
|
5
|
+
payee: string;
|
|
6
|
+
ratePerSecond: number;
|
|
7
|
+
maxDuration: number;
|
|
8
|
+
maxTotal?: number;
|
|
9
|
+
totalStreamed: number;
|
|
10
|
+
chain: string;
|
|
11
|
+
status: StreamStatus;
|
|
12
|
+
startedAt: number;
|
|
13
|
+
closedAt?: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../src/models/stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/models/stream.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TabStatus } from "./common.js";
|
|
2
|
+
export interface Tab {
|
|
3
|
+
id: string;
|
|
4
|
+
payer: string;
|
|
5
|
+
payee: string;
|
|
6
|
+
limit: number;
|
|
7
|
+
perUnit: number;
|
|
8
|
+
spent: number;
|
|
9
|
+
chain: string;
|
|
10
|
+
status: TabStatus;
|
|
11
|
+
createdAt: number;
|
|
12
|
+
expiresAt: number;
|
|
13
|
+
}
|
|
14
|
+
export interface TabCharge {
|
|
15
|
+
tabId: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
units: number;
|
|
18
|
+
memo?: string;
|
|
19
|
+
chargedAt: number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/models/tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.js","sourceRoot":"","sources":["../../src/models/tab.ts"],"names":[],"mappings":""}
|