@clossir-tech/ts-sdk 0.11.1 → 0.11.3
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 +36 -34
- package/esm/funcs/accounts-get-accounts-deposit-addresses.d.ts +20 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.d.ts.map +1 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.js +94 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.js.map +1 -0
- package/esm/funcs/organizations-get-orgs-by-org-id-issuer.d.ts +1 -1
- package/esm/funcs/organizations-get-orgs-by-org-id-issuer.js +4 -2
- package/esm/funcs/organizations-get-orgs-by-org-id-issuer.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.d.ts +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js +2 -2
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/funcs/organizations-put-orgs-by-org-id-compliance.d.ts +1 -1
- package/esm/funcs/organizations-put-orgs-by-org-id-compliance.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/get-accounts-deposit-addresses.d.ts +146 -0
- package/esm/models/operations/get-accounts-deposit-addresses.d.ts.map +1 -0
- package/esm/models/operations/get-accounts-deposit-addresses.js +117 -0
- package/esm/models/operations/get-accounts-deposit-addresses.js.map +1 -0
- package/esm/models/operations/get-orgs-by-org-id-issuer.d.ts +30 -1
- package/esm/models/operations/get-orgs-by-org-id-issuer.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-issuer.js +28 -1
- package/esm/models/operations/get-orgs-by-org-id-issuer.js.map +1 -1
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/post-attestations.d.ts +1 -1
- package/esm/models/operations/post-orgs-by-org-id-issuer-register.d.ts +23 -1
- package/esm/models/operations/post-orgs-by-org-id-issuer-register.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-issuer-register.js +26 -1
- package/esm/models/operations/post-orgs-by-org-id-issuer-register.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts +9 -5
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/sdk/accounts.d.ts +7 -0
- package/esm/sdk/accounts.d.ts.map +1 -1
- package/esm/sdk/accounts.js +10 -0
- package/esm/sdk/accounts.js.map +1 -1
- package/esm/sdk/organizations.d.ts +3 -3
- package/esm/sdk/organizations.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accounts-get-accounts-deposit-addresses.ts +193 -0
- package/src/funcs/organizations-get-orgs-by-org-id-issuer.ts +5 -2
- package/src/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.ts +2 -2
- package/src/funcs/organizations-put-orgs-by-org-id-compliance.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/operations/get-accounts-deposit-addresses.ts +346 -0
- package/src/models/operations/get-orgs-by-org-id-issuer.ts +70 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/post-attestations.ts +1 -1
- package/src/models/operations/post-orgs-by-org-id-issuer-register.ts +60 -2
- package/src/models/operations/post-orgs-by-org-id-members-by-user-id-attest.ts +10 -6
- package/src/sdk/accounts.ts +18 -0
- package/src/sdk/organizations.ts +3 -3
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type GetAccountsDepositAddressesRequest = {
|
|
14
|
+
assetId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Address2 = {
|
|
18
|
+
/**
|
|
19
|
+
* Wallet row id
|
|
20
|
+
*/
|
|
21
|
+
walletId: string;
|
|
22
|
+
/**
|
|
23
|
+
* LayerZero endpoint id, as a decimal string
|
|
24
|
+
*/
|
|
25
|
+
chainEid: string;
|
|
26
|
+
deployed: false;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type FinalityBlocks = string | number;
|
|
30
|
+
|
|
31
|
+
export const NotReceivableReasonOther = {
|
|
32
|
+
Other: "other",
|
|
33
|
+
} as const;
|
|
34
|
+
export type NotReceivableReasonOther = ClosedEnum<
|
|
35
|
+
typeof NotReceivableReasonOther
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export const NotReceivableReasonJurisdiction = {
|
|
39
|
+
Jurisdiction: "jurisdiction",
|
|
40
|
+
} as const;
|
|
41
|
+
export type NotReceivableReasonJurisdiction = ClosedEnum<
|
|
42
|
+
typeof NotReceivableReasonJurisdiction
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export const NotReceivableReasonLevelTooLow = {
|
|
46
|
+
LevelTooLow: "level-too-low",
|
|
47
|
+
} as const;
|
|
48
|
+
export type NotReceivableReasonLevelTooLow = ClosedEnum<
|
|
49
|
+
typeof NotReceivableReasonLevelTooLow
|
|
50
|
+
>;
|
|
51
|
+
|
|
52
|
+
export const NotReceivableReasonAttestationExpired = {
|
|
53
|
+
AttestationExpired: "attestation-expired",
|
|
54
|
+
} as const;
|
|
55
|
+
export type NotReceivableReasonAttestationExpired = ClosedEnum<
|
|
56
|
+
typeof NotReceivableReasonAttestationExpired
|
|
57
|
+
>;
|
|
58
|
+
|
|
59
|
+
export const NotReceivableReasonNoAttestation = {
|
|
60
|
+
NoAttestation: "no-attestation",
|
|
61
|
+
} as const;
|
|
62
|
+
export type NotReceivableReasonNoAttestation = ClosedEnum<
|
|
63
|
+
typeof NotReceivableReasonNoAttestation
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
export type NotReceivableReason =
|
|
67
|
+
| NotReceivableReasonNoAttestation
|
|
68
|
+
| NotReceivableReasonAttestationExpired
|
|
69
|
+
| NotReceivableReasonLevelTooLow
|
|
70
|
+
| NotReceivableReasonJurisdiction
|
|
71
|
+
| NotReceivableReasonOther;
|
|
72
|
+
|
|
73
|
+
export type Inbound = {
|
|
74
|
+
/**
|
|
75
|
+
* Transaction hash, lowercase 0x hex
|
|
76
|
+
*/
|
|
77
|
+
txHash: string;
|
|
78
|
+
/**
|
|
79
|
+
* Amount in whole units, as a decimal string
|
|
80
|
+
*/
|
|
81
|
+
amount: string;
|
|
82
|
+
/**
|
|
83
|
+
* The block's timestamp, as an ISO 8601 instant
|
|
84
|
+
*/
|
|
85
|
+
at: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type Address1 = {
|
|
89
|
+
/**
|
|
90
|
+
* Wallet row id
|
|
91
|
+
*/
|
|
92
|
+
walletId: string;
|
|
93
|
+
/**
|
|
94
|
+
* LayerZero endpoint id, as a decimal string
|
|
95
|
+
*/
|
|
96
|
+
chainEid: string;
|
|
97
|
+
deployed: true;
|
|
98
|
+
/**
|
|
99
|
+
* EIP-55 checksummed address
|
|
100
|
+
*/
|
|
101
|
+
address: string;
|
|
102
|
+
/**
|
|
103
|
+
* The level of the wallet's active attestation on this chain, or null when none
|
|
104
|
+
*/
|
|
105
|
+
attestedLevel: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Blocks after which a deposit on this chain is treated as final. Null when no depth is stated for the chain; never a default.
|
|
108
|
+
*/
|
|
109
|
+
finalityBlocks: string | number | null;
|
|
110
|
+
/**
|
|
111
|
+
* Deposits bridged from another chain are queued while this is true. After the token is unpaused they must be replayed; a queued deposit that the token refuses at replay, or that the owner drops, is not delivered. Deposits sent on this chain are not affected. A paused token also cannot send to another chain. `null` means not read or not applicable.
|
|
112
|
+
*/
|
|
113
|
+
inboundBridgePaused: boolean | null;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the chain will accept a transfer of this asset to this wallet. Null when it could not be read: unknown, never true.
|
|
116
|
+
*/
|
|
117
|
+
receivable: boolean | null;
|
|
118
|
+
/**
|
|
119
|
+
* Why not, when receivable is false. Null otherwise.
|
|
120
|
+
*/
|
|
121
|
+
notReceivableReason:
|
|
122
|
+
| NotReceivableReasonNoAttestation
|
|
123
|
+
| NotReceivableReasonAttestationExpired
|
|
124
|
+
| NotReceivableReasonLevelTooLow
|
|
125
|
+
| NotReceivableReasonJurisdiction
|
|
126
|
+
| NotReceivableReasonOther
|
|
127
|
+
| null;
|
|
128
|
+
/**
|
|
129
|
+
* The most recent transfers in, newest first, at most 5
|
|
130
|
+
*/
|
|
131
|
+
inbound: Array<Inbound>;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type AddressUnion = Address1 | Address2;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Response
|
|
138
|
+
*/
|
|
139
|
+
export type GetAccountsDepositAddressesResponse = {
|
|
140
|
+
/**
|
|
141
|
+
* One row per own wallet per chain of the asset
|
|
142
|
+
*/
|
|
143
|
+
addresses: Array<Address1 | Address2>;
|
|
144
|
+
/**
|
|
145
|
+
* True when the inbound lists may be missing transfers. An empty inbound list beside true is not 'no deposits'.
|
|
146
|
+
*/
|
|
147
|
+
historyStale: boolean;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export type GetAccountsDepositAddressesRequest$Outbound = {
|
|
152
|
+
assetId: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const GetAccountsDepositAddressesRequest$outboundSchema: z.ZodMiniType<
|
|
157
|
+
GetAccountsDepositAddressesRequest$Outbound,
|
|
158
|
+
GetAccountsDepositAddressesRequest
|
|
159
|
+
> = z.object({
|
|
160
|
+
assetId: z.string(),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export function getAccountsDepositAddressesRequestToJSON(
|
|
164
|
+
getAccountsDepositAddressesRequest: GetAccountsDepositAddressesRequest,
|
|
165
|
+
): string {
|
|
166
|
+
return JSON.stringify(
|
|
167
|
+
GetAccountsDepositAddressesRequest$outboundSchema.parse(
|
|
168
|
+
getAccountsDepositAddressesRequest,
|
|
169
|
+
),
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const Address2$inboundSchema: z.ZodMiniType<Address2, unknown> = z
|
|
175
|
+
.object({
|
|
176
|
+
walletId: types.string(),
|
|
177
|
+
chainEid: types.string(),
|
|
178
|
+
deployed: types.literal(false),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export function address2FromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<Address2, SDKValidationError> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) => Address2$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'Address2' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const FinalityBlocks$inboundSchema: z.ZodMiniType<
|
|
193
|
+
FinalityBlocks,
|
|
194
|
+
unknown
|
|
195
|
+
> = smartUnion([types.string(), types.number()]);
|
|
196
|
+
|
|
197
|
+
export function finalityBlocksFromJSON(
|
|
198
|
+
jsonString: string,
|
|
199
|
+
): SafeParseResult<FinalityBlocks, SDKValidationError> {
|
|
200
|
+
return safeParse(
|
|
201
|
+
jsonString,
|
|
202
|
+
(x) => FinalityBlocks$inboundSchema.parse(JSON.parse(x)),
|
|
203
|
+
`Failed to parse 'FinalityBlocks' from JSON`,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
export const NotReceivableReasonOther$inboundSchema: z.ZodMiniEnum<
|
|
209
|
+
typeof NotReceivableReasonOther
|
|
210
|
+
> = z.enum(NotReceivableReasonOther);
|
|
211
|
+
|
|
212
|
+
/** @internal */
|
|
213
|
+
export const NotReceivableReasonJurisdiction$inboundSchema: z.ZodMiniEnum<
|
|
214
|
+
typeof NotReceivableReasonJurisdiction
|
|
215
|
+
> = z.enum(NotReceivableReasonJurisdiction);
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export const NotReceivableReasonLevelTooLow$inboundSchema: z.ZodMiniEnum<
|
|
219
|
+
typeof NotReceivableReasonLevelTooLow
|
|
220
|
+
> = z.enum(NotReceivableReasonLevelTooLow);
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const NotReceivableReasonAttestationExpired$inboundSchema: z.ZodMiniEnum<
|
|
224
|
+
typeof NotReceivableReasonAttestationExpired
|
|
225
|
+
> = z.enum(NotReceivableReasonAttestationExpired);
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export const NotReceivableReasonNoAttestation$inboundSchema: z.ZodMiniEnum<
|
|
229
|
+
typeof NotReceivableReasonNoAttestation
|
|
230
|
+
> = z.enum(NotReceivableReasonNoAttestation);
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const NotReceivableReason$inboundSchema: z.ZodMiniType<
|
|
234
|
+
NotReceivableReason,
|
|
235
|
+
unknown
|
|
236
|
+
> = smartUnion([
|
|
237
|
+
NotReceivableReasonNoAttestation$inboundSchema,
|
|
238
|
+
NotReceivableReasonAttestationExpired$inboundSchema,
|
|
239
|
+
NotReceivableReasonLevelTooLow$inboundSchema,
|
|
240
|
+
NotReceivableReasonJurisdiction$inboundSchema,
|
|
241
|
+
NotReceivableReasonOther$inboundSchema,
|
|
242
|
+
]);
|
|
243
|
+
|
|
244
|
+
export function notReceivableReasonFromJSON(
|
|
245
|
+
jsonString: string,
|
|
246
|
+
): SafeParseResult<NotReceivableReason, SDKValidationError> {
|
|
247
|
+
return safeParse(
|
|
248
|
+
jsonString,
|
|
249
|
+
(x) => NotReceivableReason$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
+
`Failed to parse 'NotReceivableReason' from JSON`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const Inbound$inboundSchema: z.ZodMiniType<Inbound, unknown> = z.object({
|
|
256
|
+
txHash: types.string(),
|
|
257
|
+
amount: types.string(),
|
|
258
|
+
at: types.string(),
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
export function inboundFromJSON(
|
|
262
|
+
jsonString: string,
|
|
263
|
+
): SafeParseResult<Inbound, SDKValidationError> {
|
|
264
|
+
return safeParse(
|
|
265
|
+
jsonString,
|
|
266
|
+
(x) => Inbound$inboundSchema.parse(JSON.parse(x)),
|
|
267
|
+
`Failed to parse 'Inbound' from JSON`,
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
export const Address1$inboundSchema: z.ZodMiniType<Address1, unknown> = z
|
|
273
|
+
.object({
|
|
274
|
+
walletId: types.string(),
|
|
275
|
+
chainEid: types.string(),
|
|
276
|
+
deployed: types.literal(true),
|
|
277
|
+
address: types.string(),
|
|
278
|
+
attestedLevel: types.nullable(types.string()),
|
|
279
|
+
finalityBlocks: types.nullable(
|
|
280
|
+
smartUnion([types.string(), types.number()]),
|
|
281
|
+
),
|
|
282
|
+
inboundBridgePaused: types.nullable(types.boolean()),
|
|
283
|
+
receivable: types.nullable(types.boolean()),
|
|
284
|
+
notReceivableReason: types.nullable(
|
|
285
|
+
smartUnion([
|
|
286
|
+
NotReceivableReasonNoAttestation$inboundSchema,
|
|
287
|
+
NotReceivableReasonAttestationExpired$inboundSchema,
|
|
288
|
+
NotReceivableReasonLevelTooLow$inboundSchema,
|
|
289
|
+
NotReceivableReasonJurisdiction$inboundSchema,
|
|
290
|
+
NotReceivableReasonOther$inboundSchema,
|
|
291
|
+
]),
|
|
292
|
+
),
|
|
293
|
+
inbound: z.array(z.lazy(() => Inbound$inboundSchema)),
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
export function address1FromJSON(
|
|
297
|
+
jsonString: string,
|
|
298
|
+
): SafeParseResult<Address1, SDKValidationError> {
|
|
299
|
+
return safeParse(
|
|
300
|
+
jsonString,
|
|
301
|
+
(x) => Address1$inboundSchema.parse(JSON.parse(x)),
|
|
302
|
+
`Failed to parse 'Address1' from JSON`,
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** @internal */
|
|
307
|
+
export const AddressUnion$inboundSchema: z.ZodMiniType<AddressUnion, unknown> =
|
|
308
|
+
smartUnion([
|
|
309
|
+
z.lazy(() => Address1$inboundSchema),
|
|
310
|
+
z.lazy(() => Address2$inboundSchema),
|
|
311
|
+
]);
|
|
312
|
+
|
|
313
|
+
export function addressUnionFromJSON(
|
|
314
|
+
jsonString: string,
|
|
315
|
+
): SafeParseResult<AddressUnion, SDKValidationError> {
|
|
316
|
+
return safeParse(
|
|
317
|
+
jsonString,
|
|
318
|
+
(x) => AddressUnion$inboundSchema.parse(JSON.parse(x)),
|
|
319
|
+
`Failed to parse 'AddressUnion' from JSON`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const GetAccountsDepositAddressesResponse$inboundSchema: z.ZodMiniType<
|
|
325
|
+
GetAccountsDepositAddressesResponse,
|
|
326
|
+
unknown
|
|
327
|
+
> = z.object({
|
|
328
|
+
addresses: z.array(
|
|
329
|
+
smartUnion([
|
|
330
|
+
z.lazy(() => Address1$inboundSchema),
|
|
331
|
+
z.lazy(() => Address2$inboundSchema),
|
|
332
|
+
]),
|
|
333
|
+
),
|
|
334
|
+
historyStale: types.boolean(),
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
export function getAccountsDepositAddressesResponseFromJSON(
|
|
338
|
+
jsonString: string,
|
|
339
|
+
): SafeParseResult<GetAccountsDepositAddressesResponse, SDKValidationError> {
|
|
340
|
+
return safeParse(
|
|
341
|
+
jsonString,
|
|
342
|
+
(x) =>
|
|
343
|
+
GetAccountsDepositAddressesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
344
|
+
`Failed to parse 'GetAccountsDepositAddressesResponse' from JSON`,
|
|
345
|
+
);
|
|
346
|
+
}
|
|
@@ -18,13 +18,38 @@ export type GetOrgsByOrgIdIssuerRequest = {
|
|
|
18
18
|
orgId: string;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
export type GetOrgsByOrgIdIssuerIssuer = {
|
|
22
|
+
/**
|
|
23
|
+
* Issuer record id.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Issuer display name.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
organizationId: string | null;
|
|
31
|
+
maxKycLevel: number | null;
|
|
32
|
+
canRevokeOthers: boolean | null;
|
|
33
|
+
isActive: boolean | null;
|
|
34
|
+
chainAddresses: { [k: string]: string } | null;
|
|
35
|
+
createdAt: string | null;
|
|
36
|
+
updatedAt: string | null;
|
|
37
|
+
};
|
|
38
|
+
|
|
21
39
|
/**
|
|
22
40
|
* Response
|
|
23
41
|
*/
|
|
24
42
|
export type GetOrgsByOrgIdIssuerResponse = {
|
|
25
43
|
registered: boolean;
|
|
26
|
-
issuer
|
|
44
|
+
issuer: GetOrgsByOrgIdIssuerIssuer | null;
|
|
45
|
+
/**
|
|
46
|
+
* Markets the platform operates in.
|
|
47
|
+
*/
|
|
27
48
|
coveredJurisdictions: Array<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Markets covered by this organization's accepted legal opinions — the list asset creation is checked against; empty when none is on file.
|
|
51
|
+
*/
|
|
52
|
+
opinionCoveredJurisdictions: Array<string>;
|
|
28
53
|
};
|
|
29
54
|
|
|
30
55
|
/** @internal */
|
|
@@ -75,6 +100,45 @@ export function getOrgsByOrgIdIssuerRequestToJSON(
|
|
|
75
100
|
);
|
|
76
101
|
}
|
|
77
102
|
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const GetOrgsByOrgIdIssuerIssuer$inboundSchema: z.ZodMiniType<
|
|
105
|
+
GetOrgsByOrgIdIssuerIssuer,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.pipe(
|
|
108
|
+
z.object({
|
|
109
|
+
id: types.string(),
|
|
110
|
+
name: types.string(),
|
|
111
|
+
organization_id: types.nullable(types.string()),
|
|
112
|
+
max_kyc_level: types.nullable(types.number()),
|
|
113
|
+
can_revoke_others: types.nullable(types.boolean()),
|
|
114
|
+
is_active: types.nullable(types.boolean()),
|
|
115
|
+
chain_addresses: types.nullable(z.record(z.string(), types.string())),
|
|
116
|
+
created_at: types.nullable(types.string()),
|
|
117
|
+
updated_at: types.nullable(types.string()),
|
|
118
|
+
}),
|
|
119
|
+
z.transform((v) => {
|
|
120
|
+
return remap$(v, {
|
|
121
|
+
"organization_id": "organizationId",
|
|
122
|
+
"max_kyc_level": "maxKycLevel",
|
|
123
|
+
"can_revoke_others": "canRevokeOthers",
|
|
124
|
+
"is_active": "isActive",
|
|
125
|
+
"chain_addresses": "chainAddresses",
|
|
126
|
+
"created_at": "createdAt",
|
|
127
|
+
"updated_at": "updatedAt",
|
|
128
|
+
});
|
|
129
|
+
}),
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
export function getOrgsByOrgIdIssuerIssuerFromJSON(
|
|
133
|
+
jsonString: string,
|
|
134
|
+
): SafeParseResult<GetOrgsByOrgIdIssuerIssuer, SDKValidationError> {
|
|
135
|
+
return safeParse(
|
|
136
|
+
jsonString,
|
|
137
|
+
(x) => GetOrgsByOrgIdIssuerIssuer$inboundSchema.parse(JSON.parse(x)),
|
|
138
|
+
`Failed to parse 'GetOrgsByOrgIdIssuerIssuer' from JSON`,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
78
142
|
/** @internal */
|
|
79
143
|
export const GetOrgsByOrgIdIssuerResponse$inboundSchema: z.ZodMiniType<
|
|
80
144
|
GetOrgsByOrgIdIssuerResponse,
|
|
@@ -82,12 +146,16 @@ export const GetOrgsByOrgIdIssuerResponse$inboundSchema: z.ZodMiniType<
|
|
|
82
146
|
> = z.pipe(
|
|
83
147
|
z.object({
|
|
84
148
|
registered: types.boolean(),
|
|
85
|
-
issuer:
|
|
149
|
+
issuer: types.nullable(
|
|
150
|
+
z.lazy(() => GetOrgsByOrgIdIssuerIssuer$inboundSchema),
|
|
151
|
+
),
|
|
86
152
|
covered_jurisdictions: z.array(types.string()),
|
|
153
|
+
opinion_covered_jurisdictions: z.array(types.string()),
|
|
87
154
|
}),
|
|
88
155
|
z.transform((v) => {
|
|
89
156
|
return remap$(v, {
|
|
90
157
|
"covered_jurisdictions": "coveredJurisdictions",
|
|
158
|
+
"opinion_covered_jurisdictions": "opinionCoveredJurisdictions",
|
|
91
159
|
});
|
|
92
160
|
}),
|
|
93
161
|
);
|
|
@@ -14,6 +14,7 @@ export * from "./delete-orgs-by-org-id-issuer.js";
|
|
|
14
14
|
export * from "./delete-orgs-by-org-id-members-by-user-id.js";
|
|
15
15
|
export * from "./delete-orgs-by-org-id-oauth-clients-by-client-id.js";
|
|
16
16
|
export * from "./get-accounts-cash-assets.js";
|
|
17
|
+
export * from "./get-accounts-deposit-addresses.js";
|
|
17
18
|
export * from "./get-accounts-evm.js";
|
|
18
19
|
export * from "./get-accounts-fills.js";
|
|
19
20
|
export * from "./get-accounts-holdings-history.js";
|
|
@@ -31,7 +31,7 @@ export type PostAttestationsRequest = {
|
|
|
31
31
|
*/
|
|
32
32
|
kycLevel?: number | undefined;
|
|
33
33
|
/**
|
|
34
|
-
* Ignored. Jurisdiction is not self-asserted
|
|
34
|
+
* Ignored. Jurisdiction is not self-asserted.
|
|
35
35
|
*
|
|
36
36
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
37
37
|
*/
|
|
@@ -25,6 +25,24 @@ export type PostOrgsByOrgIdIssuerRegisterRequest = {
|
|
|
25
25
|
body: PostOrgsByOrgIdIssuerRegisterRequestBody;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
+
export type PostOrgsByOrgIdIssuerRegisterIssuer = {
|
|
29
|
+
/**
|
|
30
|
+
* Issuer record id.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* Issuer display name.
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
organizationId: string | null;
|
|
38
|
+
maxKycLevel: number | null;
|
|
39
|
+
canRevokeOthers: boolean | null;
|
|
40
|
+
isActive: boolean | null;
|
|
41
|
+
chainAddresses: { [k: string]: string } | null;
|
|
42
|
+
createdAt: string | null;
|
|
43
|
+
updatedAt: string | null;
|
|
44
|
+
};
|
|
45
|
+
|
|
28
46
|
export type Command = {
|
|
29
47
|
chainEid: number;
|
|
30
48
|
commandId: string | null;
|
|
@@ -35,7 +53,7 @@ export type Command = {
|
|
|
35
53
|
*/
|
|
36
54
|
export type PostOrgsByOrgIdIssuerRegisterResponse = {
|
|
37
55
|
registered: boolean;
|
|
38
|
-
issuer
|
|
56
|
+
issuer: PostOrgsByOrgIdIssuerRegisterIssuer;
|
|
39
57
|
/**
|
|
40
58
|
* One entry per chain leg the org has a server wallet for.
|
|
41
59
|
*/
|
|
@@ -130,6 +148,46 @@ export function postOrgsByOrgIdIssuerRegisterRequestToJSON(
|
|
|
130
148
|
);
|
|
131
149
|
}
|
|
132
150
|
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const PostOrgsByOrgIdIssuerRegisterIssuer$inboundSchema: z.ZodMiniType<
|
|
153
|
+
PostOrgsByOrgIdIssuerRegisterIssuer,
|
|
154
|
+
unknown
|
|
155
|
+
> = z.pipe(
|
|
156
|
+
z.object({
|
|
157
|
+
id: types.string(),
|
|
158
|
+
name: types.string(),
|
|
159
|
+
organization_id: types.nullable(types.string()),
|
|
160
|
+
max_kyc_level: types.nullable(types.number()),
|
|
161
|
+
can_revoke_others: types.nullable(types.boolean()),
|
|
162
|
+
is_active: types.nullable(types.boolean()),
|
|
163
|
+
chain_addresses: types.nullable(z.record(z.string(), types.string())),
|
|
164
|
+
created_at: types.nullable(types.string()),
|
|
165
|
+
updated_at: types.nullable(types.string()),
|
|
166
|
+
}),
|
|
167
|
+
z.transform((v) => {
|
|
168
|
+
return remap$(v, {
|
|
169
|
+
"organization_id": "organizationId",
|
|
170
|
+
"max_kyc_level": "maxKycLevel",
|
|
171
|
+
"can_revoke_others": "canRevokeOthers",
|
|
172
|
+
"is_active": "isActive",
|
|
173
|
+
"chain_addresses": "chainAddresses",
|
|
174
|
+
"created_at": "createdAt",
|
|
175
|
+
"updated_at": "updatedAt",
|
|
176
|
+
});
|
|
177
|
+
}),
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
export function postOrgsByOrgIdIssuerRegisterIssuerFromJSON(
|
|
181
|
+
jsonString: string,
|
|
182
|
+
): SafeParseResult<PostOrgsByOrgIdIssuerRegisterIssuer, SDKValidationError> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) =>
|
|
186
|
+
PostOrgsByOrgIdIssuerRegisterIssuer$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'PostOrgsByOrgIdIssuerRegisterIssuer' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
133
191
|
/** @internal */
|
|
134
192
|
export const Command$inboundSchema: z.ZodMiniType<Command, unknown> = z.object({
|
|
135
193
|
chainEid: types.number(),
|
|
@@ -152,7 +210,7 @@ export const PostOrgsByOrgIdIssuerRegisterResponse$inboundSchema: z.ZodMiniType<
|
|
|
152
210
|
unknown
|
|
153
211
|
> = z.object({
|
|
154
212
|
registered: types.boolean(),
|
|
155
|
-
issuer: z.
|
|
213
|
+
issuer: z.lazy(() => PostOrgsByOrgIdIssuerRegisterIssuer$inboundSchema),
|
|
156
214
|
commands: z.array(z.lazy(() => Command$inboundSchema)),
|
|
157
215
|
});
|
|
158
216
|
|
|
@@ -24,15 +24,19 @@ export type PostOrgsByOrgIdMembersByUserIdAttestRequestBody = {
|
|
|
24
24
|
*/
|
|
25
25
|
chainEid?: number | undefined;
|
|
26
26
|
/**
|
|
27
|
-
* KYC level
|
|
27
|
+
* Ignored. The attestation's KYC level is the member's approved, current Clossir verification level; a member without one is refused with 409 member_kyc_required.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
28
30
|
*/
|
|
29
|
-
kycLevel
|
|
31
|
+
kycLevel?: number | undefined;
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
33
|
+
* Ignored. Jurisdiction is not set by the organization.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
32
36
|
*/
|
|
33
37
|
countryCode?: string | undefined;
|
|
34
38
|
/**
|
|
35
|
-
* Attestation expiry, an ISO 8601 date-time strictly in the future (400 otherwise). Also sent to the chain.
|
|
39
|
+
* Attestation expiry, an ISO 8601 date-time strictly in the future (400 otherwise). Capped at the member's KYC expiry. Also sent to the chain.
|
|
36
40
|
*/
|
|
37
41
|
expiresAt?: string | undefined;
|
|
38
42
|
/**
|
|
@@ -105,7 +109,7 @@ export function postOrgsByOrgIdMembersByUserIdAttestSecurityToJSON(
|
|
|
105
109
|
export type PostOrgsByOrgIdMembersByUserIdAttestRequestBody$Outbound = {
|
|
106
110
|
walletAddresses?: Array<string> | undefined;
|
|
107
111
|
chainEid?: number | undefined;
|
|
108
|
-
kycLevel
|
|
112
|
+
kycLevel?: number | undefined;
|
|
109
113
|
countryCode?: string | undefined;
|
|
110
114
|
expiresAt?: string | undefined;
|
|
111
115
|
isAccredited?: boolean | undefined;
|
|
@@ -120,7 +124,7 @@ export const PostOrgsByOrgIdMembersByUserIdAttestRequestBody$outboundSchema:
|
|
|
120
124
|
> = z.object({
|
|
121
125
|
walletAddresses: z.optional(z.array(z.string())),
|
|
122
126
|
chainEid: z.optional(z.number()),
|
|
123
|
-
kycLevel: z.number(),
|
|
127
|
+
kycLevel: z.optional(z.number()),
|
|
124
128
|
countryCode: z.optional(z.string()),
|
|
125
129
|
expiresAt: z.optional(z.string()),
|
|
126
130
|
isAccredited: z.optional(z.boolean()),
|
package/src/sdk/accounts.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { accountsDeleteAccountsEvmByAddress } from "../funcs/accounts-delete-accounts-evm-by-address.js";
|
|
6
6
|
import { accountsDeleteAccountsSolanaByAddress } from "../funcs/accounts-delete-accounts-solana-by-address.js";
|
|
7
7
|
import { accountsGetAccountsCashAssets } from "../funcs/accounts-get-accounts-cash-assets.js";
|
|
8
|
+
import { accountsGetAccountsDepositAddresses } from "../funcs/accounts-get-accounts-deposit-addresses.js";
|
|
8
9
|
import { accountsGetAccountsEvm } from "../funcs/accounts-get-accounts-evm.js";
|
|
9
10
|
import { accountsGetAccountsMovableWallets } from "../funcs/accounts-get-accounts-movable-wallets.js";
|
|
10
11
|
import { accountsGetAccountsSolana } from "../funcs/accounts-get-accounts-solana.js";
|
|
@@ -294,4 +295,21 @@ export class Accounts extends ClientSDK {
|
|
|
294
295
|
options,
|
|
295
296
|
));
|
|
296
297
|
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Where the caller can receive an asset
|
|
301
|
+
*
|
|
302
|
+
* @remarks
|
|
303
|
+
* One row per own wallet per chain of the asset; an organization's wallets are never listed. An issued asset is found for a member of its organization and for a caller who holds it; for anyone else it is not found. A chain the asset is not deployed on yet is a row with `deployed: false` and no address. A deployed row carries the wallet's checksummed address and `receivable`: whether the chain will accept a transfer of the asset to that wallet, read from the chain on every request. `receivable` is null when it could not be read, never true. `notReceivableReason` is given only when `receivable` is false. `inboundBridgePaused` says whether the token is paused on that chain: while it is, deposits bridged from another chain are queued, and after the token is unpaused they must be replayed; one the token refuses at replay, or that the owner drops, is not delivered. A pause does not affect a deposit sent on the chain itself and never changes `receivable`. `finalityBlocks` is null when no confirmation depth is stated for the chain. `inbound` lists up to 5 recent transfers in, newest first; when `historyStale` is true the lists may be missing transfers, and an empty list is not a statement that nothing arrived. For a cash asset every row is receivable, `inbound` is empty and `historyStale` is true. Rate limited per user (429 with Retry-After). API keys are refused.
|
|
304
|
+
*/
|
|
305
|
+
async getAccountsDepositAddresses(
|
|
306
|
+
assetId: string,
|
|
307
|
+
options?: RequestOptions,
|
|
308
|
+
): Promise<operations.GetAccountsDepositAddressesResponse> {
|
|
309
|
+
return unwrapAsync(accountsGetAccountsDepositAddresses(
|
|
310
|
+
this,
|
|
311
|
+
assetId,
|
|
312
|
+
options,
|
|
313
|
+
));
|
|
314
|
+
}
|
|
297
315
|
}
|
package/src/sdk/organizations.ts
CHANGED
|
@@ -648,7 +648,7 @@ export class Organizations extends ClientSDK {
|
|
|
648
648
|
* Attest member wallets on behalf of org
|
|
649
649
|
*
|
|
650
650
|
* @remarks
|
|
651
|
-
* Triggers an attestation for one or more of a member's wallets. The organization acts as the attesting authority (e.g., a bank completing KYC for a client). If walletAddresses is omitted, all user wallets are attested. If chainEid is omitted, attestations are created on all chains where wallets exist. Returns 202 Accepted — attestations are processed asynchronously via Kafka workers. Returns 409 attestation_in_force, and writes nothing, if any selected wallet already holds an attestation on that chain that is pending, submitting or active; a new attestation can be issued once it has failed, expired or been revoked. Returns 409 attestation_reinstate_unsupported for a revoked attestation on Solana. expiresAt, when given, must be a future ISO 8601 date-time (400 otherwise). Requires staff role (admin, operator, compliance_officer) or API key with write:attestations permission.
|
|
651
|
+
* Triggers an attestation for one or more of a member's wallets. The organization acts as the attesting authority (e.g., a bank completing KYC for a client). If walletAddresses is omitted, all user wallets are attested. If chainEid is omitted, attestations are created on all chains where wallets exist. Returns 202 Accepted — attestations are processed asynchronously via Kafka workers. The member must hold an approved, current Clossir verification: the attestation's KYC level is that verification's level and its expiry is capped at the verification's expiry. Returns 409 member_kyc_required, and writes nothing, when the member has no approved, current Clossir verification. kycLevel and countryCode are deprecated and ignored. Returns 409 attestation_in_force, and writes nothing, if any selected wallet already holds an attestation on that chain that is pending, submitting or active; a new attestation can be issued once it has failed, expired or been revoked. Returns 409 attestation_reinstate_unsupported for a revoked attestation on Solana. expiresAt, when given, must be a future ISO 8601 date-time (400 otherwise). Requires staff role (admin, operator, compliance_officer) or API key with write:attestations permission.
|
|
652
652
|
*/
|
|
653
653
|
async postOrgsByOrgIdMembersByUserIdAttest(
|
|
654
654
|
security: operations.PostOrgsByOrgIdMembersByUserIdAttestSecurity,
|
|
@@ -955,7 +955,7 @@ export class Organizations extends ClientSDK {
|
|
|
955
955
|
* Get issuer status for organization
|
|
956
956
|
*
|
|
957
957
|
* @remarks
|
|
958
|
-
* Returns the issuer registration status and
|
|
958
|
+
* Returns the issuer registration status for this organization with two market lists: `covered_jurisdictions`, the markets the platform operates in, and `opinion_covered_jurisdictions`, the markets covered by this organization's accepted legal opinions (the list asset creation is checked against; empty when none is on file). `issuer` is null when the organization is not registered, otherwise its nine fields: id, name, organization_id, max_kyc_level, can_revoke_others, is_active, chain_addresses, created_at and updated_at. Answers 503 when the opinion lookup fails and 500 when the issuer lookup fails.
|
|
959
959
|
*/
|
|
960
960
|
async getOrgsByOrgIdIssuer(
|
|
961
961
|
security: operations.GetOrgsByOrgIdIssuerSecurity,
|
|
@@ -1086,7 +1086,7 @@ export class Organizations extends ClientSDK {
|
|
|
1086
1086
|
* Update organization compliance config
|
|
1087
1087
|
*
|
|
1088
1088
|
* @remarks
|
|
1089
|
-
* Creates or updates the compliance configuration for an organization. Requires admin or compliance_officer role. A blocked_jurisdictions entry that
|
|
1089
|
+
* Creates or updates the compliance configuration for an organization. Requires admin or compliance_officer role. A blocked_jurisdictions entry that is not the canonical ISO 3166-1 upper-case alpha-2 form — including a mappable alias such as UK — returns 422 validation_failed with property pointing at the entry; the value is not echoed. Resending the stored list unchanged, in any order, is accepted.
|
|
1090
1090
|
*/
|
|
1091
1091
|
async putOrgsByOrgIdCompliance(
|
|
1092
1092
|
orgId: string,
|