getcofund 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +200 -2
- package/dist/api-types.d.ts +1794 -0
- package/dist/api-types.js +737 -0
- package/dist/btc-policy-activation.d.ts +49 -0
- package/dist/btc-policy-activation.js +86 -0
- package/dist/chains.d.ts +16 -0
- package/dist/chains.js +26 -0
- package/dist/cli/context.d.ts +27 -0
- package/dist/cli/context.js +69 -0
- package/dist/cli/invite.d.ts +15 -0
- package/dist/cli/invite.js +165 -0
- package/dist/cli/keys.d.ts +6 -0
- package/dist/cli/keys.js +22 -0
- package/dist/cli/policies.d.ts +17 -0
- package/dist/cli/policies.js +100 -0
- package/dist/cli/request-lines.d.ts +7 -0
- package/dist/cli/request-lines.js +116 -0
- package/dist/cli/requests.d.ts +3 -0
- package/dist/cli/requests.js +52 -0
- package/dist/cli/stocks.d.ts +9 -0
- package/dist/cli/stocks.js +81 -0
- package/dist/cli/webhooks.d.ts +5 -0
- package/dist/cli/webhooks.js +39 -0
- package/dist/cli.d.ts +32 -0
- package/dist/cli.js +131 -0
- package/dist/client.d.ts +1172 -0
- package/dist/client.js +174 -0
- package/dist/eip712.d.ts +234 -0
- package/dist/eip712.js +215 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/invite.d.ts +54 -0
- package/dist/invite.js +110 -0
- package/dist/keys.d.ts +51 -0
- package/dist/keys.js +97 -0
- package/dist/policies.d.ts +69 -0
- package/dist/policies.js +132 -0
- package/dist/requests.d.ts +114 -0
- package/dist/requests.js +249 -0
- package/dist/stocks/decode-stock-swap.d.ts +26 -0
- package/dist/stocks/decode-stock-swap.js +93 -0
- package/dist/stocks/encode-swap.d.ts +30 -0
- package/dist/stocks/encode-swap.js +36 -0
- package/dist/stocks/index.d.ts +9 -0
- package/dist/stocks/index.js +10 -0
- package/dist/stocks/quote.d.ts +19 -0
- package/dist/stocks/quote.js +38 -0
- package/dist/stocks/stock-pools.d.ts +61 -0
- package/dist/stocks/stock-pools.js +179 -0
- package/dist/webhooks.d.ts +19 -0
- package/dist/webhooks.js +47 -0
- package/dist/xpub-ownership.d.ts +10 -0
- package/dist/xpub-ownership.js +13 -0
- package/package.json +77 -3
|
@@ -0,0 +1,1794 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/api/v1` wire shapes, as zod schemas. The server's route handlers parse
|
|
3
|
+
* request bodies with them, the client parses responses with them, and every
|
|
4
|
+
* type is inferred from them: one definition.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
/** An EVM address in any casing: the server sends some lowercase. */
|
|
8
|
+
export declare const Address: z.ZodString;
|
|
9
|
+
export declare const Bytes32: z.ZodString;
|
|
10
|
+
/** 0x and whole bytes. */
|
|
11
|
+
export declare const Hex: z.ZodString;
|
|
12
|
+
/** A 65-byte ECDSA signature: r, s, v. */
|
|
13
|
+
export declare const Signature: z.ZodString;
|
|
14
|
+
/** A 64-byte BIP-340 signature, bare hex. */
|
|
15
|
+
export declare const SchnorrSignature: z.ZodString;
|
|
16
|
+
/** A 64-byte compact ECDSA signature (r, s), bare hex: a Bitcoin message approval. */
|
|
17
|
+
export declare const BtcMessageSignature: z.ZodString;
|
|
18
|
+
/** Every id: cofund, user, policy, vault, request, and a signed `authId`, `callerId` or `userId`. */
|
|
19
|
+
export declare const Uuid: z.ZodUUID;
|
|
20
|
+
export declare const BaseUnits: z.ZodString;
|
|
21
|
+
export declare const PositiveBaseUnits: z.ZodString;
|
|
22
|
+
export declare const UnixSeconds: z.ZodString;
|
|
23
|
+
export declare const IsoDateTime: z.ZodISODateTime;
|
|
24
|
+
/**
|
|
25
|
+
* `Company.name`: `normalizeCompanyName`'s output, behind the deployment's
|
|
26
|
+
* namespace when it has one (itself normalized): lowercase letters and digits
|
|
27
|
+
* in runs joined by single hyphens, 3 characters at least. Every message's
|
|
28
|
+
* `company`, and the preimage of the on-chain `clientId`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CompanyName: z.ZodString;
|
|
31
|
+
/** A BIP-86 account key: an xpub, or a tpub off mainnet. */
|
|
32
|
+
export declare const BtcXpub: z.ZodString;
|
|
33
|
+
/** Any Bitcoin address a payment takes: base58 (P2PKH, P2SH) or bech32/bech32m. */
|
|
34
|
+
export declare const BtcAddress: z.ZodString;
|
|
35
|
+
/** Mainnet, testnet/signet or regtest. */
|
|
36
|
+
export declare const TaprootAddress: z.ZodString;
|
|
37
|
+
/** What an API key may do. */
|
|
38
|
+
export declare const API_SCOPES: readonly ["read", "propose", "sign"];
|
|
39
|
+
export declare const ApiScopeSchema: z.ZodEnum<{
|
|
40
|
+
read: "read";
|
|
41
|
+
propose: "propose";
|
|
42
|
+
sign: "sign";
|
|
43
|
+
}>;
|
|
44
|
+
export type ApiScope = z.infer<typeof ApiScopeSchema>;
|
|
45
|
+
export declare const ChainNameSchema: z.ZodEnum<{
|
|
46
|
+
ETHEREUM: "ETHEREUM";
|
|
47
|
+
BASE: "BASE";
|
|
48
|
+
ARBITRUM: "ARBITRUM";
|
|
49
|
+
ROBINHOOD: "ROBINHOOD";
|
|
50
|
+
BTC: "BTC";
|
|
51
|
+
}>;
|
|
52
|
+
export type ChainName = z.infer<typeof ChainNameSchema>;
|
|
53
|
+
export declare const EvmChainNameSchema: z.ZodEnum<{
|
|
54
|
+
ETHEREUM: "ETHEREUM";
|
|
55
|
+
BASE: "BASE";
|
|
56
|
+
ARBITRUM: "ARBITRUM";
|
|
57
|
+
ROBINHOOD: "ROBINHOOD";
|
|
58
|
+
}>;
|
|
59
|
+
export type EvmChainName = z.infer<typeof EvmChainNameSchema>;
|
|
60
|
+
/** Where a member's key lives: Privy, a Ledger, or with the member. */
|
|
61
|
+
export declare const SignerTypeNameSchema: z.ZodEnum<{
|
|
62
|
+
EMBEDDED: "EMBEDDED";
|
|
63
|
+
LEDGER: "LEDGER";
|
|
64
|
+
EXTERNAL: "EXTERNAL";
|
|
65
|
+
}>;
|
|
66
|
+
export type SignerTypeName = z.infer<typeof SignerTypeNameSchema>;
|
|
67
|
+
/** A policy's type, and the `messageType` every request under it signs. */
|
|
68
|
+
export declare const PolicyTypeSchema: z.ZodEnum<{
|
|
69
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
70
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
71
|
+
Business_Invoice: "Business_Invoice";
|
|
72
|
+
Operational_Expense: "Operational_Expense";
|
|
73
|
+
Treasury_Management: "Treasury_Management";
|
|
74
|
+
}>;
|
|
75
|
+
export type PolicyType = z.infer<typeof PolicyTypeSchema>;
|
|
76
|
+
/** The types the API lists and creates: not the app's own deposit and invoice policies. */
|
|
77
|
+
export declare const ApiPolicyTypeSchema: z.ZodEnum<{
|
|
78
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
79
|
+
Operational_Expense: "Operational_Expense";
|
|
80
|
+
Treasury_Management: "Treasury_Management";
|
|
81
|
+
}>;
|
|
82
|
+
export type ApiPolicyType = z.infer<typeof ApiPolicyTypeSchema>;
|
|
83
|
+
export declare const PolicyStatusSchema: z.ZodEnum<{
|
|
84
|
+
PENDING: "PENDING";
|
|
85
|
+
ACTIVE: "ACTIVE";
|
|
86
|
+
INACTIVE: "INACTIVE";
|
|
87
|
+
FAILED: "FAILED";
|
|
88
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
89
|
+
}>;
|
|
90
|
+
export type PolicyStatus = z.infer<typeof PolicyStatusSchema>;
|
|
91
|
+
export declare const RequestStatusSchema: z.ZodEnum<{
|
|
92
|
+
PENDING: "PENDING";
|
|
93
|
+
FAILED: "FAILED";
|
|
94
|
+
DRAFT: "DRAFT";
|
|
95
|
+
COMPLETED: "COMPLETED";
|
|
96
|
+
OVERDUE: "OVERDUE";
|
|
97
|
+
}>;
|
|
98
|
+
export type RequestStatus = z.infer<typeof RequestStatusSchema>;
|
|
99
|
+
export declare const InviteStatusSchema: z.ZodEnum<{
|
|
100
|
+
FAILED: "FAILED";
|
|
101
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
102
|
+
COMPLETED: "COMPLETED";
|
|
103
|
+
AWAITING_SUBMISSION: "AWAITING_SUBMISSION";
|
|
104
|
+
PROCESSING: "PROCESSING";
|
|
105
|
+
EXPIRED: "EXPIRED";
|
|
106
|
+
CANCELED: "CANCELED";
|
|
107
|
+
REJECTED: "REJECTED";
|
|
108
|
+
}>;
|
|
109
|
+
export type InviteStatus = z.infer<typeof InviteStatusSchema>;
|
|
110
|
+
export declare const TransactionStatusSchema: z.ZodEnum<{
|
|
111
|
+
FAILED: "FAILED";
|
|
112
|
+
PENDING_CREATION: "PENDING_CREATION";
|
|
113
|
+
PENDING_CONFIRMATION: "PENDING_CONFIRMATION";
|
|
114
|
+
SUCCESS: "SUCCESS";
|
|
115
|
+
}>;
|
|
116
|
+
export type TransactionStatus = z.infer<typeof TransactionStatusSchema>;
|
|
117
|
+
/** `buildCofundDomain`: one name and version, a chain's State. */
|
|
118
|
+
export declare const Eip712DomainSchema: z.ZodObject<{
|
|
119
|
+
name: z.ZodLiteral<"Cofund">;
|
|
120
|
+
version: z.ZodLiteral<"1">;
|
|
121
|
+
chainId: z.ZodNumber;
|
|
122
|
+
verifyingContract: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/** EIP-712 struct definitions: `Transfer: [{ name: "amount", type: "uint256" }, …]`. */
|
|
125
|
+
export declare const Eip712TypesSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
126
|
+
name: z.ZodString;
|
|
127
|
+
type: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
export declare const InviteUserMessageSchema: z.ZodObject<{
|
|
130
|
+
company: z.ZodString;
|
|
131
|
+
callerId: z.ZodUUID;
|
|
132
|
+
userId: z.ZodUUID;
|
|
133
|
+
userIsAdmin: z.ZodBoolean;
|
|
134
|
+
userPosition: z.ZodString;
|
|
135
|
+
expiresAt: z.ZodString;
|
|
136
|
+
authId: z.ZodUUID;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export declare const AllowanceMessageSchema: z.ZodObject<{
|
|
139
|
+
asset: z.ZodString;
|
|
140
|
+
amount: z.ZodString;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export declare const TransferMessageSchema: z.ZodObject<{
|
|
143
|
+
company: z.ZodString;
|
|
144
|
+
policyId: z.ZodUUID;
|
|
145
|
+
messageType: z.ZodEnum<{
|
|
146
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
147
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
148
|
+
Business_Invoice: "Business_Invoice";
|
|
149
|
+
Operational_Expense: "Operational_Expense";
|
|
150
|
+
Treasury_Management: "Treasury_Management";
|
|
151
|
+
}>;
|
|
152
|
+
amount: z.ZodString;
|
|
153
|
+
token: z.ZodString;
|
|
154
|
+
recipient: z.ZodString;
|
|
155
|
+
authId: z.ZodUUID;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export declare const TransactionMessageSchema: z.ZodObject<{
|
|
158
|
+
company: z.ZodString;
|
|
159
|
+
policyId: z.ZodUUID;
|
|
160
|
+
messageType: z.ZodEnum<{
|
|
161
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
162
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
163
|
+
Business_Invoice: "Business_Invoice";
|
|
164
|
+
Operational_Expense: "Operational_Expense";
|
|
165
|
+
Treasury_Management: "Treasury_Management";
|
|
166
|
+
}>;
|
|
167
|
+
wrapper: z.ZodString;
|
|
168
|
+
func: z.ZodLiteral<"entry">;
|
|
169
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
170
|
+
asset: z.ZodString;
|
|
171
|
+
amount: z.ZodString;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
instructionsHash: z.ZodString;
|
|
174
|
+
authId: z.ZodUUID;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export declare const TransferPolicyActivationMessageSchema: z.ZodObject<{
|
|
177
|
+
token: z.ZodString;
|
|
178
|
+
maxAmount: z.ZodString;
|
|
179
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
180
|
+
company: z.ZodString;
|
|
181
|
+
policyId: z.ZodUUID;
|
|
182
|
+
title: z.ZodString;
|
|
183
|
+
policyType: z.ZodEnum<{
|
|
184
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
185
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
186
|
+
Business_Invoice: "Business_Invoice";
|
|
187
|
+
Operational_Expense: "Operational_Expense";
|
|
188
|
+
Treasury_Management: "Treasury_Management";
|
|
189
|
+
}>;
|
|
190
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
191
|
+
threshold: z.ZodString;
|
|
192
|
+
authId: z.ZodUUID;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
export declare const TransactionPolicyActivationMessageSchema: z.ZodObject<{
|
|
195
|
+
wrapper: z.ZodString;
|
|
196
|
+
func: z.ZodLiteral<"entry">;
|
|
197
|
+
company: z.ZodString;
|
|
198
|
+
policyId: z.ZodUUID;
|
|
199
|
+
title: z.ZodString;
|
|
200
|
+
policyType: z.ZodEnum<{
|
|
201
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
202
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
203
|
+
Business_Invoice: "Business_Invoice";
|
|
204
|
+
Operational_Expense: "Operational_Expense";
|
|
205
|
+
Treasury_Management: "Treasury_Management";
|
|
206
|
+
}>;
|
|
207
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
208
|
+
threshold: z.ZodString;
|
|
209
|
+
authId: z.ZodUUID;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
/** Every error: the status, and this body. */
|
|
212
|
+
export declare const ApiErrorSchema: z.ZodObject<{
|
|
213
|
+
error: z.ZodString;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
export type ApiError = z.infer<typeof ApiErrorSchema>;
|
|
216
|
+
export declare const ApiCofundRefSchema: z.ZodObject<{
|
|
217
|
+
id: z.ZodUUID;
|
|
218
|
+
name: z.ZodString;
|
|
219
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
export type ApiCofundRef = z.infer<typeof ApiCofundRefSchema>;
|
|
222
|
+
/** EVM: the address. BTC: the BIP-86 account xpub. */
|
|
223
|
+
export declare const ApiMemberKeySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
224
|
+
chain: z.ZodEnum<{
|
|
225
|
+
ETHEREUM: "ETHEREUM";
|
|
226
|
+
BASE: "BASE";
|
|
227
|
+
ARBITRUM: "ARBITRUM";
|
|
228
|
+
ROBINHOOD: "ROBINHOOD";
|
|
229
|
+
}>;
|
|
230
|
+
pubKey: z.ZodString;
|
|
231
|
+
signerType: z.ZodEnum<{
|
|
232
|
+
EMBEDDED: "EMBEDDED";
|
|
233
|
+
LEDGER: "LEDGER";
|
|
234
|
+
EXTERNAL: "EXTERNAL";
|
|
235
|
+
}>;
|
|
236
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
+
chain: z.ZodLiteral<"BTC">;
|
|
238
|
+
pubKey: z.ZodString;
|
|
239
|
+
signerType: z.ZodEnum<{
|
|
240
|
+
EMBEDDED: "EMBEDDED";
|
|
241
|
+
LEDGER: "LEDGER";
|
|
242
|
+
EXTERNAL: "EXTERNAL";
|
|
243
|
+
}>;
|
|
244
|
+
}, z.core.$strip>], "chain">;
|
|
245
|
+
export type ApiMemberKey = z.infer<typeof ApiMemberKeySchema>;
|
|
246
|
+
export declare const ApiMeSchema: z.ZodObject<{
|
|
247
|
+
id: z.ZodUUID;
|
|
248
|
+
email: z.ZodEmail;
|
|
249
|
+
name: z.ZodNullable<z.ZodString>;
|
|
250
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
251
|
+
read: "read";
|
|
252
|
+
propose: "propose";
|
|
253
|
+
sign: "sign";
|
|
254
|
+
}>>;
|
|
255
|
+
memberships: z.ZodArray<z.ZodObject<{
|
|
256
|
+
cofund: z.ZodObject<{
|
|
257
|
+
id: z.ZodUUID;
|
|
258
|
+
name: z.ZodString;
|
|
259
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
isAdmin: z.ZodBoolean;
|
|
262
|
+
position: z.ZodNullable<z.ZodString>;
|
|
263
|
+
keys: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
264
|
+
chain: z.ZodEnum<{
|
|
265
|
+
ETHEREUM: "ETHEREUM";
|
|
266
|
+
BASE: "BASE";
|
|
267
|
+
ARBITRUM: "ARBITRUM";
|
|
268
|
+
ROBINHOOD: "ROBINHOOD";
|
|
269
|
+
}>;
|
|
270
|
+
pubKey: z.ZodString;
|
|
271
|
+
signerType: z.ZodEnum<{
|
|
272
|
+
EMBEDDED: "EMBEDDED";
|
|
273
|
+
LEDGER: "LEDGER";
|
|
274
|
+
EXTERNAL: "EXTERNAL";
|
|
275
|
+
}>;
|
|
276
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
277
|
+
chain: z.ZodLiteral<"BTC">;
|
|
278
|
+
pubKey: z.ZodString;
|
|
279
|
+
signerType: z.ZodEnum<{
|
|
280
|
+
EMBEDDED: "EMBEDDED";
|
|
281
|
+
LEDGER: "LEDGER";
|
|
282
|
+
EXTERNAL: "EXTERNAL";
|
|
283
|
+
}>;
|
|
284
|
+
}, z.core.$strip>], "chain">>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export type ApiMe = z.infer<typeof ApiMeSchema>;
|
|
288
|
+
/**
|
|
289
|
+
* A pending invitation into one cofund. Each EVM chain carries the
|
|
290
|
+
* `InviteUser` the admin signed; the invitee signs the same message with their
|
|
291
|
+
* own key. The domain is the server's view, which a client compares with the
|
|
292
|
+
* one it pinned and never signs under.
|
|
293
|
+
*/
|
|
294
|
+
export declare const ApiInviteSchema: z.ZodObject<{
|
|
295
|
+
id: z.ZodUUID;
|
|
296
|
+
cofund: z.ZodObject<{
|
|
297
|
+
id: z.ZodUUID;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
chains: z.ZodArray<z.ZodObject<{
|
|
302
|
+
chain: z.ZodEnum<{
|
|
303
|
+
ETHEREUM: "ETHEREUM";
|
|
304
|
+
BASE: "BASE";
|
|
305
|
+
ARBITRUM: "ARBITRUM";
|
|
306
|
+
ROBINHOOD: "ROBINHOOD";
|
|
307
|
+
}>;
|
|
308
|
+
domain: z.ZodObject<{
|
|
309
|
+
name: z.ZodLiteral<"Cofund">;
|
|
310
|
+
version: z.ZodLiteral<"1">;
|
|
311
|
+
chainId: z.ZodNumber;
|
|
312
|
+
verifyingContract: z.ZodString;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
message: z.ZodObject<{
|
|
315
|
+
company: z.ZodString;
|
|
316
|
+
callerId: z.ZodUUID;
|
|
317
|
+
userId: z.ZodUUID;
|
|
318
|
+
userIsAdmin: z.ZodBoolean;
|
|
319
|
+
userPosition: z.ZodString;
|
|
320
|
+
expiresAt: z.ZodString;
|
|
321
|
+
authId: z.ZodUUID;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
export type ApiInvite = z.infer<typeof ApiInviteSchema>;
|
|
326
|
+
export declare const AcceptInviteResultSchema: z.ZodObject<{
|
|
327
|
+
results: z.ZodArray<z.ZodObject<{
|
|
328
|
+
chain: z.ZodEnum<{
|
|
329
|
+
ETHEREUM: "ETHEREUM";
|
|
330
|
+
BASE: "BASE";
|
|
331
|
+
ARBITRUM: "ARBITRUM";
|
|
332
|
+
ROBINHOOD: "ROBINHOOD";
|
|
333
|
+
BTC: "BTC";
|
|
334
|
+
}>;
|
|
335
|
+
success: z.ZodBoolean;
|
|
336
|
+
transactionId: z.ZodOptional<z.ZodUUID>;
|
|
337
|
+
error: z.ZodOptional<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
summary: z.ZodObject<{
|
|
340
|
+
total: z.ZodNumber;
|
|
341
|
+
successful: z.ZodNumber;
|
|
342
|
+
failed: z.ZodNumber;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
export type AcceptInviteResult = z.infer<typeof AcceptInviteResultSchema>;
|
|
346
|
+
export declare const ApiTokenSchema: z.ZodObject<{
|
|
347
|
+
address: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"BTC">]>;
|
|
348
|
+
symbol: z.ZodString;
|
|
349
|
+
decimals: z.ZodNumber;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
export type ApiToken = z.infer<typeof ApiTokenSchema>;
|
|
352
|
+
/** EVM: the vault contract. BTC: the vault's taproot address. */
|
|
353
|
+
export declare const ApiVaultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
354
|
+
id: z.ZodUUID;
|
|
355
|
+
chain: z.ZodEnum<{
|
|
356
|
+
ETHEREUM: "ETHEREUM";
|
|
357
|
+
BASE: "BASE";
|
|
358
|
+
ARBITRUM: "ARBITRUM";
|
|
359
|
+
ROBINHOOD: "ROBINHOOD";
|
|
360
|
+
}>;
|
|
361
|
+
address: z.ZodString;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
id: z.ZodUUID;
|
|
364
|
+
chain: z.ZodLiteral<"BTC">;
|
|
365
|
+
address: z.ZodString;
|
|
366
|
+
}, z.core.$strip>], "chain">;
|
|
367
|
+
export type ApiVault = z.infer<typeof ApiVaultSchema>;
|
|
368
|
+
export declare const ApiVaultDetailSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
369
|
+
id: z.ZodUUID;
|
|
370
|
+
chain: z.ZodEnum<{
|
|
371
|
+
ETHEREUM: "ETHEREUM";
|
|
372
|
+
BASE: "BASE";
|
|
373
|
+
ARBITRUM: "ARBITRUM";
|
|
374
|
+
ROBINHOOD: "ROBINHOOD";
|
|
375
|
+
}>;
|
|
376
|
+
address: z.ZodString;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
id: z.ZodUUID;
|
|
379
|
+
chain: z.ZodLiteral<"BTC">;
|
|
380
|
+
address: z.ZodString;
|
|
381
|
+
}, z.core.$strip>], "chain">, z.ZodObject<{
|
|
382
|
+
balances: z.ZodArray<z.ZodObject<{
|
|
383
|
+
token: z.ZodObject<{
|
|
384
|
+
address: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"BTC">]>;
|
|
385
|
+
symbol: z.ZodString;
|
|
386
|
+
decimals: z.ZodNumber;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
amount: z.ZodString;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
stale: z.ZodBoolean;
|
|
391
|
+
}, z.core.$strip>>;
|
|
392
|
+
export type ApiVaultDetail = z.infer<typeof ApiVaultDetailSchema>;
|
|
393
|
+
/** A policy: who must agree, how many, within what bounds. */
|
|
394
|
+
export declare const ApiPolicySchema: z.ZodObject<{
|
|
395
|
+
id: z.ZodUUID;
|
|
396
|
+
name: z.ZodString;
|
|
397
|
+
type: z.ZodEnum<{
|
|
398
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
399
|
+
Operational_Expense: "Operational_Expense";
|
|
400
|
+
Treasury_Management: "Treasury_Management";
|
|
401
|
+
}>;
|
|
402
|
+
status: z.ZodEnum<{
|
|
403
|
+
PENDING: "PENDING";
|
|
404
|
+
ACTIVE: "ACTIVE";
|
|
405
|
+
INACTIVE: "INACTIVE";
|
|
406
|
+
FAILED: "FAILED";
|
|
407
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
408
|
+
}>;
|
|
409
|
+
threshold: z.ZodNumber;
|
|
410
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
411
|
+
id: z.ZodUUID;
|
|
412
|
+
chain: z.ZodEnum<{
|
|
413
|
+
ETHEREUM: "ETHEREUM";
|
|
414
|
+
BASE: "BASE";
|
|
415
|
+
ARBITRUM: "ARBITRUM";
|
|
416
|
+
ROBINHOOD: "ROBINHOOD";
|
|
417
|
+
}>;
|
|
418
|
+
address: z.ZodString;
|
|
419
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
420
|
+
id: z.ZodUUID;
|
|
421
|
+
chain: z.ZodLiteral<"BTC">;
|
|
422
|
+
address: z.ZodString;
|
|
423
|
+
}, z.core.$strip>], "chain">;
|
|
424
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
425
|
+
id: z.ZodUUID;
|
|
426
|
+
name: z.ZodNullable<z.ZodString>;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
429
|
+
address: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"BTC">]>;
|
|
430
|
+
symbol: z.ZodString;
|
|
431
|
+
decimals: z.ZodNumber;
|
|
432
|
+
}, z.core.$strip>>;
|
|
433
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
434
|
+
recipients: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
435
|
+
wrapper: z.ZodNullable<z.ZodString>;
|
|
436
|
+
func: z.ZodNullable<z.ZodLiteral<"entry">>;
|
|
437
|
+
}, z.core.$strip>;
|
|
438
|
+
export type ApiPolicy = z.infer<typeof ApiPolicySchema>;
|
|
439
|
+
export declare const ApiMemberSchema: z.ZodObject<{
|
|
440
|
+
id: z.ZodUUID;
|
|
441
|
+
onchainId: z.ZodUUID;
|
|
442
|
+
email: z.ZodEmail;
|
|
443
|
+
name: z.ZodNullable<z.ZodString>;
|
|
444
|
+
isAdmin: z.ZodBoolean;
|
|
445
|
+
position: z.ZodNullable<z.ZodString>;
|
|
446
|
+
joinedAt: z.ZodISODateTime;
|
|
447
|
+
keys: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
448
|
+
chain: z.ZodEnum<{
|
|
449
|
+
ETHEREUM: "ETHEREUM";
|
|
450
|
+
BASE: "BASE";
|
|
451
|
+
ARBITRUM: "ARBITRUM";
|
|
452
|
+
ROBINHOOD: "ROBINHOOD";
|
|
453
|
+
}>;
|
|
454
|
+
pubKey: z.ZodString;
|
|
455
|
+
signerType: z.ZodEnum<{
|
|
456
|
+
EMBEDDED: "EMBEDDED";
|
|
457
|
+
LEDGER: "LEDGER";
|
|
458
|
+
EXTERNAL: "EXTERNAL";
|
|
459
|
+
}>;
|
|
460
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
461
|
+
chain: z.ZodLiteral<"BTC">;
|
|
462
|
+
pubKey: z.ZodString;
|
|
463
|
+
signerType: z.ZodEnum<{
|
|
464
|
+
EMBEDDED: "EMBEDDED";
|
|
465
|
+
LEDGER: "LEDGER";
|
|
466
|
+
EXTERNAL: "EXTERNAL";
|
|
467
|
+
}>;
|
|
468
|
+
}, z.core.$strip>], "chain">>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
export type ApiMember = z.infer<typeof ApiMemberSchema>;
|
|
471
|
+
export declare const ApiTransferRequestSchema: z.ZodObject<{
|
|
472
|
+
id: z.ZodUUID;
|
|
473
|
+
cofundId: z.ZodUUID;
|
|
474
|
+
chain: z.ZodEnum<{
|
|
475
|
+
ETHEREUM: "ETHEREUM";
|
|
476
|
+
BASE: "BASE";
|
|
477
|
+
ARBITRUM: "ARBITRUM";
|
|
478
|
+
ROBINHOOD: "ROBINHOOD";
|
|
479
|
+
}>;
|
|
480
|
+
name: z.ZodNullable<z.ZodString>;
|
|
481
|
+
status: z.ZodEnum<{
|
|
482
|
+
PENDING: "PENDING";
|
|
483
|
+
FAILED: "FAILED";
|
|
484
|
+
DRAFT: "DRAFT";
|
|
485
|
+
COMPLETED: "COMPLETED";
|
|
486
|
+
OVERDUE: "OVERDUE";
|
|
487
|
+
}>;
|
|
488
|
+
createdAt: z.ZodISODateTime;
|
|
489
|
+
creator: z.ZodObject<{
|
|
490
|
+
id: z.ZodUUID;
|
|
491
|
+
name: z.ZodNullable<z.ZodString>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
policy: z.ZodObject<{
|
|
494
|
+
id: z.ZodUUID;
|
|
495
|
+
name: z.ZodString;
|
|
496
|
+
type: z.ZodEnum<{
|
|
497
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
498
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
499
|
+
Business_Invoice: "Business_Invoice";
|
|
500
|
+
Operational_Expense: "Operational_Expense";
|
|
501
|
+
Treasury_Management: "Treasury_Management";
|
|
502
|
+
}>;
|
|
503
|
+
threshold: z.ZodNumber;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
vault: z.ZodObject<{
|
|
506
|
+
id: z.ZodUUID;
|
|
507
|
+
address: z.ZodString;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
510
|
+
awaitingMe: z.ZodBoolean;
|
|
511
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
512
|
+
hash: z.ZodString;
|
|
513
|
+
status: z.ZodEnum<{
|
|
514
|
+
FAILED: "FAILED";
|
|
515
|
+
PENDING_CREATION: "PENDING_CREATION";
|
|
516
|
+
PENDING_CONFIRMATION: "PENDING_CONFIRMATION";
|
|
517
|
+
SUCCESS: "SUCCESS";
|
|
518
|
+
}>;
|
|
519
|
+
}, z.core.$strip>>;
|
|
520
|
+
domain: z.ZodObject<{
|
|
521
|
+
name: z.ZodLiteral<"Cofund">;
|
|
522
|
+
version: z.ZodLiteral<"1">;
|
|
523
|
+
chainId: z.ZodNumber;
|
|
524
|
+
verifyingContract: z.ZodString;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
527
|
+
name: z.ZodString;
|
|
528
|
+
type: z.ZodString;
|
|
529
|
+
}, z.core.$strip>>>;
|
|
530
|
+
kind: z.ZodLiteral<"transfer">;
|
|
531
|
+
amount: z.ZodString;
|
|
532
|
+
token: z.ZodObject<{
|
|
533
|
+
symbol: z.ZodString;
|
|
534
|
+
decimals: z.ZodNumber;
|
|
535
|
+
address: z.ZodString;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
recipient: z.ZodString;
|
|
538
|
+
message: z.ZodObject<{
|
|
539
|
+
company: z.ZodString;
|
|
540
|
+
policyId: z.ZodUUID;
|
|
541
|
+
messageType: z.ZodEnum<{
|
|
542
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
543
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
544
|
+
Business_Invoice: "Business_Invoice";
|
|
545
|
+
Operational_Expense: "Operational_Expense";
|
|
546
|
+
Treasury_Management: "Treasury_Management";
|
|
547
|
+
}>;
|
|
548
|
+
amount: z.ZodString;
|
|
549
|
+
token: z.ZodString;
|
|
550
|
+
recipient: z.ZodString;
|
|
551
|
+
authId: z.ZodUUID;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
}, z.core.$strip>;
|
|
554
|
+
export type ApiTransferRequest = z.infer<typeof ApiTransferRequestSchema>;
|
|
555
|
+
export declare const ApiCallRequestSchema: z.ZodObject<{
|
|
556
|
+
id: z.ZodUUID;
|
|
557
|
+
cofundId: z.ZodUUID;
|
|
558
|
+
chain: z.ZodEnum<{
|
|
559
|
+
ETHEREUM: "ETHEREUM";
|
|
560
|
+
BASE: "BASE";
|
|
561
|
+
ARBITRUM: "ARBITRUM";
|
|
562
|
+
ROBINHOOD: "ROBINHOOD";
|
|
563
|
+
}>;
|
|
564
|
+
name: z.ZodNullable<z.ZodString>;
|
|
565
|
+
status: z.ZodEnum<{
|
|
566
|
+
PENDING: "PENDING";
|
|
567
|
+
FAILED: "FAILED";
|
|
568
|
+
DRAFT: "DRAFT";
|
|
569
|
+
COMPLETED: "COMPLETED";
|
|
570
|
+
OVERDUE: "OVERDUE";
|
|
571
|
+
}>;
|
|
572
|
+
createdAt: z.ZodISODateTime;
|
|
573
|
+
creator: z.ZodObject<{
|
|
574
|
+
id: z.ZodUUID;
|
|
575
|
+
name: z.ZodNullable<z.ZodString>;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
|
+
policy: z.ZodObject<{
|
|
578
|
+
id: z.ZodUUID;
|
|
579
|
+
name: z.ZodString;
|
|
580
|
+
type: z.ZodEnum<{
|
|
581
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
582
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
583
|
+
Business_Invoice: "Business_Invoice";
|
|
584
|
+
Operational_Expense: "Operational_Expense";
|
|
585
|
+
Treasury_Management: "Treasury_Management";
|
|
586
|
+
}>;
|
|
587
|
+
threshold: z.ZodNumber;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
vault: z.ZodObject<{
|
|
590
|
+
id: z.ZodUUID;
|
|
591
|
+
address: z.ZodString;
|
|
592
|
+
}, z.core.$strip>;
|
|
593
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
594
|
+
awaitingMe: z.ZodBoolean;
|
|
595
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
596
|
+
hash: z.ZodString;
|
|
597
|
+
status: z.ZodEnum<{
|
|
598
|
+
FAILED: "FAILED";
|
|
599
|
+
PENDING_CREATION: "PENDING_CREATION";
|
|
600
|
+
PENDING_CONFIRMATION: "PENDING_CONFIRMATION";
|
|
601
|
+
SUCCESS: "SUCCESS";
|
|
602
|
+
}>;
|
|
603
|
+
}, z.core.$strip>>;
|
|
604
|
+
domain: z.ZodObject<{
|
|
605
|
+
name: z.ZodLiteral<"Cofund">;
|
|
606
|
+
version: z.ZodLiteral<"1">;
|
|
607
|
+
chainId: z.ZodNumber;
|
|
608
|
+
verifyingContract: z.ZodString;
|
|
609
|
+
}, z.core.$strip>;
|
|
610
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
611
|
+
name: z.ZodString;
|
|
612
|
+
type: z.ZodString;
|
|
613
|
+
}, z.core.$strip>>>;
|
|
614
|
+
kind: z.ZodLiteral<"call">;
|
|
615
|
+
wrapper: z.ZodString;
|
|
616
|
+
func: z.ZodLiteral<"entry">;
|
|
617
|
+
instructions: z.ZodString;
|
|
618
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
619
|
+
asset: z.ZodString;
|
|
620
|
+
amount: z.ZodString;
|
|
621
|
+
}, z.core.$strip>>;
|
|
622
|
+
message: z.ZodObject<{
|
|
623
|
+
company: z.ZodString;
|
|
624
|
+
policyId: z.ZodUUID;
|
|
625
|
+
messageType: z.ZodEnum<{
|
|
626
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
627
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
628
|
+
Business_Invoice: "Business_Invoice";
|
|
629
|
+
Operational_Expense: "Operational_Expense";
|
|
630
|
+
Treasury_Management: "Treasury_Management";
|
|
631
|
+
}>;
|
|
632
|
+
wrapper: z.ZodString;
|
|
633
|
+
func: z.ZodLiteral<"entry">;
|
|
634
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
635
|
+
asset: z.ZodString;
|
|
636
|
+
amount: z.ZodString;
|
|
637
|
+
}, z.core.$strip>>;
|
|
638
|
+
instructionsHash: z.ZodString;
|
|
639
|
+
authId: z.ZodUUID;
|
|
640
|
+
}, z.core.$strip>;
|
|
641
|
+
}, z.core.$strip>;
|
|
642
|
+
export type ApiCallRequest = z.infer<typeof ApiCallRequestSchema>;
|
|
643
|
+
/** EVM: `TransferPolicyActivation` or `TransactionPolicyActivation`, by `wrapper`. */
|
|
644
|
+
export declare const ApiEvmPolicyRequestSchema: z.ZodObject<{
|
|
645
|
+
chain: z.ZodEnum<{
|
|
646
|
+
ETHEREUM: "ETHEREUM";
|
|
647
|
+
BASE: "BASE";
|
|
648
|
+
ARBITRUM: "ARBITRUM";
|
|
649
|
+
ROBINHOOD: "ROBINHOOD";
|
|
650
|
+
}>;
|
|
651
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
652
|
+
symbol: z.ZodString;
|
|
653
|
+
decimals: z.ZodNumber;
|
|
654
|
+
address: z.ZodString;
|
|
655
|
+
}, z.core.$strip>>;
|
|
656
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
657
|
+
wrapper: z.ZodNullable<z.ZodString>;
|
|
658
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
659
|
+
id: z.ZodUUID;
|
|
660
|
+
name: z.ZodNullable<z.ZodString>;
|
|
661
|
+
onchainId: z.ZodUUID;
|
|
662
|
+
}, z.core.$strip>>;
|
|
663
|
+
domain: z.ZodObject<{
|
|
664
|
+
name: z.ZodLiteral<"Cofund">;
|
|
665
|
+
version: z.ZodLiteral<"1">;
|
|
666
|
+
chainId: z.ZodNumber;
|
|
667
|
+
verifyingContract: z.ZodString;
|
|
668
|
+
}, z.core.$strip>;
|
|
669
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
670
|
+
name: z.ZodString;
|
|
671
|
+
type: z.ZodString;
|
|
672
|
+
}, z.core.$strip>>>;
|
|
673
|
+
message: z.ZodUnion<readonly [z.ZodObject<{
|
|
674
|
+
token: z.ZodString;
|
|
675
|
+
maxAmount: z.ZodString;
|
|
676
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
677
|
+
company: z.ZodString;
|
|
678
|
+
policyId: z.ZodUUID;
|
|
679
|
+
title: z.ZodString;
|
|
680
|
+
policyType: z.ZodEnum<{
|
|
681
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
682
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
683
|
+
Business_Invoice: "Business_Invoice";
|
|
684
|
+
Operational_Expense: "Operational_Expense";
|
|
685
|
+
Treasury_Management: "Treasury_Management";
|
|
686
|
+
}>;
|
|
687
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
688
|
+
threshold: z.ZodString;
|
|
689
|
+
authId: z.ZodUUID;
|
|
690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
691
|
+
wrapper: z.ZodString;
|
|
692
|
+
func: z.ZodLiteral<"entry">;
|
|
693
|
+
company: z.ZodString;
|
|
694
|
+
policyId: z.ZodUUID;
|
|
695
|
+
title: z.ZodString;
|
|
696
|
+
policyType: z.ZodEnum<{
|
|
697
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
698
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
699
|
+
Business_Invoice: "Business_Invoice";
|
|
700
|
+
Operational_Expense: "Operational_Expense";
|
|
701
|
+
Treasury_Management: "Treasury_Management";
|
|
702
|
+
}>;
|
|
703
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
704
|
+
threshold: z.ZodString;
|
|
705
|
+
authId: z.ZodUUID;
|
|
706
|
+
}, z.core.$strip>]>;
|
|
707
|
+
kind: z.ZodLiteral<"policy">;
|
|
708
|
+
id: z.ZodUUID;
|
|
709
|
+
cofundId: z.ZodUUID;
|
|
710
|
+
name: z.ZodString;
|
|
711
|
+
type: z.ZodEnum<{
|
|
712
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
713
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
714
|
+
Business_Invoice: "Business_Invoice";
|
|
715
|
+
Operational_Expense: "Operational_Expense";
|
|
716
|
+
Treasury_Management: "Treasury_Management";
|
|
717
|
+
}>;
|
|
718
|
+
status: z.ZodEnum<{
|
|
719
|
+
PENDING: "PENDING";
|
|
720
|
+
ACTIVE: "ACTIVE";
|
|
721
|
+
INACTIVE: "INACTIVE";
|
|
722
|
+
FAILED: "FAILED";
|
|
723
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
724
|
+
}>;
|
|
725
|
+
createdAt: z.ZodISODateTime;
|
|
726
|
+
threshold: z.ZodNumber;
|
|
727
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
728
|
+
id: z.ZodUUID;
|
|
729
|
+
chain: z.ZodEnum<{
|
|
730
|
+
ETHEREUM: "ETHEREUM";
|
|
731
|
+
BASE: "BASE";
|
|
732
|
+
ARBITRUM: "ARBITRUM";
|
|
733
|
+
ROBINHOOD: "ROBINHOOD";
|
|
734
|
+
}>;
|
|
735
|
+
address: z.ZodString;
|
|
736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
737
|
+
id: z.ZodUUID;
|
|
738
|
+
chain: z.ZodLiteral<"BTC">;
|
|
739
|
+
address: z.ZodString;
|
|
740
|
+
}, z.core.$strip>], "chain">;
|
|
741
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
742
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
743
|
+
awaitingMe: z.ZodBoolean;
|
|
744
|
+
}, z.core.$strip>;
|
|
745
|
+
export type ApiEvmPolicyRequest = z.infer<typeof ApiEvmPolicyRequestSchema>;
|
|
746
|
+
/**
|
|
747
|
+
* BTC: the hex digest of the activation (`btc-policy-activation.ts`), signed
|
|
748
|
+
* as a Bitcoin Signed Message by the admin's Cofund leaf key.
|
|
749
|
+
*/
|
|
750
|
+
export declare const ApiBtcPolicyRequestSchema: z.ZodObject<{
|
|
751
|
+
chain: z.ZodLiteral<"BTC">;
|
|
752
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
753
|
+
symbol: z.ZodString;
|
|
754
|
+
decimals: z.ZodNumber;
|
|
755
|
+
address: z.ZodLiteral<"BTC">;
|
|
756
|
+
}, z.core.$strip>>;
|
|
757
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
758
|
+
wrapper: z.ZodNull;
|
|
759
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
760
|
+
id: z.ZodUUID;
|
|
761
|
+
name: z.ZodNullable<z.ZodString>;
|
|
762
|
+
key: z.ZodString;
|
|
763
|
+
}, z.core.$strip>>;
|
|
764
|
+
message: z.ZodString;
|
|
765
|
+
kind: z.ZodLiteral<"policy">;
|
|
766
|
+
id: z.ZodUUID;
|
|
767
|
+
cofundId: z.ZodUUID;
|
|
768
|
+
name: z.ZodString;
|
|
769
|
+
type: z.ZodEnum<{
|
|
770
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
771
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
772
|
+
Business_Invoice: "Business_Invoice";
|
|
773
|
+
Operational_Expense: "Operational_Expense";
|
|
774
|
+
Treasury_Management: "Treasury_Management";
|
|
775
|
+
}>;
|
|
776
|
+
status: z.ZodEnum<{
|
|
777
|
+
PENDING: "PENDING";
|
|
778
|
+
ACTIVE: "ACTIVE";
|
|
779
|
+
INACTIVE: "INACTIVE";
|
|
780
|
+
FAILED: "FAILED";
|
|
781
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
782
|
+
}>;
|
|
783
|
+
createdAt: z.ZodISODateTime;
|
|
784
|
+
threshold: z.ZodNumber;
|
|
785
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
786
|
+
id: z.ZodUUID;
|
|
787
|
+
chain: z.ZodEnum<{
|
|
788
|
+
ETHEREUM: "ETHEREUM";
|
|
789
|
+
BASE: "BASE";
|
|
790
|
+
ARBITRUM: "ARBITRUM";
|
|
791
|
+
ROBINHOOD: "ROBINHOOD";
|
|
792
|
+
}>;
|
|
793
|
+
address: z.ZodString;
|
|
794
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
+
id: z.ZodUUID;
|
|
796
|
+
chain: z.ZodLiteral<"BTC">;
|
|
797
|
+
address: z.ZodString;
|
|
798
|
+
}, z.core.$strip>], "chain">;
|
|
799
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
800
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
801
|
+
awaitingMe: z.ZodBoolean;
|
|
802
|
+
}, z.core.$strip>;
|
|
803
|
+
export type ApiBtcPolicyRequest = z.infer<typeof ApiBtcPolicyRequestSchema>;
|
|
804
|
+
export declare const ApiPolicyRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
805
|
+
chain: z.ZodEnum<{
|
|
806
|
+
ETHEREUM: "ETHEREUM";
|
|
807
|
+
BASE: "BASE";
|
|
808
|
+
ARBITRUM: "ARBITRUM";
|
|
809
|
+
ROBINHOOD: "ROBINHOOD";
|
|
810
|
+
}>;
|
|
811
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
812
|
+
symbol: z.ZodString;
|
|
813
|
+
decimals: z.ZodNumber;
|
|
814
|
+
address: z.ZodString;
|
|
815
|
+
}, z.core.$strip>>;
|
|
816
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
817
|
+
wrapper: z.ZodNullable<z.ZodString>;
|
|
818
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
819
|
+
id: z.ZodUUID;
|
|
820
|
+
name: z.ZodNullable<z.ZodString>;
|
|
821
|
+
onchainId: z.ZodUUID;
|
|
822
|
+
}, z.core.$strip>>;
|
|
823
|
+
domain: z.ZodObject<{
|
|
824
|
+
name: z.ZodLiteral<"Cofund">;
|
|
825
|
+
version: z.ZodLiteral<"1">;
|
|
826
|
+
chainId: z.ZodNumber;
|
|
827
|
+
verifyingContract: z.ZodString;
|
|
828
|
+
}, z.core.$strip>;
|
|
829
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
830
|
+
name: z.ZodString;
|
|
831
|
+
type: z.ZodString;
|
|
832
|
+
}, z.core.$strip>>>;
|
|
833
|
+
message: z.ZodUnion<readonly [z.ZodObject<{
|
|
834
|
+
token: z.ZodString;
|
|
835
|
+
maxAmount: z.ZodString;
|
|
836
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
837
|
+
company: z.ZodString;
|
|
838
|
+
policyId: z.ZodUUID;
|
|
839
|
+
title: z.ZodString;
|
|
840
|
+
policyType: z.ZodEnum<{
|
|
841
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
842
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
843
|
+
Business_Invoice: "Business_Invoice";
|
|
844
|
+
Operational_Expense: "Operational_Expense";
|
|
845
|
+
Treasury_Management: "Treasury_Management";
|
|
846
|
+
}>;
|
|
847
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
848
|
+
threshold: z.ZodString;
|
|
849
|
+
authId: z.ZodUUID;
|
|
850
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
851
|
+
wrapper: z.ZodString;
|
|
852
|
+
func: z.ZodLiteral<"entry">;
|
|
853
|
+
company: z.ZodString;
|
|
854
|
+
policyId: z.ZodUUID;
|
|
855
|
+
title: z.ZodString;
|
|
856
|
+
policyType: z.ZodEnum<{
|
|
857
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
858
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
859
|
+
Business_Invoice: "Business_Invoice";
|
|
860
|
+
Operational_Expense: "Operational_Expense";
|
|
861
|
+
Treasury_Management: "Treasury_Management";
|
|
862
|
+
}>;
|
|
863
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
864
|
+
threshold: z.ZodString;
|
|
865
|
+
authId: z.ZodUUID;
|
|
866
|
+
}, z.core.$strip>]>;
|
|
867
|
+
kind: z.ZodLiteral<"policy">;
|
|
868
|
+
id: z.ZodUUID;
|
|
869
|
+
cofundId: z.ZodUUID;
|
|
870
|
+
name: z.ZodString;
|
|
871
|
+
type: z.ZodEnum<{
|
|
872
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
873
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
874
|
+
Business_Invoice: "Business_Invoice";
|
|
875
|
+
Operational_Expense: "Operational_Expense";
|
|
876
|
+
Treasury_Management: "Treasury_Management";
|
|
877
|
+
}>;
|
|
878
|
+
status: z.ZodEnum<{
|
|
879
|
+
PENDING: "PENDING";
|
|
880
|
+
ACTIVE: "ACTIVE";
|
|
881
|
+
INACTIVE: "INACTIVE";
|
|
882
|
+
FAILED: "FAILED";
|
|
883
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
884
|
+
}>;
|
|
885
|
+
createdAt: z.ZodISODateTime;
|
|
886
|
+
threshold: z.ZodNumber;
|
|
887
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
888
|
+
id: z.ZodUUID;
|
|
889
|
+
chain: z.ZodEnum<{
|
|
890
|
+
ETHEREUM: "ETHEREUM";
|
|
891
|
+
BASE: "BASE";
|
|
892
|
+
ARBITRUM: "ARBITRUM";
|
|
893
|
+
ROBINHOOD: "ROBINHOOD";
|
|
894
|
+
}>;
|
|
895
|
+
address: z.ZodString;
|
|
896
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
897
|
+
id: z.ZodUUID;
|
|
898
|
+
chain: z.ZodLiteral<"BTC">;
|
|
899
|
+
address: z.ZodString;
|
|
900
|
+
}, z.core.$strip>], "chain">;
|
|
901
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
902
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
903
|
+
awaitingMe: z.ZodBoolean;
|
|
904
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
905
|
+
chain: z.ZodLiteral<"BTC">;
|
|
906
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
907
|
+
symbol: z.ZodString;
|
|
908
|
+
decimals: z.ZodNumber;
|
|
909
|
+
address: z.ZodLiteral<"BTC">;
|
|
910
|
+
}, z.core.$strip>>;
|
|
911
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
912
|
+
wrapper: z.ZodNull;
|
|
913
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
914
|
+
id: z.ZodUUID;
|
|
915
|
+
name: z.ZodNullable<z.ZodString>;
|
|
916
|
+
key: z.ZodString;
|
|
917
|
+
}, z.core.$strip>>;
|
|
918
|
+
message: z.ZodString;
|
|
919
|
+
kind: z.ZodLiteral<"policy">;
|
|
920
|
+
id: z.ZodUUID;
|
|
921
|
+
cofundId: z.ZodUUID;
|
|
922
|
+
name: z.ZodString;
|
|
923
|
+
type: z.ZodEnum<{
|
|
924
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
925
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
926
|
+
Business_Invoice: "Business_Invoice";
|
|
927
|
+
Operational_Expense: "Operational_Expense";
|
|
928
|
+
Treasury_Management: "Treasury_Management";
|
|
929
|
+
}>;
|
|
930
|
+
status: z.ZodEnum<{
|
|
931
|
+
PENDING: "PENDING";
|
|
932
|
+
ACTIVE: "ACTIVE";
|
|
933
|
+
INACTIVE: "INACTIVE";
|
|
934
|
+
FAILED: "FAILED";
|
|
935
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
936
|
+
}>;
|
|
937
|
+
createdAt: z.ZodISODateTime;
|
|
938
|
+
threshold: z.ZodNumber;
|
|
939
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
940
|
+
id: z.ZodUUID;
|
|
941
|
+
chain: z.ZodEnum<{
|
|
942
|
+
ETHEREUM: "ETHEREUM";
|
|
943
|
+
BASE: "BASE";
|
|
944
|
+
ARBITRUM: "ARBITRUM";
|
|
945
|
+
ROBINHOOD: "ROBINHOOD";
|
|
946
|
+
}>;
|
|
947
|
+
address: z.ZodString;
|
|
948
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
949
|
+
id: z.ZodUUID;
|
|
950
|
+
chain: z.ZodLiteral<"BTC">;
|
|
951
|
+
address: z.ZodString;
|
|
952
|
+
}, z.core.$strip>], "chain">;
|
|
953
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
954
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
955
|
+
awaitingMe: z.ZodBoolean;
|
|
956
|
+
}, z.core.$strip>], "chain">;
|
|
957
|
+
export type ApiPolicyRequest = z.infer<typeof ApiPolicyRequestSchema>;
|
|
958
|
+
/**
|
|
959
|
+
* An admin invite awaiting co-signatures on one chain: the admins co-sign the
|
|
960
|
+
* `InviteUser` the inviter signed.
|
|
961
|
+
*/
|
|
962
|
+
export declare const ApiInviteRequestSchema: z.ZodObject<{
|
|
963
|
+
kind: z.ZodLiteral<"invite">;
|
|
964
|
+
id: z.ZodUUID;
|
|
965
|
+
cofundId: z.ZodUUID;
|
|
966
|
+
chain: z.ZodEnum<{
|
|
967
|
+
ETHEREUM: "ETHEREUM";
|
|
968
|
+
BASE: "BASE";
|
|
969
|
+
ARBITRUM: "ARBITRUM";
|
|
970
|
+
ROBINHOOD: "ROBINHOOD";
|
|
971
|
+
}>;
|
|
972
|
+
status: z.ZodEnum<{
|
|
973
|
+
FAILED: "FAILED";
|
|
974
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
975
|
+
COMPLETED: "COMPLETED";
|
|
976
|
+
AWAITING_SUBMISSION: "AWAITING_SUBMISSION";
|
|
977
|
+
PROCESSING: "PROCESSING";
|
|
978
|
+
EXPIRED: "EXPIRED";
|
|
979
|
+
CANCELED: "CANCELED";
|
|
980
|
+
REJECTED: "REJECTED";
|
|
981
|
+
}>;
|
|
982
|
+
createdAt: z.ZodISODateTime;
|
|
983
|
+
invitedBy: z.ZodNullable<z.ZodObject<{
|
|
984
|
+
id: z.ZodUUID;
|
|
985
|
+
name: z.ZodNullable<z.ZodString>;
|
|
986
|
+
}, z.core.$strip>>;
|
|
987
|
+
recipient: z.ZodObject<{
|
|
988
|
+
id: z.ZodUUID;
|
|
989
|
+
name: z.ZodNullable<z.ZodString>;
|
|
990
|
+
email: z.ZodEmail;
|
|
991
|
+
}, z.core.$strip>;
|
|
992
|
+
seat: z.ZodObject<{
|
|
993
|
+
userId: z.ZodUUID;
|
|
994
|
+
isAdmin: z.ZodBoolean;
|
|
995
|
+
position: z.ZodString;
|
|
996
|
+
expiresAt: z.ZodString;
|
|
997
|
+
}, z.core.$strip>;
|
|
998
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
999
|
+
required: z.ZodNumber;
|
|
1000
|
+
awaitingMe: z.ZodBoolean;
|
|
1001
|
+
domain: z.ZodObject<{
|
|
1002
|
+
name: z.ZodLiteral<"Cofund">;
|
|
1003
|
+
version: z.ZodLiteral<"1">;
|
|
1004
|
+
chainId: z.ZodNumber;
|
|
1005
|
+
verifyingContract: z.ZodString;
|
|
1006
|
+
}, z.core.$strip>;
|
|
1007
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1008
|
+
name: z.ZodString;
|
|
1009
|
+
type: z.ZodString;
|
|
1010
|
+
}, z.core.$strip>>>;
|
|
1011
|
+
message: z.ZodObject<{
|
|
1012
|
+
company: z.ZodString;
|
|
1013
|
+
callerId: z.ZodUUID;
|
|
1014
|
+
userId: z.ZodUUID;
|
|
1015
|
+
userIsAdmin: z.ZodBoolean;
|
|
1016
|
+
userPosition: z.ZodString;
|
|
1017
|
+
expiresAt: z.ZodString;
|
|
1018
|
+
authId: z.ZodUUID;
|
|
1019
|
+
}, z.core.$strip>;
|
|
1020
|
+
}, z.core.$strip>;
|
|
1021
|
+
export type ApiInviteRequest = z.infer<typeof ApiInviteRequestSchema>;
|
|
1022
|
+
export declare const ApiRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1023
|
+
id: z.ZodUUID;
|
|
1024
|
+
cofundId: z.ZodUUID;
|
|
1025
|
+
chain: z.ZodEnum<{
|
|
1026
|
+
ETHEREUM: "ETHEREUM";
|
|
1027
|
+
BASE: "BASE";
|
|
1028
|
+
ARBITRUM: "ARBITRUM";
|
|
1029
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1030
|
+
}>;
|
|
1031
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1032
|
+
status: z.ZodEnum<{
|
|
1033
|
+
PENDING: "PENDING";
|
|
1034
|
+
FAILED: "FAILED";
|
|
1035
|
+
DRAFT: "DRAFT";
|
|
1036
|
+
COMPLETED: "COMPLETED";
|
|
1037
|
+
OVERDUE: "OVERDUE";
|
|
1038
|
+
}>;
|
|
1039
|
+
createdAt: z.ZodISODateTime;
|
|
1040
|
+
creator: z.ZodObject<{
|
|
1041
|
+
id: z.ZodUUID;
|
|
1042
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1043
|
+
}, z.core.$strip>;
|
|
1044
|
+
policy: z.ZodObject<{
|
|
1045
|
+
id: z.ZodUUID;
|
|
1046
|
+
name: z.ZodString;
|
|
1047
|
+
type: z.ZodEnum<{
|
|
1048
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1049
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1050
|
+
Business_Invoice: "Business_Invoice";
|
|
1051
|
+
Operational_Expense: "Operational_Expense";
|
|
1052
|
+
Treasury_Management: "Treasury_Management";
|
|
1053
|
+
}>;
|
|
1054
|
+
threshold: z.ZodNumber;
|
|
1055
|
+
}, z.core.$strip>;
|
|
1056
|
+
vault: z.ZodObject<{
|
|
1057
|
+
id: z.ZodUUID;
|
|
1058
|
+
address: z.ZodString;
|
|
1059
|
+
}, z.core.$strip>;
|
|
1060
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
1061
|
+
awaitingMe: z.ZodBoolean;
|
|
1062
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
1063
|
+
hash: z.ZodString;
|
|
1064
|
+
status: z.ZodEnum<{
|
|
1065
|
+
FAILED: "FAILED";
|
|
1066
|
+
PENDING_CREATION: "PENDING_CREATION";
|
|
1067
|
+
PENDING_CONFIRMATION: "PENDING_CONFIRMATION";
|
|
1068
|
+
SUCCESS: "SUCCESS";
|
|
1069
|
+
}>;
|
|
1070
|
+
}, z.core.$strip>>;
|
|
1071
|
+
domain: z.ZodObject<{
|
|
1072
|
+
name: z.ZodLiteral<"Cofund">;
|
|
1073
|
+
version: z.ZodLiteral<"1">;
|
|
1074
|
+
chainId: z.ZodNumber;
|
|
1075
|
+
verifyingContract: z.ZodString;
|
|
1076
|
+
}, z.core.$strip>;
|
|
1077
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1078
|
+
name: z.ZodString;
|
|
1079
|
+
type: z.ZodString;
|
|
1080
|
+
}, z.core.$strip>>>;
|
|
1081
|
+
kind: z.ZodLiteral<"transfer">;
|
|
1082
|
+
amount: z.ZodString;
|
|
1083
|
+
token: z.ZodObject<{
|
|
1084
|
+
symbol: z.ZodString;
|
|
1085
|
+
decimals: z.ZodNumber;
|
|
1086
|
+
address: z.ZodString;
|
|
1087
|
+
}, z.core.$strip>;
|
|
1088
|
+
recipient: z.ZodString;
|
|
1089
|
+
message: z.ZodObject<{
|
|
1090
|
+
company: z.ZodString;
|
|
1091
|
+
policyId: z.ZodUUID;
|
|
1092
|
+
messageType: z.ZodEnum<{
|
|
1093
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1094
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1095
|
+
Business_Invoice: "Business_Invoice";
|
|
1096
|
+
Operational_Expense: "Operational_Expense";
|
|
1097
|
+
Treasury_Management: "Treasury_Management";
|
|
1098
|
+
}>;
|
|
1099
|
+
amount: z.ZodString;
|
|
1100
|
+
token: z.ZodString;
|
|
1101
|
+
recipient: z.ZodString;
|
|
1102
|
+
authId: z.ZodUUID;
|
|
1103
|
+
}, z.core.$strip>;
|
|
1104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1105
|
+
id: z.ZodUUID;
|
|
1106
|
+
cofundId: z.ZodUUID;
|
|
1107
|
+
chain: z.ZodEnum<{
|
|
1108
|
+
ETHEREUM: "ETHEREUM";
|
|
1109
|
+
BASE: "BASE";
|
|
1110
|
+
ARBITRUM: "ARBITRUM";
|
|
1111
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1112
|
+
}>;
|
|
1113
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1114
|
+
status: z.ZodEnum<{
|
|
1115
|
+
PENDING: "PENDING";
|
|
1116
|
+
FAILED: "FAILED";
|
|
1117
|
+
DRAFT: "DRAFT";
|
|
1118
|
+
COMPLETED: "COMPLETED";
|
|
1119
|
+
OVERDUE: "OVERDUE";
|
|
1120
|
+
}>;
|
|
1121
|
+
createdAt: z.ZodISODateTime;
|
|
1122
|
+
creator: z.ZodObject<{
|
|
1123
|
+
id: z.ZodUUID;
|
|
1124
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1125
|
+
}, z.core.$strip>;
|
|
1126
|
+
policy: z.ZodObject<{
|
|
1127
|
+
id: z.ZodUUID;
|
|
1128
|
+
name: z.ZodString;
|
|
1129
|
+
type: z.ZodEnum<{
|
|
1130
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1131
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1132
|
+
Business_Invoice: "Business_Invoice";
|
|
1133
|
+
Operational_Expense: "Operational_Expense";
|
|
1134
|
+
Treasury_Management: "Treasury_Management";
|
|
1135
|
+
}>;
|
|
1136
|
+
threshold: z.ZodNumber;
|
|
1137
|
+
}, z.core.$strip>;
|
|
1138
|
+
vault: z.ZodObject<{
|
|
1139
|
+
id: z.ZodUUID;
|
|
1140
|
+
address: z.ZodString;
|
|
1141
|
+
}, z.core.$strip>;
|
|
1142
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
1143
|
+
awaitingMe: z.ZodBoolean;
|
|
1144
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
1145
|
+
hash: z.ZodString;
|
|
1146
|
+
status: z.ZodEnum<{
|
|
1147
|
+
FAILED: "FAILED";
|
|
1148
|
+
PENDING_CREATION: "PENDING_CREATION";
|
|
1149
|
+
PENDING_CONFIRMATION: "PENDING_CONFIRMATION";
|
|
1150
|
+
SUCCESS: "SUCCESS";
|
|
1151
|
+
}>;
|
|
1152
|
+
}, z.core.$strip>>;
|
|
1153
|
+
domain: z.ZodObject<{
|
|
1154
|
+
name: z.ZodLiteral<"Cofund">;
|
|
1155
|
+
version: z.ZodLiteral<"1">;
|
|
1156
|
+
chainId: z.ZodNumber;
|
|
1157
|
+
verifyingContract: z.ZodString;
|
|
1158
|
+
}, z.core.$strip>;
|
|
1159
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1160
|
+
name: z.ZodString;
|
|
1161
|
+
type: z.ZodString;
|
|
1162
|
+
}, z.core.$strip>>>;
|
|
1163
|
+
kind: z.ZodLiteral<"call">;
|
|
1164
|
+
wrapper: z.ZodString;
|
|
1165
|
+
func: z.ZodLiteral<"entry">;
|
|
1166
|
+
instructions: z.ZodString;
|
|
1167
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
1168
|
+
asset: z.ZodString;
|
|
1169
|
+
amount: z.ZodString;
|
|
1170
|
+
}, z.core.$strip>>;
|
|
1171
|
+
message: z.ZodObject<{
|
|
1172
|
+
company: z.ZodString;
|
|
1173
|
+
policyId: z.ZodUUID;
|
|
1174
|
+
messageType: z.ZodEnum<{
|
|
1175
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1176
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1177
|
+
Business_Invoice: "Business_Invoice";
|
|
1178
|
+
Operational_Expense: "Operational_Expense";
|
|
1179
|
+
Treasury_Management: "Treasury_Management";
|
|
1180
|
+
}>;
|
|
1181
|
+
wrapper: z.ZodString;
|
|
1182
|
+
func: z.ZodLiteral<"entry">;
|
|
1183
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
1184
|
+
asset: z.ZodString;
|
|
1185
|
+
amount: z.ZodString;
|
|
1186
|
+
}, z.core.$strip>>;
|
|
1187
|
+
instructionsHash: z.ZodString;
|
|
1188
|
+
authId: z.ZodUUID;
|
|
1189
|
+
}, z.core.$strip>;
|
|
1190
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1191
|
+
chain: z.ZodEnum<{
|
|
1192
|
+
ETHEREUM: "ETHEREUM";
|
|
1193
|
+
BASE: "BASE";
|
|
1194
|
+
ARBITRUM: "ARBITRUM";
|
|
1195
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1196
|
+
}>;
|
|
1197
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
1198
|
+
symbol: z.ZodString;
|
|
1199
|
+
decimals: z.ZodNumber;
|
|
1200
|
+
address: z.ZodString;
|
|
1201
|
+
}, z.core.$strip>>;
|
|
1202
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
1203
|
+
wrapper: z.ZodNullable<z.ZodString>;
|
|
1204
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
1205
|
+
id: z.ZodUUID;
|
|
1206
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1207
|
+
onchainId: z.ZodUUID;
|
|
1208
|
+
}, z.core.$strip>>;
|
|
1209
|
+
domain: z.ZodObject<{
|
|
1210
|
+
name: z.ZodLiteral<"Cofund">;
|
|
1211
|
+
version: z.ZodLiteral<"1">;
|
|
1212
|
+
chainId: z.ZodNumber;
|
|
1213
|
+
verifyingContract: z.ZodString;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1216
|
+
name: z.ZodString;
|
|
1217
|
+
type: z.ZodString;
|
|
1218
|
+
}, z.core.$strip>>>;
|
|
1219
|
+
message: z.ZodUnion<readonly [z.ZodObject<{
|
|
1220
|
+
token: z.ZodString;
|
|
1221
|
+
maxAmount: z.ZodString;
|
|
1222
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
1223
|
+
company: z.ZodString;
|
|
1224
|
+
policyId: z.ZodUUID;
|
|
1225
|
+
title: z.ZodString;
|
|
1226
|
+
policyType: z.ZodEnum<{
|
|
1227
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1228
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1229
|
+
Business_Invoice: "Business_Invoice";
|
|
1230
|
+
Operational_Expense: "Operational_Expense";
|
|
1231
|
+
Treasury_Management: "Treasury_Management";
|
|
1232
|
+
}>;
|
|
1233
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
1234
|
+
threshold: z.ZodString;
|
|
1235
|
+
authId: z.ZodUUID;
|
|
1236
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1237
|
+
wrapper: z.ZodString;
|
|
1238
|
+
func: z.ZodLiteral<"entry">;
|
|
1239
|
+
company: z.ZodString;
|
|
1240
|
+
policyId: z.ZodUUID;
|
|
1241
|
+
title: z.ZodString;
|
|
1242
|
+
policyType: z.ZodEnum<{
|
|
1243
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1244
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1245
|
+
Business_Invoice: "Business_Invoice";
|
|
1246
|
+
Operational_Expense: "Operational_Expense";
|
|
1247
|
+
Treasury_Management: "Treasury_Management";
|
|
1248
|
+
}>;
|
|
1249
|
+
signerIds: z.ZodArray<z.ZodUUID>;
|
|
1250
|
+
threshold: z.ZodString;
|
|
1251
|
+
authId: z.ZodUUID;
|
|
1252
|
+
}, z.core.$strip>]>;
|
|
1253
|
+
kind: z.ZodLiteral<"policy">;
|
|
1254
|
+
id: z.ZodUUID;
|
|
1255
|
+
cofundId: z.ZodUUID;
|
|
1256
|
+
name: z.ZodString;
|
|
1257
|
+
type: z.ZodEnum<{
|
|
1258
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1259
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1260
|
+
Business_Invoice: "Business_Invoice";
|
|
1261
|
+
Operational_Expense: "Operational_Expense";
|
|
1262
|
+
Treasury_Management: "Treasury_Management";
|
|
1263
|
+
}>;
|
|
1264
|
+
status: z.ZodEnum<{
|
|
1265
|
+
PENDING: "PENDING";
|
|
1266
|
+
ACTIVE: "ACTIVE";
|
|
1267
|
+
INACTIVE: "INACTIVE";
|
|
1268
|
+
FAILED: "FAILED";
|
|
1269
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
1270
|
+
}>;
|
|
1271
|
+
createdAt: z.ZodISODateTime;
|
|
1272
|
+
threshold: z.ZodNumber;
|
|
1273
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1274
|
+
id: z.ZodUUID;
|
|
1275
|
+
chain: z.ZodEnum<{
|
|
1276
|
+
ETHEREUM: "ETHEREUM";
|
|
1277
|
+
BASE: "BASE";
|
|
1278
|
+
ARBITRUM: "ARBITRUM";
|
|
1279
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1280
|
+
}>;
|
|
1281
|
+
address: z.ZodString;
|
|
1282
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1283
|
+
id: z.ZodUUID;
|
|
1284
|
+
chain: z.ZodLiteral<"BTC">;
|
|
1285
|
+
address: z.ZodString;
|
|
1286
|
+
}, z.core.$strip>], "chain">;
|
|
1287
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
1288
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
1289
|
+
awaitingMe: z.ZodBoolean;
|
|
1290
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1291
|
+
chain: z.ZodLiteral<"BTC">;
|
|
1292
|
+
token: z.ZodNullable<z.ZodObject<{
|
|
1293
|
+
symbol: z.ZodString;
|
|
1294
|
+
decimals: z.ZodNumber;
|
|
1295
|
+
address: z.ZodLiteral<"BTC">;
|
|
1296
|
+
}, z.core.$strip>>;
|
|
1297
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
1298
|
+
wrapper: z.ZodNull;
|
|
1299
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
1300
|
+
id: z.ZodUUID;
|
|
1301
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1302
|
+
key: z.ZodString;
|
|
1303
|
+
}, z.core.$strip>>;
|
|
1304
|
+
message: z.ZodString;
|
|
1305
|
+
kind: z.ZodLiteral<"policy">;
|
|
1306
|
+
id: z.ZodUUID;
|
|
1307
|
+
cofundId: z.ZodUUID;
|
|
1308
|
+
name: z.ZodString;
|
|
1309
|
+
type: z.ZodEnum<{
|
|
1310
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1311
|
+
Crypto_Onramp: "Crypto_Onramp";
|
|
1312
|
+
Business_Invoice: "Business_Invoice";
|
|
1313
|
+
Operational_Expense: "Operational_Expense";
|
|
1314
|
+
Treasury_Management: "Treasury_Management";
|
|
1315
|
+
}>;
|
|
1316
|
+
status: z.ZodEnum<{
|
|
1317
|
+
PENDING: "PENDING";
|
|
1318
|
+
ACTIVE: "ACTIVE";
|
|
1319
|
+
INACTIVE: "INACTIVE";
|
|
1320
|
+
FAILED: "FAILED";
|
|
1321
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
1322
|
+
}>;
|
|
1323
|
+
createdAt: z.ZodISODateTime;
|
|
1324
|
+
threshold: z.ZodNumber;
|
|
1325
|
+
vault: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1326
|
+
id: z.ZodUUID;
|
|
1327
|
+
chain: z.ZodEnum<{
|
|
1328
|
+
ETHEREUM: "ETHEREUM";
|
|
1329
|
+
BASE: "BASE";
|
|
1330
|
+
ARBITRUM: "ARBITRUM";
|
|
1331
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1332
|
+
}>;
|
|
1333
|
+
address: z.ZodString;
|
|
1334
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1335
|
+
id: z.ZodUUID;
|
|
1336
|
+
chain: z.ZodLiteral<"BTC">;
|
|
1337
|
+
address: z.ZodString;
|
|
1338
|
+
}, z.core.$strip>], "chain">;
|
|
1339
|
+
maxAmount: z.ZodNullable<z.ZodString>;
|
|
1340
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
1341
|
+
awaitingMe: z.ZodBoolean;
|
|
1342
|
+
}, z.core.$strip>], "chain">, z.ZodObject<{
|
|
1343
|
+
kind: z.ZodLiteral<"invite">;
|
|
1344
|
+
id: z.ZodUUID;
|
|
1345
|
+
cofundId: z.ZodUUID;
|
|
1346
|
+
chain: z.ZodEnum<{
|
|
1347
|
+
ETHEREUM: "ETHEREUM";
|
|
1348
|
+
BASE: "BASE";
|
|
1349
|
+
ARBITRUM: "ARBITRUM";
|
|
1350
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1351
|
+
}>;
|
|
1352
|
+
status: z.ZodEnum<{
|
|
1353
|
+
FAILED: "FAILED";
|
|
1354
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
1355
|
+
COMPLETED: "COMPLETED";
|
|
1356
|
+
AWAITING_SUBMISSION: "AWAITING_SUBMISSION";
|
|
1357
|
+
PROCESSING: "PROCESSING";
|
|
1358
|
+
EXPIRED: "EXPIRED";
|
|
1359
|
+
CANCELED: "CANCELED";
|
|
1360
|
+
REJECTED: "REJECTED";
|
|
1361
|
+
}>;
|
|
1362
|
+
createdAt: z.ZodISODateTime;
|
|
1363
|
+
invitedBy: z.ZodNullable<z.ZodObject<{
|
|
1364
|
+
id: z.ZodUUID;
|
|
1365
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1366
|
+
}, z.core.$strip>>;
|
|
1367
|
+
recipient: z.ZodObject<{
|
|
1368
|
+
id: z.ZodUUID;
|
|
1369
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1370
|
+
email: z.ZodEmail;
|
|
1371
|
+
}, z.core.$strip>;
|
|
1372
|
+
seat: z.ZodObject<{
|
|
1373
|
+
userId: z.ZodUUID;
|
|
1374
|
+
isAdmin: z.ZodBoolean;
|
|
1375
|
+
position: z.ZodString;
|
|
1376
|
+
expiresAt: z.ZodString;
|
|
1377
|
+
}, z.core.$strip>;
|
|
1378
|
+
signedBy: z.ZodArray<z.ZodUUID>;
|
|
1379
|
+
required: z.ZodNumber;
|
|
1380
|
+
awaitingMe: z.ZodBoolean;
|
|
1381
|
+
domain: z.ZodObject<{
|
|
1382
|
+
name: z.ZodLiteral<"Cofund">;
|
|
1383
|
+
version: z.ZodLiteral<"1">;
|
|
1384
|
+
chainId: z.ZodNumber;
|
|
1385
|
+
verifyingContract: z.ZodString;
|
|
1386
|
+
}, z.core.$strip>;
|
|
1387
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1388
|
+
name: z.ZodString;
|
|
1389
|
+
type: z.ZodString;
|
|
1390
|
+
}, z.core.$strip>>>;
|
|
1391
|
+
message: z.ZodObject<{
|
|
1392
|
+
company: z.ZodString;
|
|
1393
|
+
callerId: z.ZodUUID;
|
|
1394
|
+
userId: z.ZodUUID;
|
|
1395
|
+
userIsAdmin: z.ZodBoolean;
|
|
1396
|
+
userPosition: z.ZodString;
|
|
1397
|
+
expiresAt: z.ZodString;
|
|
1398
|
+
authId: z.ZodUUID;
|
|
1399
|
+
}, z.core.$strip>;
|
|
1400
|
+
}, z.core.$strip>], "kind">;
|
|
1401
|
+
export type ApiRequest = z.infer<typeof ApiRequestSchema>;
|
|
1402
|
+
/** What a request is: a transfer (Document), a call (ProtocolCall), a policy activation, an admin invite. */
|
|
1403
|
+
export declare const RequestKindSchema: z.ZodEnum<{
|
|
1404
|
+
policy: "policy";
|
|
1405
|
+
transfer: "transfer";
|
|
1406
|
+
call: "call";
|
|
1407
|
+
invite: "invite";
|
|
1408
|
+
}>;
|
|
1409
|
+
export type RequestKind = z.infer<typeof RequestKindSchema>;
|
|
1410
|
+
export declare const RejectResultSchema: z.ZodObject<{
|
|
1411
|
+
id: z.ZodUUID;
|
|
1412
|
+
kind: z.ZodEnum<{
|
|
1413
|
+
policy: "policy";
|
|
1414
|
+
transfer: "transfer";
|
|
1415
|
+
call: "call";
|
|
1416
|
+
invite: "invite";
|
|
1417
|
+
}>;
|
|
1418
|
+
}, z.core.$strip>;
|
|
1419
|
+
export type RejectResult = z.infer<typeof RejectResultSchema>;
|
|
1420
|
+
export declare const AcceptInviteRequestSchema: z.ZodObject<{
|
|
1421
|
+
evm: z.ZodArray<z.ZodObject<{
|
|
1422
|
+
chain: z.ZodEnum<{
|
|
1423
|
+
ETHEREUM: "ETHEREUM";
|
|
1424
|
+
BASE: "BASE";
|
|
1425
|
+
ARBITRUM: "ARBITRUM";
|
|
1426
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1427
|
+
}>;
|
|
1428
|
+
address: z.ZodString;
|
|
1429
|
+
signature: z.ZodString;
|
|
1430
|
+
}, z.core.$strip>>;
|
|
1431
|
+
btc: z.ZodOptional<z.ZodObject<{
|
|
1432
|
+
xpub: z.ZodString;
|
|
1433
|
+
proof: z.ZodString;
|
|
1434
|
+
}, z.core.$strip>>;
|
|
1435
|
+
}, z.core.$strip>;
|
|
1436
|
+
export type AcceptInviteRequest = z.infer<typeof AcceptInviteRequestSchema>;
|
|
1437
|
+
/** POST /transfers. Retrying with the same `id` returns the same request. */
|
|
1438
|
+
export declare const ProposeTransferRequestSchema: z.ZodObject<{
|
|
1439
|
+
id: z.ZodUUID;
|
|
1440
|
+
policyId: z.ZodUUID;
|
|
1441
|
+
token: z.ZodString;
|
|
1442
|
+
recipient: z.ZodString;
|
|
1443
|
+
amount: z.ZodString;
|
|
1444
|
+
recipientEmail: z.ZodEmail;
|
|
1445
|
+
recipientName: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1447
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
1448
|
+
signature: z.ZodString;
|
|
1449
|
+
}, z.core.$strip>;
|
|
1450
|
+
export type ProposeTransferRequest = z.infer<typeof ProposeTransferRequestSchema>;
|
|
1451
|
+
/** POST /calls. Retrying with the same `authId` returns the same request. */
|
|
1452
|
+
export declare const ProposeCallRequestSchema: z.ZodObject<{
|
|
1453
|
+
authId: z.ZodUUID;
|
|
1454
|
+
policyId: z.ZodUUID;
|
|
1455
|
+
wrapper: z.ZodString;
|
|
1456
|
+
func: z.ZodLiteral<"entry">;
|
|
1457
|
+
instructions: z.ZodString;
|
|
1458
|
+
allowances: z.ZodArray<z.ZodObject<{
|
|
1459
|
+
asset: z.ZodString;
|
|
1460
|
+
amount: z.ZodString;
|
|
1461
|
+
}, z.core.$strip>>;
|
|
1462
|
+
signature: z.ZodString;
|
|
1463
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1464
|
+
}, z.core.$strip>;
|
|
1465
|
+
export type ProposeCallRequest = z.infer<typeof ProposeCallRequestSchema>;
|
|
1466
|
+
/** An EVM transfer policy: the token and the cap per transfer, with the creator's `TransferPolicyActivation`. */
|
|
1467
|
+
export declare const CreateEvmTransferPolicyRequestSchema: z.ZodObject<{
|
|
1468
|
+
chain: z.ZodEnum<{
|
|
1469
|
+
ETHEREUM: "ETHEREUM";
|
|
1470
|
+
BASE: "BASE";
|
|
1471
|
+
ARBITRUM: "ARBITRUM";
|
|
1472
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1473
|
+
}>;
|
|
1474
|
+
token: z.ZodString;
|
|
1475
|
+
maxAmount: z.ZodString;
|
|
1476
|
+
signature: z.ZodString;
|
|
1477
|
+
id: z.ZodUUID;
|
|
1478
|
+
vaultId: z.ZodUUID;
|
|
1479
|
+
name: z.ZodString;
|
|
1480
|
+
type: z.ZodEnum<{
|
|
1481
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1482
|
+
Operational_Expense: "Operational_Expense";
|
|
1483
|
+
Treasury_Management: "Treasury_Management";
|
|
1484
|
+
}>;
|
|
1485
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1486
|
+
threshold: z.ZodNumber;
|
|
1487
|
+
}, z.core.$strict>;
|
|
1488
|
+
/** An EVM call policy: the wrapper it binds (function `entry`), with the creator's `TransactionPolicyActivation`. */
|
|
1489
|
+
export declare const CreateEvmCallPolicyRequestSchema: z.ZodObject<{
|
|
1490
|
+
chain: z.ZodEnum<{
|
|
1491
|
+
ETHEREUM: "ETHEREUM";
|
|
1492
|
+
BASE: "BASE";
|
|
1493
|
+
ARBITRUM: "ARBITRUM";
|
|
1494
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1495
|
+
}>;
|
|
1496
|
+
wrapper: z.ZodString;
|
|
1497
|
+
signature: z.ZodString;
|
|
1498
|
+
id: z.ZodUUID;
|
|
1499
|
+
vaultId: z.ZodUUID;
|
|
1500
|
+
name: z.ZodString;
|
|
1501
|
+
type: z.ZodEnum<{
|
|
1502
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1503
|
+
Operational_Expense: "Operational_Expense";
|
|
1504
|
+
Treasury_Management: "Treasury_Management";
|
|
1505
|
+
}>;
|
|
1506
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1507
|
+
threshold: z.ZodNumber;
|
|
1508
|
+
}, z.core.$strict>;
|
|
1509
|
+
/**
|
|
1510
|
+
* A BTC transfer policy, with the creator's approval: a Bitcoin Signed Message
|
|
1511
|
+
* over the activation digest (`btc-policy-activation.ts`) by their BTC key's
|
|
1512
|
+
* Cofund leaf.
|
|
1513
|
+
*/
|
|
1514
|
+
export declare const CreateBtcPolicyRequestSchema: z.ZodObject<{
|
|
1515
|
+
chain: z.ZodLiteral<"BTC">;
|
|
1516
|
+
token: z.ZodLiteral<"BTC">;
|
|
1517
|
+
maxAmount: z.ZodString;
|
|
1518
|
+
signature: z.ZodString;
|
|
1519
|
+
id: z.ZodUUID;
|
|
1520
|
+
vaultId: z.ZodUUID;
|
|
1521
|
+
name: z.ZodString;
|
|
1522
|
+
type: z.ZodEnum<{
|
|
1523
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1524
|
+
Operational_Expense: "Operational_Expense";
|
|
1525
|
+
Treasury_Management: "Treasury_Management";
|
|
1526
|
+
}>;
|
|
1527
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1528
|
+
threshold: z.ZodNumber;
|
|
1529
|
+
}, z.core.$strict>;
|
|
1530
|
+
/** POST /policies (admins). Retrying with the same `id` returns the same policy. */
|
|
1531
|
+
export declare const CreatePolicyRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1532
|
+
chain: z.ZodEnum<{
|
|
1533
|
+
ETHEREUM: "ETHEREUM";
|
|
1534
|
+
BASE: "BASE";
|
|
1535
|
+
ARBITRUM: "ARBITRUM";
|
|
1536
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1537
|
+
}>;
|
|
1538
|
+
token: z.ZodString;
|
|
1539
|
+
maxAmount: z.ZodString;
|
|
1540
|
+
signature: z.ZodString;
|
|
1541
|
+
id: z.ZodUUID;
|
|
1542
|
+
vaultId: z.ZodUUID;
|
|
1543
|
+
name: z.ZodString;
|
|
1544
|
+
type: z.ZodEnum<{
|
|
1545
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1546
|
+
Operational_Expense: "Operational_Expense";
|
|
1547
|
+
Treasury_Management: "Treasury_Management";
|
|
1548
|
+
}>;
|
|
1549
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1550
|
+
threshold: z.ZodNumber;
|
|
1551
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1552
|
+
chain: z.ZodEnum<{
|
|
1553
|
+
ETHEREUM: "ETHEREUM";
|
|
1554
|
+
BASE: "BASE";
|
|
1555
|
+
ARBITRUM: "ARBITRUM";
|
|
1556
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1557
|
+
}>;
|
|
1558
|
+
wrapper: z.ZodString;
|
|
1559
|
+
signature: z.ZodString;
|
|
1560
|
+
id: z.ZodUUID;
|
|
1561
|
+
vaultId: z.ZodUUID;
|
|
1562
|
+
name: z.ZodString;
|
|
1563
|
+
type: z.ZodEnum<{
|
|
1564
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1565
|
+
Operational_Expense: "Operational_Expense";
|
|
1566
|
+
Treasury_Management: "Treasury_Management";
|
|
1567
|
+
}>;
|
|
1568
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1569
|
+
threshold: z.ZodNumber;
|
|
1570
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1571
|
+
chain: z.ZodLiteral<"BTC">;
|
|
1572
|
+
token: z.ZodLiteral<"BTC">;
|
|
1573
|
+
maxAmount: z.ZodString;
|
|
1574
|
+
signature: z.ZodString;
|
|
1575
|
+
id: z.ZodUUID;
|
|
1576
|
+
vaultId: z.ZodUUID;
|
|
1577
|
+
name: z.ZodString;
|
|
1578
|
+
type: z.ZodEnum<{
|
|
1579
|
+
Contractor_Stipend: "Contractor_Stipend";
|
|
1580
|
+
Operational_Expense: "Operational_Expense";
|
|
1581
|
+
Treasury_Management: "Treasury_Management";
|
|
1582
|
+
}>;
|
|
1583
|
+
signers: z.ZodArray<z.ZodUUID>;
|
|
1584
|
+
threshold: z.ZodNumber;
|
|
1585
|
+
}, z.core.$strict>]>;
|
|
1586
|
+
export type CreatePolicyRequest = z.infer<typeof CreatePolicyRequestSchema>;
|
|
1587
|
+
/** POST /invites/user-id (admins). */
|
|
1588
|
+
export declare const InviteUserIdRequestSchema: z.ZodObject<{
|
|
1589
|
+
email: z.ZodEmail;
|
|
1590
|
+
}, z.core.$strip>;
|
|
1591
|
+
export type InviteUserIdRequest = z.infer<typeof InviteUserIdRequestSchema>;
|
|
1592
|
+
/**
|
|
1593
|
+
* The id an invite to that email must seat: the account's own when the email
|
|
1594
|
+
* has one (its identity in every cofund), else null, and the invite seats its
|
|
1595
|
+
* own `id`.
|
|
1596
|
+
*/
|
|
1597
|
+
export declare const InviteUserIdSchema: z.ZodObject<{
|
|
1598
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
1599
|
+
}, z.core.$strip>;
|
|
1600
|
+
export type InviteUserId = z.infer<typeof InviteUserIdSchema>;
|
|
1601
|
+
/** POST /invites (admins). Retrying with the same `id` returns the same invite. */
|
|
1602
|
+
export declare const CreateInviteRequestSchema: z.ZodObject<{
|
|
1603
|
+
id: z.ZodUUID;
|
|
1604
|
+
email: z.ZodEmail;
|
|
1605
|
+
firstName: z.ZodString;
|
|
1606
|
+
lastName: z.ZodString;
|
|
1607
|
+
position: z.ZodString;
|
|
1608
|
+
isAdmin: z.ZodBoolean;
|
|
1609
|
+
userId: z.ZodUUID;
|
|
1610
|
+
chains: z.ZodArray<z.ZodObject<{
|
|
1611
|
+
chain: z.ZodEnum<{
|
|
1612
|
+
ETHEREUM: "ETHEREUM";
|
|
1613
|
+
BASE: "BASE";
|
|
1614
|
+
ARBITRUM: "ARBITRUM";
|
|
1615
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1616
|
+
}>;
|
|
1617
|
+
expiresAt: z.ZodString;
|
|
1618
|
+
signature: z.ZodString;
|
|
1619
|
+
}, z.core.$strip>>;
|
|
1620
|
+
}, z.core.$strip>;
|
|
1621
|
+
export type CreateInviteRequest = z.infer<typeof CreateInviteRequestSchema>;
|
|
1622
|
+
/**
|
|
1623
|
+
* An invite as created: the seat, and its row on each chain. A row is
|
|
1624
|
+
* claimable (AWAITING_SUBMISSION), or an admin seat awaiting the other admins'
|
|
1625
|
+
* co-signatures (AWAITING_SIGNATURES), when its id is the `invite` request
|
|
1626
|
+
* they sign.
|
|
1627
|
+
*/
|
|
1628
|
+
export declare const ApiCreatedInviteSchema: z.ZodObject<{
|
|
1629
|
+
id: z.ZodUUID;
|
|
1630
|
+
cofundId: z.ZodUUID;
|
|
1631
|
+
member: z.ZodObject<{
|
|
1632
|
+
id: z.ZodUUID;
|
|
1633
|
+
email: z.ZodEmail;
|
|
1634
|
+
isAdmin: z.ZodBoolean;
|
|
1635
|
+
position: z.ZodString;
|
|
1636
|
+
}, z.core.$strip>;
|
|
1637
|
+
chains: z.ZodArray<z.ZodObject<{
|
|
1638
|
+
chain: z.ZodEnum<{
|
|
1639
|
+
ETHEREUM: "ETHEREUM";
|
|
1640
|
+
BASE: "BASE";
|
|
1641
|
+
ARBITRUM: "ARBITRUM";
|
|
1642
|
+
ROBINHOOD: "ROBINHOOD";
|
|
1643
|
+
}>;
|
|
1644
|
+
id: z.ZodUUID;
|
|
1645
|
+
status: z.ZodEnum<{
|
|
1646
|
+
FAILED: "FAILED";
|
|
1647
|
+
AWAITING_SIGNATURES: "AWAITING_SIGNATURES";
|
|
1648
|
+
COMPLETED: "COMPLETED";
|
|
1649
|
+
AWAITING_SUBMISSION: "AWAITING_SUBMISSION";
|
|
1650
|
+
PROCESSING: "PROCESSING";
|
|
1651
|
+
EXPIRED: "EXPIRED";
|
|
1652
|
+
CANCELED: "CANCELED";
|
|
1653
|
+
REJECTED: "REJECTED";
|
|
1654
|
+
}>;
|
|
1655
|
+
expiresAt: z.ZodString;
|
|
1656
|
+
}, z.core.$strip>>;
|
|
1657
|
+
}, z.core.$strip>;
|
|
1658
|
+
export type ApiCreatedInvite = z.infer<typeof ApiCreatedInviteSchema>;
|
|
1659
|
+
/** POST /requests/{id}/signatures. A BTC policy approval is a compact signature; the rest are EIP-712. */
|
|
1660
|
+
export declare const SignatureRequestSchema: z.ZodObject<{
|
|
1661
|
+
signature: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1662
|
+
}, z.core.$strip>;
|
|
1663
|
+
export type SignatureRequest = z.infer<typeof SignatureRequestSchema>;
|
|
1664
|
+
/** What a subscription may receive. */
|
|
1665
|
+
export declare const WEBHOOK_EVENT_TYPES: readonly ["request.signature_needed", "request.executed", "request.failed", "request.rejected", "invite.received"];
|
|
1666
|
+
export declare const WebhookEventTypeSchema: z.ZodEnum<{
|
|
1667
|
+
"request.signature_needed": "request.signature_needed";
|
|
1668
|
+
"request.executed": "request.executed";
|
|
1669
|
+
"request.failed": "request.failed";
|
|
1670
|
+
"request.rejected": "request.rejected";
|
|
1671
|
+
"invite.received": "invite.received";
|
|
1672
|
+
}>;
|
|
1673
|
+
export type WebhookEventType = z.infer<typeof WebhookEventTypeSchema>;
|
|
1674
|
+
/** 2048: the URL length every browser, proxy and CDN takes. */
|
|
1675
|
+
export declare const WEBHOOK_URL_MAX_LENGTH = 2048;
|
|
1676
|
+
/** A webhook endpoint: https only. The server also refuses private, loopback and link-local targets. */
|
|
1677
|
+
export declare const WebhookUrl: z.ZodURL;
|
|
1678
|
+
/** `whsec_` and 32 random bytes in hex: the HMAC key a subscription's deliveries are signed with. */
|
|
1679
|
+
export declare const WebhookSecret: z.ZodString;
|
|
1680
|
+
/** A failure reason's length on the wire: an error name or a node's short message fits. */
|
|
1681
|
+
export declare const WEBHOOK_REASON_MAX_LENGTH = 200;
|
|
1682
|
+
/** POST /webhooks. */
|
|
1683
|
+
export declare const CreateWebhookRequestSchema: z.ZodObject<{
|
|
1684
|
+
url: z.ZodURL;
|
|
1685
|
+
events: z.ZodArray<z.ZodEnum<{
|
|
1686
|
+
"request.signature_needed": "request.signature_needed";
|
|
1687
|
+
"request.executed": "request.executed";
|
|
1688
|
+
"request.failed": "request.failed";
|
|
1689
|
+
"request.rejected": "request.rejected";
|
|
1690
|
+
"invite.received": "invite.received";
|
|
1691
|
+
}>>;
|
|
1692
|
+
}, z.core.$strip>;
|
|
1693
|
+
export type CreateWebhookRequest = z.infer<typeof CreateWebhookRequestSchema>;
|
|
1694
|
+
/** A subscription, as listed: never its secret. */
|
|
1695
|
+
export declare const ApiWebhookSchema: z.ZodObject<{
|
|
1696
|
+
id: z.ZodUUID;
|
|
1697
|
+
url: z.ZodURL;
|
|
1698
|
+
events: z.ZodArray<z.ZodEnum<{
|
|
1699
|
+
"request.signature_needed": "request.signature_needed";
|
|
1700
|
+
"request.executed": "request.executed";
|
|
1701
|
+
"request.failed": "request.failed";
|
|
1702
|
+
"request.rejected": "request.rejected";
|
|
1703
|
+
"invite.received": "invite.received";
|
|
1704
|
+
}>>;
|
|
1705
|
+
active: z.ZodBoolean;
|
|
1706
|
+
failingSince: z.ZodNullable<z.ZodISODateTime>;
|
|
1707
|
+
disabledAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1708
|
+
createdAt: z.ZodISODateTime;
|
|
1709
|
+
}, z.core.$strip>;
|
|
1710
|
+
export type ApiWebhook = z.infer<typeof ApiWebhookSchema>;
|
|
1711
|
+
/** The created subscription and its signing secret, returned this once. */
|
|
1712
|
+
export declare const CreatedWebhookSchema: z.ZodObject<{
|
|
1713
|
+
id: z.ZodUUID;
|
|
1714
|
+
url: z.ZodURL;
|
|
1715
|
+
events: z.ZodArray<z.ZodEnum<{
|
|
1716
|
+
"request.signature_needed": "request.signature_needed";
|
|
1717
|
+
"request.executed": "request.executed";
|
|
1718
|
+
"request.failed": "request.failed";
|
|
1719
|
+
"request.rejected": "request.rejected";
|
|
1720
|
+
"invite.received": "invite.received";
|
|
1721
|
+
}>>;
|
|
1722
|
+
active: z.ZodBoolean;
|
|
1723
|
+
failingSince: z.ZodNullable<z.ZodISODateTime>;
|
|
1724
|
+
disabledAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1725
|
+
createdAt: z.ZodISODateTime;
|
|
1726
|
+
secret: z.ZodString;
|
|
1727
|
+
}, z.core.$strip>;
|
|
1728
|
+
export type CreatedWebhook = z.infer<typeof CreatedWebhookSchema>;
|
|
1729
|
+
export declare const DeleteWebhookResultSchema: z.ZodObject<{
|
|
1730
|
+
id: z.ZodUUID;
|
|
1731
|
+
deleted: z.ZodLiteral<true>;
|
|
1732
|
+
}, z.core.$strip>;
|
|
1733
|
+
export type DeleteWebhookResult = z.infer<typeof DeleteWebhookResultSchema>;
|
|
1734
|
+
/**
|
|
1735
|
+
* What a delivery's body carries: which event, and where to fetch its
|
|
1736
|
+
* details with the API. Never amounts or addresses.
|
|
1737
|
+
*/
|
|
1738
|
+
export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1739
|
+
type: z.ZodLiteral<"request.signature_needed">;
|
|
1740
|
+
requestId: z.ZodUUID;
|
|
1741
|
+
kind: z.ZodEnum<{
|
|
1742
|
+
policy: "policy";
|
|
1743
|
+
transfer: "transfer";
|
|
1744
|
+
call: "call";
|
|
1745
|
+
invite: "invite";
|
|
1746
|
+
}>;
|
|
1747
|
+
id: z.ZodUUID;
|
|
1748
|
+
createdAt: z.ZodISODateTime;
|
|
1749
|
+
cofundId: z.ZodUUID;
|
|
1750
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1751
|
+
type: z.ZodLiteral<"request.executed">;
|
|
1752
|
+
requestId: z.ZodUUID;
|
|
1753
|
+
kind: z.ZodEnum<{
|
|
1754
|
+
policy: "policy";
|
|
1755
|
+
transfer: "transfer";
|
|
1756
|
+
call: "call";
|
|
1757
|
+
invite: "invite";
|
|
1758
|
+
}>;
|
|
1759
|
+
id: z.ZodUUID;
|
|
1760
|
+
createdAt: z.ZodISODateTime;
|
|
1761
|
+
cofundId: z.ZodUUID;
|
|
1762
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1763
|
+
type: z.ZodLiteral<"request.rejected">;
|
|
1764
|
+
requestId: z.ZodUUID;
|
|
1765
|
+
kind: z.ZodEnum<{
|
|
1766
|
+
policy: "policy";
|
|
1767
|
+
transfer: "transfer";
|
|
1768
|
+
call: "call";
|
|
1769
|
+
invite: "invite";
|
|
1770
|
+
}>;
|
|
1771
|
+
id: z.ZodUUID;
|
|
1772
|
+
createdAt: z.ZodISODateTime;
|
|
1773
|
+
cofundId: z.ZodUUID;
|
|
1774
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1775
|
+
type: z.ZodLiteral<"request.failed">;
|
|
1776
|
+
requestId: z.ZodUUID;
|
|
1777
|
+
kind: z.ZodEnum<{
|
|
1778
|
+
policy: "policy";
|
|
1779
|
+
transfer: "transfer";
|
|
1780
|
+
call: "call";
|
|
1781
|
+
invite: "invite";
|
|
1782
|
+
}>;
|
|
1783
|
+
id: z.ZodUUID;
|
|
1784
|
+
createdAt: z.ZodISODateTime;
|
|
1785
|
+
cofundId: z.ZodUUID;
|
|
1786
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1788
|
+
type: z.ZodLiteral<"invite.received">;
|
|
1789
|
+
inviteId: z.ZodUUID;
|
|
1790
|
+
id: z.ZodUUID;
|
|
1791
|
+
createdAt: z.ZodISODateTime;
|
|
1792
|
+
cofundId: z.ZodUUID;
|
|
1793
|
+
}, z.core.$strip>], "type">;
|
|
1794
|
+
export type WebhookEvent = z.infer<typeof WebhookEventSchema>;
|