@xkova/sdk 0.1.0-alpha.1

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.
Files changed (76) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +453 -0
  3. package/dist/abi.d.ts +10288 -0
  4. package/dist/abi.js +6645 -0
  5. package/dist/client.d.ts +80 -0
  6. package/dist/client.js +251 -0
  7. package/dist/cursor.d.ts +21 -0
  8. package/dist/cursor.js +28 -0
  9. package/dist/errors.d.ts +31 -0
  10. package/dist/errors.js +63 -0
  11. package/dist/generated/types.d.ts +13371 -0
  12. package/dist/generated/types.js +3 -0
  13. package/dist/idempotency.d.ts +25 -0
  14. package/dist/idempotency.js +46 -0
  15. package/dist/index.d.ts +11 -0
  16. package/dist/index.js +8 -0
  17. package/dist/member-action-intents.d.ts +72 -0
  18. package/dist/member-action-intents.js +181 -0
  19. package/dist/member-bff.d.ts +535 -0
  20. package/dist/member-bff.js +1594 -0
  21. package/dist/member-resources.d.ts +203 -0
  22. package/dist/member-resources.js +56 -0
  23. package/dist/request-signing.d.ts +23 -0
  24. package/dist/request-signing.js +112 -0
  25. package/dist/resources/account-holders.d.ts +295 -0
  26. package/dist/resources/account-holders.js +166 -0
  27. package/dist/resources/base.d.ts +47 -0
  28. package/dist/resources/base.js +25 -0
  29. package/dist/resources/branding.d.ts +154 -0
  30. package/dist/resources/branding.js +34 -0
  31. package/dist/resources/chains.d.ts +6 -0
  32. package/dist/resources/chains.js +6 -0
  33. package/dist/resources/contacts.d.ts +55 -0
  34. package/dist/resources/contacts.js +22 -0
  35. package/dist/resources/escrows.d.ts +45 -0
  36. package/dist/resources/escrows.js +18 -0
  37. package/dist/resources/fee-schedules.d.ts +40 -0
  38. package/dist/resources/fee-schedules.js +15 -0
  39. package/dist/resources/index.d.ts +21 -0
  40. package/dist/resources/index.js +21 -0
  41. package/dist/resources/integration-gateways.d.ts +114 -0
  42. package/dist/resources/integration-gateways.js +27 -0
  43. package/dist/resources/onboarding.d.ts +18 -0
  44. package/dist/resources/onboarding.js +9 -0
  45. package/dist/resources/payment-requests.d.ts +115 -0
  46. package/dist/resources/payment-requests.js +27 -0
  47. package/dist/resources/payments.d.ts +182 -0
  48. package/dist/resources/payments.js +33 -0
  49. package/dist/resources/ramps.d.ts +163 -0
  50. package/dist/resources/ramps.js +44 -0
  51. package/dist/resources/rwa.d.ts +397 -0
  52. package/dist/resources/rwa.js +150 -0
  53. package/dist/resources/tenant.d.ts +136 -0
  54. package/dist/resources/tenant.js +42 -0
  55. package/dist/resources/tokenization.d.ts +394 -0
  56. package/dist/resources/tokenization.js +126 -0
  57. package/dist/resources/transactions.d.ts +8 -0
  58. package/dist/resources/transactions.js +6 -0
  59. package/dist/resources/wallets.d.ts +56 -0
  60. package/dist/resources/wallets.js +21 -0
  61. package/dist/resources/webhooks.d.ts +115 -0
  62. package/dist/resources/webhooks.js +43 -0
  63. package/dist/resources/workflows.d.ts +44 -0
  64. package/dist/resources/workflows.js +70 -0
  65. package/dist/resources/workspace-tokens.d.ts +6 -0
  66. package/dist/resources/workspace-tokens.js +6 -0
  67. package/dist/resources/workspaces.d.ts +25 -0
  68. package/dist/resources/workspaces.js +12 -0
  69. package/dist/retry.d.ts +21 -0
  70. package/dist/retry.js +44 -0
  71. package/dist/rwa-verify.d.ts +50 -0
  72. package/dist/rwa-verify.js +159 -0
  73. package/dist/webhook.d.ts +24 -0
  74. package/dist/webhook.js +56 -0
  75. package/llms.txt +84 -0
  76. package/package.json +62 -0
