@trusset/sdk 0.1.0 → 0.5.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/README.md +175 -171
- package/dist/base-BYEauvBZ.d.mts +111 -0
- package/dist/base-zODt0Kf5.d.ts +111 -0
- package/dist/chunk-2KHUPARH.js +2260 -0
- package/dist/chunk-3YF42MHV.mjs +678 -0
- package/dist/chunk-4MNJZAXE.mjs +2260 -0
- package/dist/chunk-7HFMHYRA.js +107 -0
- package/dist/chunk-ACXAKW5E.js +916 -0
- package/dist/chunk-AI4ZNJLR.js +678 -0
- package/dist/chunk-C7CANC53.mjs +208 -0
- package/dist/chunk-DQCX2GYT.mjs +107 -0
- package/dist/chunk-GWMT6UU7.js +208 -0
- package/dist/chunk-OQG3PEF3.mjs +916 -0
- package/dist/flow-Cz8A09rn.d.mts +171 -0
- package/dist/flow-Cz8A09rn.d.ts +171 -0
- package/dist/index-DKUSzkBN.d.ts +956 -0
- package/dist/index-Dl4U8vUM.d.mts +956 -0
- package/dist/index.d.mts +39 -448
- package/dist/index.d.ts +39 -448
- package/dist/index.js +264 -534
- package/dist/index.mjs +249 -483
- package/dist/modules/customers/index.d.mts +2 -0
- package/dist/modules/customers/index.d.ts +2 -0
- package/dist/modules/customers/index.js +17 -0
- package/dist/modules/customers/index.mjs +17 -0
- package/dist/modules/lending/index.d.mts +6768 -0
- package/dist/modules/lending/index.d.ts +6768 -0
- package/dist/modules/lending/index.js +44 -0
- package/dist/modules/lending/index.mjs +44 -0
- package/dist/modules/tokens/index.d.mts +476 -0
- package/dist/modules/tokens/index.d.ts +476 -0
- package/dist/modules/tokens/index.js +8 -0
- package/dist/modules/tokens/index.mjs +8 -0
- package/package.json +71 -35
package/dist/index.d.mts
CHANGED
|
@@ -1,449 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
data?: T;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
interface ApiError {
|
|
11
|
-
code: string;
|
|
12
|
-
message: string;
|
|
13
|
-
}
|
|
14
|
-
interface ResponseMetadata {
|
|
15
|
-
requestId: string;
|
|
16
|
-
timestamp: string;
|
|
17
|
-
total?: number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* SDK configuration passed to TrussetClient on init.
|
|
21
|
-
*/
|
|
22
|
-
interface TrussetConfig {
|
|
23
|
-
/** API key from the Trusset issuer dashboard. */
|
|
24
|
-
apiKey: string;
|
|
25
|
-
/**
|
|
26
|
-
* Base URL of the Trusset API.
|
|
27
|
-
* Defaults to https://api.trusset.org
|
|
28
|
-
*/
|
|
29
|
-
baseUrl?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Request timeout in milliseconds. Default: 30000 (30s).
|
|
32
|
-
*/
|
|
33
|
-
timeoutMs?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Max retries on transient failures (5xx, network). Default: 3.
|
|
36
|
-
*/
|
|
37
|
-
maxRetries?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Custom logger. Defaults to silent.
|
|
40
|
-
*/
|
|
41
|
-
logger?: Logger;
|
|
42
|
-
}
|
|
43
|
-
interface Logger {
|
|
44
|
-
debug(msg: string, meta?: Record<string, unknown>): void;
|
|
45
|
-
info(msg: string, meta?: Record<string, unknown>): void;
|
|
46
|
-
warn(msg: string, meta?: Record<string, unknown>): void;
|
|
47
|
-
error(msg: string, meta?: Record<string, unknown>): void;
|
|
48
|
-
}
|
|
49
|
-
interface PaginationOptions {
|
|
50
|
-
limit?: number;
|
|
51
|
-
offset?: number;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface HttpClientConfig {
|
|
55
|
-
baseUrl: string;
|
|
56
|
-
apiKey: string;
|
|
57
|
-
timeoutMs: number;
|
|
58
|
-
maxRetries: number;
|
|
59
|
-
logger: Logger;
|
|
60
|
-
}
|
|
61
|
-
declare class HttpClient {
|
|
62
|
-
private readonly config;
|
|
63
|
-
constructor(config: Partial<HttpClientConfig> & {
|
|
64
|
-
apiKey: string;
|
|
65
|
-
});
|
|
66
|
-
get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
|
|
67
|
-
post<T>(path: string, body?: unknown): Promise<T>;
|
|
68
|
-
put<T>(path: string, body?: unknown): Promise<T>;
|
|
69
|
-
delete<T>(path: string): Promise<T>;
|
|
70
|
-
private buildUrl;
|
|
71
|
-
private request;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
type InvestorType = 'RETAIL' | 'PROFESSIONAL' | 'ELIGIBLE_COUNTERPARTY';
|
|
75
|
-
type KYCStatus = 'active' | 'soft_expired' | 'hard_expired' | 'revoked' | 'none' | 'unknown';
|
|
76
|
-
type CustomerStatus = 'pending' | 'verified' | 'revoked';
|
|
77
|
-
type IdLinkStatus = 'PENDING' | 'COMPLETED' | 'EXPIRED';
|
|
78
|
-
interface Customer {
|
|
79
|
-
id: string;
|
|
80
|
-
instanceId: string;
|
|
81
|
-
walletAddress: string | null;
|
|
82
|
-
name: string | null;
|
|
83
|
-
country: string | null;
|
|
84
|
-
investorType: string;
|
|
85
|
-
externalId: string | null;
|
|
86
|
-
referenceKey: string | null;
|
|
87
|
-
status: CustomerStatus;
|
|
88
|
-
verifiedAt: string | null;
|
|
89
|
-
archived: boolean;
|
|
90
|
-
createdAt: string;
|
|
91
|
-
metadata: Record<string, unknown> | null;
|
|
92
|
-
}
|
|
93
|
-
interface CreateCustomerInput {
|
|
94
|
-
walletAddress?: string;
|
|
95
|
-
name?: string;
|
|
96
|
-
country?: string;
|
|
97
|
-
investorType?: InvestorType;
|
|
98
|
-
externalId?: string;
|
|
99
|
-
metadata?: Record<string, unknown>;
|
|
100
|
-
}
|
|
101
|
-
interface UpdateCustomerInput {
|
|
102
|
-
name?: string;
|
|
103
|
-
country?: string;
|
|
104
|
-
investorType?: InvestorType;
|
|
105
|
-
walletAddress?: string;
|
|
106
|
-
status?: CustomerStatus;
|
|
107
|
-
metadata?: Record<string, unknown>;
|
|
108
|
-
}
|
|
109
|
-
interface ListCustomersOptions extends PaginationOptions {
|
|
110
|
-
includeArchived?: boolean;
|
|
111
|
-
search?: string;
|
|
112
|
-
}
|
|
113
|
-
interface LinkWalletInput {
|
|
114
|
-
referenceKey: string;
|
|
115
|
-
walletAddress: string;
|
|
116
|
-
}
|
|
117
|
-
interface VerifyIdentityInput {
|
|
118
|
-
walletAddress: string;
|
|
119
|
-
country: string;
|
|
120
|
-
investorType?: InvestorType;
|
|
121
|
-
softExpiryDays?: number;
|
|
122
|
-
hardExpiryDays?: number;
|
|
123
|
-
kycData?: Record<string, unknown>;
|
|
124
|
-
}
|
|
125
|
-
interface VerifyIdentityResult {
|
|
126
|
-
walletAddress: string;
|
|
127
|
-
status: string;
|
|
128
|
-
txHash: string;
|
|
129
|
-
gasUsed: string;
|
|
130
|
-
kycHash: string;
|
|
131
|
-
}
|
|
132
|
-
interface BatchVerifyEntry {
|
|
133
|
-
walletAddress: string;
|
|
134
|
-
country: string;
|
|
135
|
-
investorType?: InvestorType;
|
|
136
|
-
softExpiryDays?: number;
|
|
137
|
-
hardExpiryDays?: number;
|
|
138
|
-
}
|
|
139
|
-
interface BatchVerifyResult {
|
|
140
|
-
totalEntries: number;
|
|
141
|
-
txHash: string;
|
|
142
|
-
gasUsed: string;
|
|
143
|
-
}
|
|
144
|
-
interface RevokeIdentityResult {
|
|
145
|
-
walletAddress: string;
|
|
146
|
-
status: string;
|
|
147
|
-
txHash: string;
|
|
148
|
-
gasUsed: string;
|
|
149
|
-
}
|
|
150
|
-
interface OnChainIdentity {
|
|
151
|
-
kycHash: string;
|
|
152
|
-
investorType: number;
|
|
153
|
-
kycProvider: string;
|
|
154
|
-
timestamp: number;
|
|
155
|
-
softExpiry: number;
|
|
156
|
-
hardExpiry: number;
|
|
157
|
-
status: KYCStatus;
|
|
158
|
-
statusCode: number;
|
|
159
|
-
frozen: boolean;
|
|
160
|
-
isVerified: boolean;
|
|
161
|
-
}
|
|
162
|
-
interface IdentityStatusResult {
|
|
163
|
-
walletAddress: string;
|
|
164
|
-
onChain: OnChainIdentity | null;
|
|
165
|
-
offChain: {
|
|
166
|
-
status: CustomerStatus;
|
|
167
|
-
country: string | null;
|
|
168
|
-
investorType: string;
|
|
169
|
-
verifiedAt: string | null;
|
|
170
|
-
} | null;
|
|
171
|
-
}
|
|
172
|
-
interface TransferCheckInput {
|
|
173
|
-
from: string;
|
|
174
|
-
to: string;
|
|
175
|
-
amount?: string;
|
|
176
|
-
fromBalance?: string;
|
|
177
|
-
toBalance?: string;
|
|
178
|
-
}
|
|
179
|
-
interface TransferCheckResult {
|
|
180
|
-
allowed: boolean;
|
|
181
|
-
reason: number;
|
|
182
|
-
senderStatus: KYCStatus;
|
|
183
|
-
receiverStatus: KYCStatus;
|
|
184
|
-
}
|
|
185
|
-
interface CreateIdLinkInput {
|
|
186
|
-
recipientEmail?: string;
|
|
187
|
-
recipientWallet?: string;
|
|
188
|
-
recipientPhone?: string;
|
|
189
|
-
note?: string;
|
|
190
|
-
expiryDays?: number;
|
|
191
|
-
sendVia?: ('email' | 'sms')[];
|
|
192
|
-
customRedirectUrl?: string;
|
|
193
|
-
customMessage?: string;
|
|
194
|
-
investorType?: InvestorType;
|
|
195
|
-
country?: string;
|
|
196
|
-
}
|
|
197
|
-
interface IdLink {
|
|
198
|
-
id: string;
|
|
199
|
-
token: string;
|
|
200
|
-
verificationUrl: string;
|
|
201
|
-
status: IdLinkStatus;
|
|
202
|
-
recipientEmail: string | null;
|
|
203
|
-
recipientWallet: string | null;
|
|
204
|
-
recipientPhone: string | null;
|
|
205
|
-
expiresAt: string;
|
|
206
|
-
sumsubApplicantId: string | null;
|
|
207
|
-
delivery: Record<string, {
|
|
208
|
-
sent: boolean;
|
|
209
|
-
error?: string;
|
|
210
|
-
}>;
|
|
211
|
-
}
|
|
212
|
-
interface IdLinkListItem {
|
|
213
|
-
id: string;
|
|
214
|
-
token: string;
|
|
215
|
-
recipientEmail: string | null;
|
|
216
|
-
recipientWallet: string | null;
|
|
217
|
-
recipientPhone: string | null;
|
|
218
|
-
status: IdLinkStatus;
|
|
219
|
-
note: string | null;
|
|
220
|
-
investorType: string;
|
|
221
|
-
country: string | null;
|
|
222
|
-
expiresAt: string;
|
|
223
|
-
used: boolean;
|
|
224
|
-
usedAt: string | null;
|
|
225
|
-
createdAt: string;
|
|
226
|
-
verificationUrl: string;
|
|
227
|
-
}
|
|
228
|
-
interface ListIdLinksOptions extends PaginationOptions {
|
|
229
|
-
status?: IdLinkStatus;
|
|
230
|
-
}
|
|
231
|
-
interface SyncRecord {
|
|
232
|
-
/** Unique ID in the institution's system. Maps to externalId. */
|
|
233
|
-
externalId: string;
|
|
234
|
-
walletAddress?: string;
|
|
235
|
-
name?: string;
|
|
236
|
-
country?: string;
|
|
237
|
-
investorType?: InvestorType;
|
|
238
|
-
metadata?: Record<string, unknown>;
|
|
239
|
-
}
|
|
240
|
-
interface SyncResult {
|
|
241
|
-
total: number;
|
|
242
|
-
created: number;
|
|
243
|
-
updated: number;
|
|
244
|
-
skipped: number;
|
|
245
|
-
errors: SyncError[];
|
|
246
|
-
}
|
|
247
|
-
interface SyncError {
|
|
248
|
-
externalId: string;
|
|
249
|
-
code: string;
|
|
250
|
-
message: string;
|
|
251
|
-
}
|
|
252
|
-
interface SyncOptions {
|
|
253
|
-
/** Batch size per API call. Default: 50, max: 200. */
|
|
254
|
-
batchSize?: number;
|
|
255
|
-
/**
|
|
256
|
-
* Conflict strategy when a customer with the same externalId already exists.
|
|
257
|
-
* 'skip' = do nothing, 'update' = overwrite fields. Default: 'update'.
|
|
258
|
-
*/
|
|
259
|
-
onConflict?: 'skip' | 'update';
|
|
260
|
-
/**
|
|
261
|
-
* If true, also triggers on-chain verification for entries with a walletAddress.
|
|
262
|
-
* Requires a configured relayer. Default: false.
|
|
263
|
-
*/
|
|
264
|
-
verifyOnChain?: boolean;
|
|
265
|
-
/** Country and expiry defaults for on-chain verification. */
|
|
266
|
-
verificationDefaults?: {
|
|
267
|
-
softExpiryDays?: number;
|
|
268
|
-
hardExpiryDays?: number;
|
|
269
|
-
};
|
|
270
|
-
/** Called after each batch completes. */
|
|
271
|
-
onProgress?: (processed: number, total: number) => void;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
declare class CustomerManagement {
|
|
275
|
-
private readonly http;
|
|
276
|
-
constructor(http: HttpClient);
|
|
277
|
-
/**
|
|
278
|
-
* List customers for the current instance.
|
|
279
|
-
*/
|
|
280
|
-
list(options?: ListCustomersOptions): Promise<{
|
|
281
|
-
customers: Customer[];
|
|
282
|
-
total: number;
|
|
283
|
-
}>;
|
|
284
|
-
/**
|
|
285
|
-
* Get a customer by wallet address, ID, externalId, or referenceKey.
|
|
286
|
-
*/
|
|
287
|
-
get(identifier: string): Promise<Customer>;
|
|
288
|
-
/**
|
|
289
|
-
* Create a new customer record.
|
|
290
|
-
*/
|
|
291
|
-
create(input: CreateCustomerInput): Promise<Customer>;
|
|
292
|
-
/**
|
|
293
|
-
* Update an existing customer.
|
|
294
|
-
*/
|
|
295
|
-
update(customerId: string, input: UpdateCustomerInput): Promise<Customer>;
|
|
296
|
-
/**
|
|
297
|
-
* Archive (soft-delete) a customer.
|
|
298
|
-
*/
|
|
299
|
-
archive(customerId: string): Promise<{
|
|
300
|
-
archived: boolean;
|
|
301
|
-
}>;
|
|
302
|
-
/**
|
|
303
|
-
* Link a wallet address to a customer created via referenceKey.
|
|
304
|
-
*/
|
|
305
|
-
linkWallet(input: LinkWalletInput): Promise<Customer>;
|
|
306
|
-
/**
|
|
307
|
-
* Batch-fetch country codes for a list of wallet addresses.
|
|
308
|
-
*/
|
|
309
|
-
batchGetCountries(addresses: string[]): Promise<Record<string, string>>;
|
|
310
|
-
/**
|
|
311
|
-
* Search customers by name substring.
|
|
312
|
-
*/
|
|
313
|
-
searchByName(name: string, options?: ListCustomersOptions): Promise<{
|
|
314
|
-
customers: Customer[];
|
|
315
|
-
total: number;
|
|
316
|
-
}>;
|
|
317
|
-
/**
|
|
318
|
-
* Find a customer by wallet address.
|
|
319
|
-
*/
|
|
320
|
-
searchByWallet(walletAddress: string): Promise<Customer>;
|
|
321
|
-
/**
|
|
322
|
-
* Find a customer by external ID (your system's unique identifier).
|
|
323
|
-
*/
|
|
324
|
-
searchByExternalId(externalId: string): Promise<Customer>;
|
|
325
|
-
/**
|
|
326
|
-
* Find a customer by reference key (for pre-wallet customers).
|
|
327
|
-
*/
|
|
328
|
-
searchByReference(referenceKey: string): Promise<Customer>;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
declare class CustomerIdentity {
|
|
332
|
-
private readonly http;
|
|
333
|
-
constructor(http: HttpClient);
|
|
334
|
-
/**
|
|
335
|
-
* Verify a customer's identity on-chain via the IdentityRegistry contract.
|
|
336
|
-
* Requires a configured relayer on the instance.
|
|
337
|
-
*/
|
|
338
|
-
verify(input: VerifyIdentityInput): Promise<VerifyIdentityResult>;
|
|
339
|
-
/**
|
|
340
|
-
* Batch-verify up to 500 identities in a single transaction.
|
|
341
|
-
* Requires a configured relayer.
|
|
342
|
-
*/
|
|
343
|
-
batchVerify(entries: BatchVerifyEntry[]): Promise<BatchVerifyResult>;
|
|
344
|
-
/**
|
|
345
|
-
* Revoke an identity on-chain. Requires a configured relayer.
|
|
346
|
-
*/
|
|
347
|
-
revoke(walletAddress: string): Promise<RevokeIdentityResult>;
|
|
348
|
-
/**
|
|
349
|
-
* Get combined on-chain and off-chain identity status.
|
|
350
|
-
*/
|
|
351
|
-
getStatus(walletAddress: string): Promise<IdentityStatusResult>;
|
|
352
|
-
/**
|
|
353
|
-
* Check whether a token transfer between two addresses is compliant.
|
|
354
|
-
* Runs identity checks + all registered compliance modules.
|
|
355
|
-
*/
|
|
356
|
-
canTransfer(input: TransferCheckInput): Promise<TransferCheckResult>;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
declare class CustomerIdLinks {
|
|
360
|
-
private readonly http;
|
|
361
|
-
constructor(http: HttpClient);
|
|
362
|
-
/**
|
|
363
|
-
* Create a KYC verification link to send to an investor.
|
|
364
|
-
*/
|
|
365
|
-
create(input: CreateIdLinkInput): Promise<IdLink>;
|
|
366
|
-
/**
|
|
367
|
-
* List all verification links for the current instance.
|
|
368
|
-
*/
|
|
369
|
-
list(options?: ListIdLinksOptions): Promise<{
|
|
370
|
-
links: IdLinkListItem[];
|
|
371
|
-
total: number;
|
|
372
|
-
}>;
|
|
373
|
-
/**
|
|
374
|
-
* Revoke (expire) a verification link so it can no longer be used.
|
|
375
|
-
*/
|
|
376
|
-
revoke(linkId: string): Promise<void>;
|
|
377
|
-
/**
|
|
378
|
-
* Resend a verification link via the specified channels.
|
|
379
|
-
*/
|
|
380
|
-
resend(linkId: string, channels: ('email' | 'sms')[]): Promise<{
|
|
381
|
-
verificationUrl: string;
|
|
382
|
-
delivery: Record<string, {
|
|
383
|
-
sent: boolean;
|
|
384
|
-
error?: string;
|
|
385
|
-
}>;
|
|
386
|
-
}>;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Synchronize an existing customer database with Trusset in bulk.
|
|
391
|
-
*
|
|
392
|
-
* This module handles:
|
|
393
|
-
* - Batched upsert of customer records mapped by externalId
|
|
394
|
-
* - Conflict resolution (skip or update)
|
|
395
|
-
* - Optional on-chain identity verification for entries that include a wallet
|
|
396
|
-
* - Progress callbacks for long-running imports
|
|
397
|
-
*
|
|
398
|
-
* Usage:
|
|
399
|
-
* ```ts
|
|
400
|
-
* const result = await trusset.customers.sync.importRecords(records, {
|
|
401
|
-
* onConflict: 'update',
|
|
402
|
-
* verifyOnChain: true,
|
|
403
|
-
* onProgress: (done, total) => console.log(`${done}/${total}`),
|
|
404
|
-
* })
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
|
-
declare class CustomerSync {
|
|
408
|
-
private readonly http;
|
|
409
|
-
constructor(http: HttpClient);
|
|
410
|
-
/**
|
|
411
|
-
* Import customer records from an external system.
|
|
412
|
-
*
|
|
413
|
-
* Each record is mapped by `externalId`. If a customer with that externalId
|
|
414
|
-
* already exists, the `onConflict` strategy determines whether to skip or
|
|
415
|
-
* update.
|
|
416
|
-
*
|
|
417
|
-
* When `verifyOnChain` is true, records that include a `walletAddress` and
|
|
418
|
-
* `country` will be batch-verified on-chain after the database import.
|
|
419
|
-
*/
|
|
420
|
-
importRecords(records: SyncRecord[], options?: SyncOptions): Promise<SyncResult>;
|
|
421
|
-
/**
|
|
422
|
-
* Export all customers from Trusset as flat records.
|
|
423
|
-
* Useful for syncing data back into your system.
|
|
424
|
-
*/
|
|
425
|
-
exportRecords(options?: {
|
|
426
|
-
includeArchived?: boolean;
|
|
427
|
-
}): Promise<SyncRecord[]>;
|
|
428
|
-
private processRecord;
|
|
429
|
-
private runBatchVerification;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* Customer module providing full lifecycle management:
|
|
434
|
-
*
|
|
435
|
-
* - `manage` - CRUD operations, search, wallet linking
|
|
436
|
-
* - `identity` - On-chain KYC verification via IdentityRegistry
|
|
437
|
-
* - `idLinks` - Send and manage KYC verification links
|
|
438
|
-
* - `sync` - Bulk import/export for existing database integration
|
|
439
|
-
*/
|
|
440
|
-
declare class Customers {
|
|
441
|
-
readonly manage: CustomerManagement;
|
|
442
|
-
readonly identity: CustomerIdentity;
|
|
443
|
-
readonly idLinks: CustomerIdLinks;
|
|
444
|
-
readonly sync: CustomerSync;
|
|
445
|
-
constructor(http: HttpClient);
|
|
446
|
-
}
|
|
1
|
+
import { T as TrussetConfig, S as SignedStep } from './flow-Cz8A09rn.mjs';
|
|
2
|
+
export { A as ApiError, a as ApiResponse, C as ConfirmOptions, L as Logger, P as PaginationOptions, R as ResponseMetadata, b as SignOptions, c as SignedTransaction, d as TransactionSigner, U as UnsignedTransaction } from './flow-Cz8A09rn.mjs';
|
|
3
|
+
import { C as Customers, K as KycProofManifest, V as VerifyIdentityInput } from './index-Dl4U8vUM.mjs';
|
|
4
|
+
export { A as AddClaimInput, a as AddClaimResult, B as BatchVerifyEntry, b as BatchVerifyRejection, c as BatchVerifyResult, d as Claim, e as ClaimSignature, f as ClaimSigningRequest, g as ClaimType, h as ClaimsResult, i as ConfirmWith, j as CreateCustomerInput, k as CreateIdLinkInput, l as Customer, m as CustomerIdLinks, n as CustomerIdentity, o as CustomerManagement, p as CustomerStatus, q as CustomerSync, r as CustomerType, s as CustomerVerificationProfiles, I as IdLink, t as IdLinkListItem, u as IdLinkStatus, v as IdentityStatusResult, w as InvestorType, x as InvestorTypeInput, y as KYCStatus, z as KycProofLeaf, L as LinkWalletInput, D as LinkedWallet, E as LinkedWalletsResult, F as ListCustomersOptions, G as ListIdLinksOptions, O as OnChainIdentity, H as OnchainIdResult, P as PreparedAddClaim, J as PreparedAddClaimPlan, M as PreparedBatchEntry, N as PreparedBatchVerify, Q as PreparedBatchVerifyPlan, R as PreparedOnchainId, S as PreparedProofClaimStep, T as PreparedProofClaims, U as PreparedProofClaimsPlan, W as PreparedRevokeClaim, X as PreparedRevokeIdentity, Y as PreparedTransaction, Z as PreparedVerifyIdentity, _ as PreparedVerifyPlan, $ as ProfileRequiredField, a0 as ProofClaimOutcome, a1 as ProofClaimTxResult, a2 as ProofClaimsInput, a3 as ProofClaimsResult, a4 as ProofConfirmOptions, a5 as ProofVerificationInfo, a6 as RegisterKind, a7 as RegisterPhase, a8 as RegisterPlan, a9 as RegisterPlanInput, aa as RegisterPlanStep, ab as RevokeClaimResult, ac as RevokeIdentityResult, ad as SyncError, ae as SyncOptions, af as SyncRecord, ag as SyncResult, ah as TransferCheckInput, ai as TransferCheckResult, aj as UpdateCustomerInput, ak as VerificationProfile, al as VerifyIdentityResult } from './index-Dl4U8vUM.mjs';
|
|
5
|
+
import { Lending } from './modules/lending/index.mjs';
|
|
6
|
+
export { AcceptLenderRoleConfirmInput, AcceptLenderRoleInput, AccessListConfirmWith, AccessListDetail, AccessListDetailOptions, AccessListListOptions, AccessListManagerResult, AccessListMember, AccessListMembersResult, AccessListMembersSigned, AccessListMembersStep, AccessListOverview, AccessListOwnerResult, AccessListOwnerSignerInput, AccessListPurpose, AccessListRecord, AccessListRescanChange, AccessListRescanResult, AccessListWarning, AccessRoleKey, AccessRoleStatus, AddCollateralResult, AddLiquidityInput, AddLiquidityResult, AdminHandoverInput, AdminHandoverPlan, AdminHandoverScope, AdminHandoverStep, AnyAccessList, AssetDataAcknowledgementResult, AssetDataAttestationResult, AssetDataBundle, AssetDataBundleRead, AssetDataDescription, AssetDataOrigin, AssetDataPreview, AssetDataPreviewInput, AssetDataPriceSource, AssetDataProfileDrift, AssetDataRecord, AssetDataStatus, AtomicModeAlreadySet, AtomicModeInput, AtomicModeName, AtomicModeResult, AtomicModeWarning, AtomicReserve, AtomicSaleCore, AtomicSaleFigures, AtomicSaleState, AtomicSettlementSummary, AtomicSurplus, Auction, AuctionBidInput, AuctionBidResult, AuctionDetail, AuctionList, AuctionModuleStatus, AuctionModuleWiringStep, BorrowAsset, BorrowAssetList, BorrowMoreResult, Bot, BotAtomic, BotConfirmResult, BotConfirmWith, BotConnectUnchanged, BotConnection, BotDeployResult, BotDetail, BotList, BotListOptions, BotMarket, BotOnChain, BotRefundPolicyInput, BotStep, BotTransaction, BotTransactionsPage, BotTxType, BotWithdrawInput, CashflowAmount, CashflowReconciliation, ClaimEscrowedCollateralResult, ClaimSurplusResult, CloseLiquidationResult, CloseLoanResult, CollateralForSaleInput, CollateralForSaleResult, CollateralInput, CollateralMode, CollateralRelease, CollectDistributorFeesInput, ConfigureAction, ConfigureMarketConfirmInput, ConfigureMarketInput, ConnectedVault, ConnectedVaultList, CreateAccessListConfirmInput, CreateAccessListInput, CreateAccessListResult, CreateHookInput, CreatedHook, CustomerRef, DeclaredRealization, DeployBotConfirmInput, DeployBotInput, DeployMarketConfirmInput, DeployMarketInput, DeploymentAccessList, DeploymentGateProfile, DeploymentOptions, DepositorGate, DistributorFeeSweepResult, DocumentVisibility, DocumentWriteResult, EscrowedCollateral, EscrowedSurplus, ExecuteHookInput, ExecuteHookResult, ExitHorizon, ExitLiquidityStatus, ExtensionActivity, ExtensionConfirmResult, ExtensionKind, ExtensionList, ExtensionProposal, FeeAsset, FeeLegKey, FeeSplit, FeeSplitLeg, FeeSplitRemainderLeg, FixedPriceCheck, FixedPriceTerms, ForgottenStablecoin, FundImplementation, GuardrailWarning, HolderInput, Hook, HookActionType, HookAfterLiquidationInput, HookBuyPlan, HookCheckFrequency, HookCheckResult, HookCompareOp, HookDeliveriesPage, HookDelivery, HookEvaluatedRiskField, HookExecution, HookExecutionData, HookExecutionsPage, HookList, HookLoanParameter, HookParameterCheck, HookRiskField, HookType, IdentityGatesConfirmInput, IdentityGatesResult, InsuranceStatus, InsuranceTopUpConfirmInput, InsuranceTopUpInput, InsuranceTopUpRecord, InsuranceTopUpResult, InsuranceWithdrawInput, InsuranceWithdrawResult, LedgerEntry, LegalDocumentList, LenderAcceptanceResult, LenderAccessListGate, LenderAdoptionBuild, LenderClaimAnnouncement, LenderClaimCommitted, LenderRealizationMode, LendingAccessLists, LendingAssetData, LendingAuctions, LendingBots, LendingDocuments, LendingFees, LendingHooks, LendingInsurance, LendingLiquidations, LendingLiquidity, LendingLoans, LendingMarkets, LendingOperators, LendingOracle, LendingPledges, LendingRates, LendingTerms, LendingVaults, LifecycleStatementCategory, LifecycleStatementOptions, LiquidatableLoanTerm, LiquidatableLoans, LiquidateInput, LiquidationConfig, LiquidationMoney, LiquidationPriceSource, LiquidationReadSection, LiquidationReadiness, LiquidationRealization, LiquidationRecordInput, LiquidationReserveDraw, LiquidationResult, LiquidationSettlementAsset, LiquidationStats, LiquidationStatsOnChain, LiquidationStatus, LiquidationSurplusEvent, LiquidationTimeoutResult, LiquidityProvider, LiquidityProviderList, LoanAttribution, LoanAuction, LoanDetail, LoanIdInput, LoanOffering, LoanPayee, LoanTerm, ManagedAccessList, MarketAccessListStep, MarketAssetDataPreview, MarketBadDebt, MarketBlockedStep, MarketCalldataEntry, MarketCashflows, MarketChainDegraded, MarketChainLive, MarketChainState, MarketCollateralAuth, MarketConfig, MarketConfigInput, MarketConfigUpdateResult, MarketConfigView, MarketConfigurationResult, MarketConfigurationStatus, MarketCuratorOverlay, MarketDeploymentResult, MarketDetail, MarketDetailError, MarketExitHorizon, MarketFeeShareGeneration, MarketFeeSweepResult, MarketGateAccessList, MarketGateProfile, MarketGuardian, MarketGuardians, MarketHandover, MarketHandoverSatellite, MarketHistory, MarketHistoryIndexed, MarketHistoryNotIndexed, MarketHistoryOptions, MarketHistoryPoint, MarketHistoryRange, MarketHistoryTotals, MarketHistoryUnavailable, MarketHolderPlan, MarketIdentityGate, MarketIdentityGates, MarketIndexStatus, MarketIndexUnavailableReason, MarketLiquidationStats, MarketList, MarketListItem, MarketListOptions, MarketMaxBorrow, MarketNominations, MarketOfferingRead, MarketOnboarding, MarketOperator, MarketOracleReading, MarketOracleStatus, MarketOracleUnreadable, MarketPriceSource, MarketRealizationMode, MarketRecord, MarketRegister, MarketRegisterGeneration, MarketRegisterShape, MarketSatelliteUpgrade, MarketSetupStep, MarketSetupStepKey, MarketSetupSteps, MarketSupplyCaps, MarketTermConfigState, MarketTerms, MarketTermsBase, MarketTermsRead, MarketThresholdStep, MarketTransaction, MarketTransactionPage, MarketUpgradeFeeModel, MarketUpgradePerimeter, MarketUpgradeResult, MarketUpgradeStatus, MarketUpgradeTarget, MarketVaultDepositAttribution, MarketVaultDepositInput, MarketVaultReRegistration, MarketVaultRedeemInput, MarketVaultRef, MarketVaultResult, MarketVaultRoom, MarketVaultWarning, MarketWiring, MarketWiringStatus, OfferingConfirmResult, OfferingRequiredRole, OfferingTransaction, OnChainLoan, OpenFee, OpenLoanConfirmInput, OpenLoanInput, OpenLoanResult, OpenTermedLoansWarning, OperatorFeeSweepResult, OperatorMarketFees, OperatorWalletRotationResult, OracleHistory, OracleHistoryOptions, OracleSignerCheck, OracleStatus, OracleStatusLive, OracleStatusUnreadable, OracleSyncInput, OracleSyncResult, OwnAccessList, PartialSaleInput, PartialSaleResult, PauseSigner, PauseStateResult, PayDistributorInput, PayerNotCheckedWarning, PendingLiquidationRow, PendingLiquidations, PendingMarket, PendingMarketOptions, PendingMarketPage, PermitMessage, PermitQuote, PermitQuoteInput, Pledge, PledgeChange, PledgeList, PledgeListOptions, Position, PositionCompliance, PositionDetail, PositionList, PositionStatus, PreparedAccessListManager, PreparedAccessListMembers, PreparedAccessListOwner, PreparedAddCollateral, PreparedAddLiquidity, PreparedAllowExtension, PreparedAssetDataAcknowledgement, PreparedAssetDataAttestation, PreparedAtomicMode, PreparedAuctionBid, PreparedAuctionModule, PreparedAuctionModuleDeploy, PreparedAuctionModuleWiring, PreparedBorrowMore, PreparedBotConnect, PreparedBotDeploy, PreparedBotFund, PreparedBotPause, PreparedBotRefundPolicy, PreparedBotWithdraw, PreparedClaimEscrowedCollateral, PreparedClaimSurplus, PreparedCloseLiquidation, PreparedCloseLoan, PreparedCollateralForSale, PreparedCreateAccessList, PreparedDistributorFeeSweep, PreparedDocumentWrite, PreparedExtensionAction, PreparedExtensionProposal, PreparedIdentityGates, PreparedInsuranceTopUp, PreparedInsuranceWithdraw, PreparedLenderAcceptance, PreparedLiquidation, PreparedLiquidationTimeout, PreparedMarketConfigUpdate, PreparedMarketConfiguration, PreparedMarketDeployment, PreparedMarketFeeSweep, PreparedMarketUpgrade, PreparedMarketVaultDeposit, PreparedMarketVaultRedeem, PreparedMaxFixedRate, PreparedNomination, PreparedOpenLoan, PreparedOperatorFeeSweep, PreparedOperatorWalletRotation, PreparedOracleSync, PreparedOracleSyncAttested, PreparedOracleSyncPlain, PreparedPartialSale, PreparedPauseState, PreparedPriceHalt, PreparedRateMode, PreparedRemoveLiquidity, PreparedReopenLiquidation, PreparedRepay, PreparedRepayPlan, PreparedRepayWithPermit, PreparedReserveRatio, PreparedRoleChange, PreparedSaleBid, PreparedSellLiquidation, PreparedSettleExpiredAuction, PreparedSettleLiquidation, PreparedTermConfig, PreparedVaultDeposit, PreparedVaultDistributorAction, PreparedVaultGroupDeposit, PreparedVaultLiquidityChange, PreparedVaultRedeem, PreparedWithdrawCollateral, PriceAttestation, PriceAttestationInput, PriceAttestationResult, PriceGatedInput, PriceHaltAction, PriceHaltResult, PriceHaltState, PriceSignatureDisplay, PriceSignatureRequest, PriceUpdateMessage, PriceVerification, ProposeExtensionInput, ProviderBalance, PushedPriceEntry, QueueAccessListGate, QueueOrigin, QueuedMarket, QueuedMarketDetails, QueuedMarketList, RateMode, RateModeStatus, RealizationLoss, RegisteredVault, RegistryDocument, RemoveLegalDocumentInput, RemoveLiquidityInput, RemoveLiquidityResult, ReopenLiquidationResult, RepayApproval, RepayConfirmInput, RepayFee, RepayForecast, RepayInput, RepayMode, RepayPermit, RepayRemainder, RepayResult, ReserveDisclosure, ReserveWithdrawalAction, ReserveWithdrawalNotice, RoleAction, RoleChangeResult, RoleSigner, RoleUnchanged, RotateOperatorWalletInput, RotatedHookSecret, RouterLiquidationRecord, RouterSettlementSummary, RouterStats, RouterUpgradeStatus, SaleBasis, SaleBidFigures, SaleBidInput, SaleBidResult, SaleBidWarning, SaleFactorPair, SaveTermsInput, SaveTermsResult, SavedMarketTerms, SavedStablecoinList, SellLiquidationInput, SellLiquidationResult, SetAccessListManagerInput, SetAccessListMembersInput, SetAccessRoleInput, SetDistributorApprovalInput, SetDistributorWalletInput, SetIdentityGatesInput, SetLegalDocumentInput, SetLiquidatorRoleInput, SetPriceHaltInput, SetRateModeInput, SetTermConfigInput, SettleExpiredAuctionInput, SettleExpiredAuctionResult, SettleLiquidationInput, SettleLiquidationResult, SettledLiquidations, SignPriceInput, SignedPriceAttestation, SignedPriceEntry, SignerQuery, StageLegalDocumentInput, StagedDocument, StagedDocumentResult, StandingPolicySummary, TermConfigStatus, TermFloorExposure, TermFloorExposureWarning, TermStamping, TermsAuthority, TermsBinding, TermsExportFormat, TermsFormat, TermsVersionList, TermsVersionRead, TermsVersionSummary, ThisInstanceDrift, ThresholdCooldown, UnpublishTermsResult, UpdateAccessListInput, UpdateAccessListResult, UpdateBotInput, UpdateBotResult, UpdateHookInput, UpgradeAction, UpgradeAuthority, UpgradeFeeModelImpact, UpgradeMarketInput, UpgradeNotice, UploadLegalDocumentInput, UploadedLegalDocument, VaultAccessListRef, VaultAllocation, VaultAmount, VaultApproximateTotal, VaultConfirmResult, VaultDepositAttribution, VaultDepositInput, VaultDepositStep, VaultDetail, VaultDistributorFunction, VaultDistributorResult, VaultDistributorStep, VaultDraw, VaultEarnings, VaultEarningsBase, VaultEarningsSupported, VaultExitHorizon, VaultFeeNotice, VaultGateProfile, VaultGroupDepositConfirmInput, VaultGroupDepositInput, VaultGroupDetail, VaultGroupForPocket, VaultGroupSummary, VaultHolderPosition, VaultImpairment, VaultImplementationState, VaultInterest, VaultJitLiquidity, VaultJitMarket, VaultJitReadiness, VaultLedgerEntry, VaultLedgerTxType, VaultLiquidityStatus, VaultList, VaultListRow, VaultNamedAccount, VaultNetwork, VaultOnChainState, VaultOnChainStateFailed, VaultOnChainStateOk, VaultOperatedBy, VaultPosition, VaultRedeemInput, VaultRedemptionResidual, VaultRoleLedgerChange, VaultRoles, VaultRolesOk, VaultRolesUnreadable, VaultRow, VaultTransactionsOptions, VaultTransactionsPage, VaultTvlBucket, WalletCollateral, WalletLoans, WalletPrompts, WireAuctionModuleInput, WireAuctionModuleResult, WithdrawCollateralResult } from './modules/lending/index.mjs';
|
|
7
|
+
import { Tokens } from './modules/tokens/index.mjs';
|
|
8
|
+
export { DetectTokenInput, DetectedToken, ImportTokenInput, ImportedToken, InstrumentAssertion, InstrumentAuthority, InstrumentDocument, InstrumentDocumentInput, InstrumentDocumentType, InstrumentField, InstrumentFieldSpec, InstrumentFields, InstrumentInput, InstrumentRecord, InstrumentRelease, InstrumentScheduleEntry, InstrumentSchema, InstrumentSecurityClass, InstrumentView, IssuerApproval, IssuerApprovalRequest, SaveInstrumentInput, SavedInstrument, TokenAssetStandard, TokenAssetType, TokenAssetTypeChange, TokenAuthority, TokenDetails, TokenFramework, TokenHolderCount, TokenHolderCounts, TokenImageUpdate, TokenImport, TokenLendingEligibility, TokenListEntry, TokenListOptions, TokenOnchainDocument, TokenOnchainState, TokenPresentation, TokenProfile, TokenProfileDocument, TokenProfileUpdate, TokenRecordSummary, TokenRedetect, TokenRefresh, TokenRemoval, TokenUpload, TokenUploadOptions } from './modules/tokens/index.mjs';
|
|
9
|
+
export { A as ApprovalStep, D as Decimal, I as IsoDate, L as LendingConfirmWith, a as LendingDocument, b as LendingTransaction, R as RawAmount, S as Signed, c as SignedPrice, d as SignerDisclosure, e as StepsPayload, f as SubmittedTransactions, T as TransactionPayload, g as TransactionStep, h as TypedData, i as TypedDataDomain, j as TypedDataField, U as UnixSeconds } from './base-BYEauvBZ.mjs';
|
|
447
10
|
|
|
448
11
|
/**
|
|
449
12
|
* Trusset SDK client.
|
|
@@ -465,15 +28,37 @@ declare class Customers {
|
|
|
465
28
|
*/
|
|
466
29
|
declare class TrussetClient {
|
|
467
30
|
readonly customers: Customers;
|
|
31
|
+
readonly lending: Lending;
|
|
32
|
+
readonly tokens: Tokens;
|
|
468
33
|
private readonly http;
|
|
469
34
|
constructor(config: TrussetConfig);
|
|
470
35
|
}
|
|
471
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Map a KYC proof bundle manifest (the `manifest.json` written per subject by
|
|
39
|
+
* the trusset-kyc-zk-proofs tool) to a `verify()` request.
|
|
40
|
+
*
|
|
41
|
+
* The wallet address, root hash, and - when present - the verification
|
|
42
|
+
* parameters from the manifest's `passthrough` block (country, investorType,
|
|
43
|
+
* expiry days) are used as-is. `overrides` win over passthrough values.
|
|
44
|
+
* The root hash itself cannot be overridden: it must match the manifest,
|
|
45
|
+
* otherwise `addClaimsFromProof` would fail later with HASH_MISMATCH.
|
|
46
|
+
*/
|
|
47
|
+
declare function manifestToVerifyInput(manifest: KycProofManifest, overrides?: Omit<Partial<VerifyIdentityInput>, 'kycHash' | 'kycData'>): VerifyIdentityInput;
|
|
48
|
+
|
|
49
|
+
interface TrussetErrorInfo {
|
|
50
|
+
details?: unknown;
|
|
51
|
+
data?: Record<string, unknown> | null;
|
|
52
|
+
retryAfter?: number | null;
|
|
53
|
+
}
|
|
472
54
|
declare class TrussetError extends Error {
|
|
473
55
|
readonly code: string;
|
|
474
56
|
readonly statusCode: number;
|
|
475
57
|
readonly requestId: string | null;
|
|
476
|
-
|
|
58
|
+
readonly details: unknown;
|
|
59
|
+
readonly data: Record<string, unknown> | null;
|
|
60
|
+
readonly retryAfter: number | null;
|
|
61
|
+
constructor(message: string, code: string, statusCode: number, requestId?: string, info?: TrussetErrorInfo);
|
|
477
62
|
}
|
|
478
63
|
declare class AuthError extends TrussetError {
|
|
479
64
|
constructor(message: string, requestId?: string);
|
|
@@ -484,5 +69,11 @@ declare class ValidationError extends TrussetError {
|
|
|
484
69
|
declare class NetworkError extends TrussetError {
|
|
485
70
|
constructor(message: string);
|
|
486
71
|
}
|
|
72
|
+
declare class ConfirmationError extends TrussetError {
|
|
73
|
+
readonly transactions: SignedStep[];
|
|
74
|
+
readonly txHash: string | null;
|
|
75
|
+
readonly failure: unknown;
|
|
76
|
+
constructor(message: string, code: 'CONFIRMATION_FAILED' | 'TRANSACTION_FAILED', transactions: SignedStep[], txHash: string | null, failure: unknown);
|
|
77
|
+
}
|
|
487
78
|
|
|
488
|
-
export {
|
|
79
|
+
export { AuthError, ConfirmationError, Customers, KycProofManifest, Lending, NetworkError, SignedStep, Tokens, TrussetClient, TrussetConfig, TrussetError, ValidationError, VerifyIdentityInput, manifestToVerifyInput };
|