@@ -0,0 +1,397 @@
1
+ import { Resource, type ReqBody, type Query } from './base.js';
2
+ import type { XKOVAMutationOptions } from '../client.js';
3
+ export declare class RwaResource extends Resource {
4
+ listSchemas(query?: Query<'listRwaAssetSchemas'>): Promise<{
5
+ data: import("../generated/types.js").components["schemas"]["RwaAssetSchemaSummary"][];
6
+ }>;
7
+ getSchema(id: string): Promise<{
8
+ asset_schema_id: string;
9
+ schema_key: string;
10
+ display_name: string;
11
+ latest_version_id: string | null;
12
+ created_at: string;
13
+ versions: {
14
+ version_id: string;
15
+ version: number;
16
+ status: "draft" | "published" | "retired";
17
+ compiled_json_schema: {
18
+ [key: string]: unknown;
19
+ };
20
+ x_xkova_vocab: {
21
+ [key: string]: unknown;
22
+ };
23
+ content_hash: string;
24
+ published_at: string | null;
25
+ }[];
26
+ }>;
27
+ listSchemaTemplates(): Promise<{
28
+ data: import("../generated/types.js").components["schemas"]["RwaAssetSchemaTemplate"][];
29
+ }>;
30
+ compileSchemaPreview(body: ReqBody<'compileRwaAssetSchemaPreview'>, opts?: XKOVAMutationOptions): Promise<{
31
+ compiled_json_schema: {
32
+ [key: string]: unknown;
33
+ };
34
+ x_xkova_vocab: {
35
+ [key: string]: unknown;
36
+ };
37
+ publishable: boolean;
38
+ reason: string | null;
39
+ reason_code: string | null;
40
+ }>;
41
+ saveSchemaDraft(body: ReqBody<'saveRwaAssetSchemaDraft'>, opts?: XKOVAMutationOptions): Promise<{
42
+ asset_schema_id: string;
43
+ version_id: string;
44
+ version: number;
45
+ }>;
46
+ forkSchema(body: ReqBody<'forkRwaAssetSchema'>, opts?: XKOVAMutationOptions): Promise<{
47
+ asset_schema_id: string;
48
+ version_id: string;
49
+ version: number;
50
+ } & {
51
+ schema_key: string;
52
+ }>;
53
+ publishSchema(id: string, opts?: XKOVAMutationOptions): Promise<{
54
+ asset_schema_id: string;
55
+ version_id: string;
56
+ version: number;
57
+ }>;
58
+ uploadPublishSchema(body: ReqBody<'uploadPublishRwaAssetSchema'>, opts?: XKOVAMutationOptions): Promise<{
59
+ asset_schema_id: string;
60
+ version_id: string;
61
+ version: number;
62
+ }>;
63
+ getSchemaBinding(tokenId: string): Promise<{
64
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
65
+ asset_schema_id: string;
66
+ version: number;
67
+ version_id: string;
68
+ bound_at: string;
69
+ }>;
70
+ bindSchema(tokenId: string, body: ReqBody<'bindRwaSchema'>, opts?: XKOVAMutationOptions): Promise<{
71
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
72
+ asset_schema_id: string;
73
+ version: number;
74
+ version_id: string;
75
+ bound_at: string;
76
+ }>;
77
+ proposeSchemaRebind(body: ReqBody<'proposeRwaSchemaRebind'>, opts?: XKOVAMutationOptions): Promise<{
78
+ ceremony_id: string;
79
+ }>;
80
+ getSchemaRebind(id: string): Promise<{
81
+ id: string;
82
+ status: "proposed" | "dry_run_passed" | "dry_run_failed" | "attested" | "committed" | "failed";
83
+ asset_schema_id: string;
84
+ from_version: number;
85
+ to_version: number;
86
+ token_set: import("../generated/types.js").components["schemas"]["CustomerTokenId"][];
87
+ transform_hash: string;
88
+ dry_run_result_hash: string | null;
89
+ signer_address: string | null;
90
+ created_at: string;
91
+ committed_at: string | null;
92
+ }>;
93
+ dryRunSchemaRebind(id: string, opts?: XKOVAMutationOptions): Promise<{
94
+ ok: boolean;
95
+ results: {
96
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
97
+ ok: boolean;
98
+ reason?: string;
99
+ }[];
100
+ dry_run_result_hash: string;
101
+ }>;
102
+ attestSchemaRebind(id: string, opts?: XKOVAMutationOptions): Promise<{
103
+ signature: string;
104
+ signer_address: string;
105
+ }>;
106
+ commitSchemaRebind(id: string, opts?: XKOVAMutationOptions): Promise<{
107
+ committed_at: string;
108
+ affected_token_count: number;
109
+ }>;
110
+ describeFields(tokenId: string, query?: Query<'describeRwaTokenFields'>): Promise<{
111
+ fields: import("../generated/types.js").components["schemas"]["RwaFieldDescriptor"][];
112
+ }>;
113
+ commitField(tokenId: string, fieldPath: string, body: ReqBody<'commitRwaTokenField'>, opts?: XKOVAMutationOptions): Promise<{
114
+ committed: boolean;
115
+ deduped: boolean;
116
+ field_path: string;
117
+ storage_backend: "inline" | "frozen" | "versioned" | "append-log";
118
+ }>;
119
+ submitAttestedEntry(tokenId: string, fieldPath: string, body: ReqBody<'submitRwaAttestedEntry'>, opts?: XKOVAMutationOptions): Promise<{
120
+ committed: boolean;
121
+ deduped: boolean;
122
+ attester_id: string;
123
+ attester_address: string;
124
+ attested_digest: string;
125
+ }>;
126
+ capTable(tokenId: string): Promise<{
127
+ standard: "erc20" | "erc721" | "erc1155";
128
+ total_supply: string;
129
+ holder_count: number;
130
+ as_of_block: string | null;
131
+ rebuilt_at: string | null;
132
+ }>;
133
+ listHolders(tokenId: string, query?: Query<'listRwaTokenHolders'>): Promise<{
134
+ data: import("../generated/types.js").components["schemas"]["CapTableHolder"][];
135
+ next_cursor: string | null;
136
+ has_more: boolean;
137
+ }>;
138
+ listInstances(tokenId: string, query?: Query<'listRwaTokenInstances'>): Promise<{
139
+ data: import("../generated/types.js").components["schemas"]["CapTableInstance"][];
140
+ next_cursor: string | null;
141
+ has_more: boolean;
142
+ }>;
143
+ createDistribution(tokenId: string, body: ReqBody<'createRwaTokenDistribution'>, opts?: XKOVAMutationOptions): Promise<{
144
+ id: import("../generated/types.js").components["schemas"]["RwaDistributionId"];
145
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
146
+ kind: "dividend" | "interest" | "redemption_proceeds" | "royalty" | "capital_return";
147
+ state: "draft" | "snapshotting" | "funding" | "paying" | "completed" | "failed";
148
+ snapshot_block: string;
149
+ payout_token_address: string;
150
+ total_amount_raw: string;
151
+ per_unit_basis: string;
152
+ treasury_transfer_id: import("../generated/types.js").components["schemas"]["TreasuryTransferId"] | null;
153
+ payout_count: number;
154
+ payouts: import("../generated/types.js").components["schemas"]["DistributionPayout"][];
155
+ created_at: string;
156
+ }>;
157
+ getDistribution(tokenId: string, distId: string): Promise<{
158
+ id: import("../generated/types.js").components["schemas"]["RwaDistributionId"];
159
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
160
+ kind: "dividend" | "interest" | "redemption_proceeds" | "royalty" | "capital_return";
161
+ state: "draft" | "snapshotting" | "funding" | "paying" | "completed" | "failed";
162
+ snapshot_block: string;
163
+ payout_token_address: string;
164
+ total_amount_raw: string;
165
+ per_unit_basis: string;
166
+ treasury_transfer_id: import("../generated/types.js").components["schemas"]["TreasuryTransferId"] | null;
167
+ payout_count: number;
168
+ payouts: import("../generated/types.js").components["schemas"]["DistributionPayout"][];
169
+ created_at: string;
170
+ }>;
171
+ executeDistribution(tokenId: string, distId: string, body: ReqBody<'executeRwaTokenDistribution'>, opts?: XKOVAMutationOptions): Promise<{
172
+ id: import("../generated/types.js").components["schemas"]["RwaDistributionId"];
173
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
174
+ kind: "dividend" | "interest" | "redemption_proceeds" | "royalty" | "capital_return";
175
+ state: "draft" | "snapshotting" | "funding" | "paying" | "completed" | "failed";
176
+ snapshot_block: string;
177
+ payout_token_address: string;
178
+ total_amount_raw: string;
179
+ per_unit_basis: string;
180
+ treasury_transfer_id: import("../generated/types.js").components["schemas"]["TreasuryTransferId"] | null;
181
+ payout_count: number;
182
+ payouts: import("../generated/types.js").components["schemas"]["DistributionPayout"][];
183
+ created_at: string;
184
+ }>;
185
+ createCorporateAction(tokenId: string, body: ReqBody<'createRwaCorporateAction'>, opts?: XKOVAMutationOptions): Promise<{
186
+ id: string;
187
+ customer_token_id: string;
188
+ kind: "redemption" | "split" | "consolidation" | "additional_issuance" | "capital_call" | "mandatory_conversion";
189
+ state: string;
190
+ params: {
191
+ [key: string]: unknown;
192
+ };
193
+ snapshot_block: string | null;
194
+ freeze_at: string | null;
195
+ legs: {
196
+ sequence: number;
197
+ leg: string;
198
+ subject: string | null;
199
+ operation_id: string | null;
200
+ }[];
201
+ created_at: string;
202
+ }>;
203
+ getCorporateAction(tokenId: string, caId: string): Promise<{
204
+ id: string;
205
+ customer_token_id: string;
206
+ kind: "redemption" | "split" | "consolidation" | "additional_issuance" | "capital_call" | "mandatory_conversion";
207
+ state: string;
208
+ params: {
209
+ [key: string]: unknown;
210
+ };
211
+ snapshot_block: string | null;
212
+ freeze_at: string | null;
213
+ legs: {
214
+ sequence: number;
215
+ leg: string;
216
+ subject: string | null;
217
+ operation_id: string | null;
218
+ }[];
219
+ created_at: string;
220
+ }>;
221
+ advanceCorporateAction(tokenId: string, caId: string, opts?: XKOVAMutationOptions): Promise<{
222
+ id: string;
223
+ customer_token_id: string;
224
+ kind: "redemption" | "split" | "consolidation" | "additional_issuance" | "capital_call" | "mandatory_conversion";
225
+ state: string;
226
+ params: {
227
+ [key: string]: unknown;
228
+ };
229
+ snapshot_block: string | null;
230
+ freeze_at: string | null;
231
+ legs: {
232
+ sequence: number;
233
+ leg: string;
234
+ subject: string | null;
235
+ operation_id: string | null;
236
+ }[];
237
+ created_at: string;
238
+ }>;
239
+ getDocument(tokenId: string, docId: string, query?: Query<'getRwaDocument'>): Promise<{
240
+ id: string;
241
+ visibility: "public" | "gated";
242
+ content_hash: string;
243
+ url: string;
244
+ url_expires_at: string | null;
245
+ }>;
246
+ presignDocumentUpload(tokenId: string, body: ReqBody<'presignRwaDocumentUpload'>, opts?: XKOVAMutationOptions): Promise<{
247
+ upload_url: string;
248
+ object_key: string;
249
+ expires_at: string;
250
+ }>;
251
+ confirmDocument(tokenId: string, body: ReqBody<'confirmRwaDocument'>, opts?: XKOVAMutationOptions): Promise<{
252
+ id: string;
253
+ field_path: string;
254
+ visibility: "public" | "gated";
255
+ content_hash: string;
256
+ content_type: string;
257
+ byte_size: number;
258
+ uploaded_at: string;
259
+ }>;
260
+ grantDocumentEntitlement(tokenId: string, body: ReqBody<'grantRwaDocumentEntitlement'>, opts?: XKOVAMutationOptions): Promise<{
261
+ id: string;
262
+ grantee: string;
263
+ }>;
264
+ revokeDocumentEntitlement(tokenId: string, grantee: string, opts?: XKOVAMutationOptions): Promise<{
265
+ revoked: boolean;
266
+ }>;
267
+ holderEligibility(tokenId: string, holderRef: string): Promise<{
268
+ holder_ref: string;
269
+ accreditation: "none" | "self_attested" | "verified" | "expired";
270
+ jurisdiction: string | null;
271
+ lockup_until: string | null;
272
+ }>;
273
+ setHolderEligibility(holderRef: string, body: ReqBody<'setRwaHolderEligibility'>, opts?: XKOVAMutationOptions): Promise<{
274
+ holder_ref: string;
275
+ accreditation_status: "none" | "self_attested" | "verified" | "expired";
276
+ accreditation_expires_at: string | null;
277
+ jurisdiction: string;
278
+ source: "kyc_provider" | "operator_attested" | "integrator_supplied";
279
+ updated_at: string;
280
+ }>;
281
+ setHolderLockup(tokenId: string, holderRef: string, body: ReqBody<'setRwaHolderLockup'>, opts?: XKOVAMutationOptions): Promise<{
282
+ holder_ref: string;
283
+ customer_token_id: import("../generated/types.js").components["schemas"]["CustomerTokenId"];
284
+ lockup_until: string;
285
+ reason: string;
286
+ }>;
287
+ listAttesters(tokenId: string): Promise<{
288
+ id: string;
289
+ customer_token_id: string | null;
290
+ display_name: string;
291
+ attester_address: string;
292
+ role_label: "auditor" | "appraiser" | "custodian" | "escrow_agent" | "oracle" | "legal_counsel" | "other";
293
+ revoked_at: string | null;
294
+ created_at: string;
295
+ }[]>;
296
+ registerAttester(tokenId: string, body: ReqBody<'registerRwaAttester'>, opts?: XKOVAMutationOptions): Promise<{
297
+ id: string;
298
+ customer_token_id: string | null;
299
+ display_name: string;
300
+ attester_address: string;
301
+ role_label: "auditor" | "appraiser" | "custodian" | "escrow_agent" | "oracle" | "legal_counsel" | "other";
302
+ revoked_at: string | null;
303
+ created_at: string;
304
+ }>;
305
+ revokeAttester(tokenId: string, attesterId: string, opts?: XKOVAMutationOptions): Promise<{
306
+ id: string;
307
+ customer_token_id: string | null;
308
+ display_name: string;
309
+ attester_address: string;
310
+ role_label: "auditor" | "appraiser" | "custodian" | "escrow_agent" | "oracle" | "legal_counsel" | "other";
311
+ revoked_at: string | null;
312
+ created_at: string;
313
+ }>;
314
+ verifyProvenance(tokenId: string, query?: Query<'verifyTokenProvenance'>): Promise<{
315
+ ok: boolean;
316
+ reason?: "unanchored" | "chain_broken" | "head_mismatch" | "signature_invalid" | "signer_unreachable" | null;
317
+ checkpoint_id?: string | null;
318
+ version_count?: number | null;
319
+ recovered_signer?: string | null;
320
+ trusted_signer?: string | null;
321
+ }>;
322
+ logSth(tokenId: string, query?: Query<'getRwaTokenLogSth'>): Promise<{
323
+ tree_size: number;
324
+ root_hash: string;
325
+ timestamp_ms: number;
326
+ eip712_chain_id: number;
327
+ signature: string;
328
+ signer_address: string;
329
+ signed_at: string;
330
+ }>;
331
+ logInclusionProof(tokenId: string, query: Query<'getRwaTokenLogInclusionProof'>): Promise<{
332
+ leaf_data: string;
333
+ leaf_index: number;
334
+ tree_size: number;
335
+ proof: string[];
336
+ root: string;
337
+ }>;
338
+ logConsistencyProof(tokenId: string, query: Query<'getRwaTokenLogConsistencyProof'>): Promise<{
339
+ first: number;
340
+ second: number;
341
+ proof: string[];
342
+ first_root: string;
343
+ second_root: string;
344
+ }>;
345
+ registerWitness(tokenId: string, body: ReqBody<'registerRwaWitness'>, opts?: XKOVAMutationOptions): Promise<{
346
+ id: string;
347
+ witness_address: string;
348
+ }>;
349
+ submitWitnessCoSignature(tokenId: string, body: ReqBody<'submitRwaWitnessCoSignature'>, opts?: XKOVAMutationOptions): Promise<{
350
+ witness_address: string;
351
+ signed_tree_head_id: string;
352
+ }>;
353
+ listRelationships(tokenId: string, query?: Query<'listRwaTokenRelationships'>): Promise<{
354
+ data: {
355
+ field_path: string;
356
+ targets: {
357
+ rel_kind: "token" | "identity" | "external";
358
+ to_customer_token_id?: string;
359
+ to_identity_ref?: string;
360
+ to_external_ref?: {
361
+ system: string;
362
+ id: string;
363
+ url?: string | null;
364
+ };
365
+ cardinality_seq: number;
366
+ }[];
367
+ }[];
368
+ }>;
369
+ metadata(tokenId: string, query?: Query<'getRwaTokenMetadata'>): Promise<{
370
+ name: string;
371
+ image?: string | null;
372
+ attributes: {
373
+ trait_type: string;
374
+ value: unknown;
375
+ display_type?: string | null;
376
+ }[];
377
+ } & {
378
+ [key: string]: unknown;
379
+ }>;
380
+ instanceMetadata(tokenId: string, instanceTokenId: string, query?: Query<'getRwaTokenInstanceMetadata'>): Promise<{
381
+ name: string;
382
+ image?: string | null;
383
+ attributes: {
384
+ trait_type: string;
385
+ value: unknown;
386
+ display_type?: string | null;
387
+ }[];
388
+ } & {
389
+ [key: string]: unknown;
390
+ }>;
391
+ placeholder(tokenId: string, query?: Query<'getRwaTokenPlaceholder'>): Promise<string>;
392
+ contractMetadata(contractId: string, query?: Query<'getRwaContractMetadata'>): Promise<{
393
+ name: string;
394
+ image?: string | null;
395
+ external_link?: string | null;
396
+ }>;
397
+ }
@@ -0,0 +1,150 @@
1
+ import { Resource } from './base.js';
2
+ export class RwaResource extends Resource {
3
+ listSchemas(query = {}) {
4
+ return this.getJson('/rwa/asset-schemas', query);
5
+ }
6
+ getSchema(id) {
7
+ return this.getJson(`/rwa/asset-schemas/${this.enc(id)}`);
8
+ }
9
+ listSchemaTemplates() {
10
+ return this.getJson('/rwa/asset-schemas/templates');
11
+ }
12
+ compileSchemaPreview(body, opts) {
13
+ return this.postJson('/rwa/asset-schemas/compile-preview', body, opts);
14
+ }
15
+ saveSchemaDraft(body, opts) {
16
+ return this.postJson('/rwa/asset-schemas/draft', body, opts);
17
+ }
18
+ forkSchema(body, opts) {
19
+ return this.postJson('/rwa/asset-schemas/fork', body, opts);
20
+ }
21
+ publishSchema(id, opts) {
22
+ return this.postJson(`/rwa/asset-schemas/${this.enc(id)}/publish`, undefined, opts);
23
+ }
24
+ uploadPublishSchema(body, opts) {
25
+ return this.postJson('/rwa/asset-schemas/upload-publish', body, opts);
26
+ }
27
+ getSchemaBinding(tokenId) {
28
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/schema-binding`);
29
+ }
30
+ bindSchema(tokenId, body, opts) {
31
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/schema-binding`, body, opts);
32
+ }
33
+ proposeSchemaRebind(body, opts) {
34
+ return this.postJson('/rwa/schema-rebinds', body, opts);
35
+ }
36
+ getSchemaRebind(id) {
37
+ return this.getJson(`/rwa/schema-rebinds/${this.enc(id)}`);
38
+ }
39
+ dryRunSchemaRebind(id, opts) {
40
+ return this.postJson(`/rwa/schema-rebinds/${this.enc(id)}/dry-run`, undefined, opts);
41
+ }
42
+ attestSchemaRebind(id, opts) {
43
+ return this.postJson(`/rwa/schema-rebinds/${this.enc(id)}/attest`, undefined, opts);
44
+ }
45
+ commitSchemaRebind(id, opts) {
46
+ return this.postJson(`/rwa/schema-rebinds/${this.enc(id)}/commit`, undefined, opts);
47
+ }
48
+ describeFields(tokenId, query = {}) {
49
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/fields`, query);
50
+ }
51
+ commitField(tokenId, fieldPath, body, opts) {
52
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/fields/${this.enc(fieldPath)}`, body, opts);
53
+ }
54
+ submitAttestedEntry(tokenId, fieldPath, body, opts) {
55
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/fields/${this.enc(fieldPath)}/attested-entry`, body, opts);
56
+ }
57
+ capTable(tokenId) {
58
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/cap-table`);
59
+ }
60
+ listHolders(tokenId, query = {}) {
61
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/holders`, query);
62
+ }
63
+ listInstances(tokenId, query = {}) {
64
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/instances`, query);
65
+ }
66
+ createDistribution(tokenId, body, opts) {
67
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/distributions`, body, opts);
68
+ }
69
+ getDistribution(tokenId, distId) {
70
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/distributions/${this.enc(distId)}`);
71
+ }
72
+ executeDistribution(tokenId, distId, body, opts) {
73
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/distributions/${this.enc(distId)}/execute`, body, opts);
74
+ }
75
+ createCorporateAction(tokenId, body, opts) {
76
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/corporate-actions`, body, opts);
77
+ }
78
+ getCorporateAction(tokenId, caId) {
79
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/corporate-actions/${this.enc(caId)}`);
80
+ }
81
+ advanceCorporateAction(tokenId, caId, opts) {
82
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/corporate-actions/${this.enc(caId)}/advance`, undefined, opts);
83
+ }
84
+ getDocument(tokenId, docId, query = {}) {
85
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/documents/${this.enc(docId)}`, query);
86
+ }
87
+ presignDocumentUpload(tokenId, body, opts) {
88
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/documents/upload-url`, body, opts);
89
+ }
90
+ confirmDocument(tokenId, body, opts) {
91
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/documents/confirm`, body, opts);
92
+ }
93
+ grantDocumentEntitlement(tokenId, body, opts) {
94
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/document-entitlements`, body, opts);
95
+ }
96
+ revokeDocumentEntitlement(tokenId, grantee, opts) {
97
+ return this.deleteJson(`/rwa/tokens/${this.enc(tokenId)}/document-entitlements/${this.enc(grantee)}`, opts);
98
+ }
99
+ holderEligibility(tokenId, holderRef) {
100
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/eligibility/${this.enc(holderRef)}`);
101
+ }
102
+ setHolderEligibility(holderRef, body, opts) {
103
+ return this.putJson(`/rwa/holders/${this.enc(holderRef)}/eligibility`, body, opts);
104
+ }
105
+ setHolderLockup(tokenId, holderRef, body, opts) {
106
+ return this.putJson(`/rwa/tokens/${this.enc(tokenId)}/lockups/${this.enc(holderRef)}`, body, opts);
107
+ }
108
+ listAttesters(tokenId) {
109
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/attesters`);
110
+ }
111
+ registerAttester(tokenId, body, opts) {
112
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/attesters`, body, opts);
113
+ }
114
+ revokeAttester(tokenId, attesterId, opts) {
115
+ return this.deleteJson(`/rwa/tokens/${this.enc(tokenId)}/attesters/${this.enc(attesterId)}`, opts);
116
+ }
117
+ verifyProvenance(tokenId, query = {}) {
118
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/provenance/verify`, query);
119
+ }
120
+ logSth(tokenId, query = {}) {
121
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/log/sth`, query);
122
+ }
123
+ logInclusionProof(tokenId, query) {
124
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/log/proof/inclusion`, query);
125
+ }
126
+ logConsistencyProof(tokenId, query) {
127
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/log/proof/consistency`, query);
128
+ }
129
+ registerWitness(tokenId, body, opts) {
130
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/witnesses`, body, opts);
131
+ }
132
+ submitWitnessCoSignature(tokenId, body, opts) {
133
+ return this.postJson(`/rwa/tokens/${this.enc(tokenId)}/log/witness`, body, opts);
134
+ }
135
+ listRelationships(tokenId, query = {}) {
136
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/relationships`, query);
137
+ }
138
+ metadata(tokenId, query = {}) {
139
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/metadata`, query);
140
+ }
141
+ instanceMetadata(tokenId, instanceTokenId, query = {}) {
142
+ return this.getJson(`/rwa/tokens/${this.enc(tokenId)}/metadata/${this.enc(instanceTokenId)}`, query);
143
+ }
144
+ placeholder(tokenId, query = {}) {
145
+ return this.getText(`/rwa/tokens/${this.enc(tokenId)}/placeholder`, query, {}, 'image/svg+xml');
146
+ }
147
+ contractMetadata(contractId, query = {}) {
148
+ return this.getJson(`/rwa/contracts/${this.enc(contractId)}/contract-metadata`, query);
149
+ }
150
+ }