@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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunk2KHUPARHjs = require('../../chunk-2KHUPARH.js');
|
|
22
|
+
require('../../chunk-7HFMHYRA.js');
|
|
23
|
+
require('../../chunk-AI4ZNJLR.js');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
exports.Lending = _chunk2KHUPARHjs.Lending; exports.LendingAccessLists = _chunk2KHUPARHjs.LendingAccessLists; exports.LendingAssetData = _chunk2KHUPARHjs.LendingAssetData; exports.LendingAuctions = _chunk2KHUPARHjs.LendingAuctions; exports.LendingBots = _chunk2KHUPARHjs.LendingBots; exports.LendingDocuments = _chunk2KHUPARHjs.LendingDocuments; exports.LendingFees = _chunk2KHUPARHjs.LendingFees; exports.LendingHooks = _chunk2KHUPARHjs.LendingHooks; exports.LendingInsurance = _chunk2KHUPARHjs.LendingInsurance; exports.LendingLiquidations = _chunk2KHUPARHjs.LendingLiquidations; exports.LendingLiquidity = _chunk2KHUPARHjs.LendingLiquidity; exports.LendingLoans = _chunk2KHUPARHjs.LendingLoans; exports.LendingMarkets = _chunk2KHUPARHjs.LendingMarkets; exports.LendingOperators = _chunk2KHUPARHjs.LendingOperators; exports.LendingOracle = _chunk2KHUPARHjs.LendingOracle; exports.LendingPledges = _chunk2KHUPARHjs.LendingPledges; exports.LendingRates = _chunk2KHUPARHjs.LendingRates; exports.LendingTerms = _chunk2KHUPARHjs.LendingTerms; exports.LendingVaults = _chunk2KHUPARHjs.LendingVaults;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Lending,
|
|
3
|
+
LendingAccessLists,
|
|
4
|
+
LendingAssetData,
|
|
5
|
+
LendingAuctions,
|
|
6
|
+
LendingBots,
|
|
7
|
+
LendingDocuments,
|
|
8
|
+
LendingFees,
|
|
9
|
+
LendingHooks,
|
|
10
|
+
LendingInsurance,
|
|
11
|
+
LendingLiquidations,
|
|
12
|
+
LendingLiquidity,
|
|
13
|
+
LendingLoans,
|
|
14
|
+
LendingMarkets,
|
|
15
|
+
LendingOperators,
|
|
16
|
+
LendingOracle,
|
|
17
|
+
LendingPledges,
|
|
18
|
+
LendingRates,
|
|
19
|
+
LendingTerms,
|
|
20
|
+
LendingVaults
|
|
21
|
+
} from "../../chunk-4MNJZAXE.mjs";
|
|
22
|
+
import "../../chunk-DQCX2GYT.mjs";
|
|
23
|
+
import "../../chunk-3YF42MHV.mjs";
|
|
24
|
+
export {
|
|
25
|
+
Lending,
|
|
26
|
+
LendingAccessLists,
|
|
27
|
+
LendingAssetData,
|
|
28
|
+
LendingAuctions,
|
|
29
|
+
LendingBots,
|
|
30
|
+
LendingDocuments,
|
|
31
|
+
LendingFees,
|
|
32
|
+
LendingHooks,
|
|
33
|
+
LendingInsurance,
|
|
34
|
+
LendingLiquidations,
|
|
35
|
+
LendingLiquidity,
|
|
36
|
+
LendingLoans,
|
|
37
|
+
LendingMarkets,
|
|
38
|
+
LendingOperators,
|
|
39
|
+
LendingOracle,
|
|
40
|
+
LendingPledges,
|
|
41
|
+
LendingRates,
|
|
42
|
+
LendingTerms,
|
|
43
|
+
LendingVaults
|
|
44
|
+
};
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { b as SignOptions } from '../../flow-Cz8A09rn.mjs';
|
|
2
|
+
import { l as LendingContext } from '../../base-BYEauvBZ.mjs';
|
|
3
|
+
|
|
4
|
+
type TokenAssetType = 'PUBLIC_EQUITY' | 'PRIVATE_EQUITY' | 'REAL_ESTATE' | 'COMMODITY' | 'ART' | 'WATCH' | 'INFRASTRUCTURE' | 'BOND' | 'CRYPTO_ASSET';
|
|
5
|
+
type TokenFramework = 'erc20' | 'erc721' | 'erc1155' | 'erc1400' | 'erc3643' | 'erc1404' | 'erc7943';
|
|
6
|
+
type TokenAssetStandard = 'ERC721' | 'ERC1155';
|
|
7
|
+
interface TokenDetails {
|
|
8
|
+
identityRegistry?: string | null;
|
|
9
|
+
compliance?: string | null;
|
|
10
|
+
onchainID?: string | null;
|
|
11
|
+
paused?: boolean | null;
|
|
12
|
+
isControllable?: boolean;
|
|
13
|
+
isIssuable?: boolean;
|
|
14
|
+
granularity?: string | null;
|
|
15
|
+
trussetStockToken?: boolean;
|
|
16
|
+
isin?: string | null;
|
|
17
|
+
uri?: string | null;
|
|
18
|
+
standardDeclared?: false;
|
|
19
|
+
standards?: Array<'erc7943' | 'erc1404'>;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface TokenAuthority {
|
|
23
|
+
holds: boolean | null;
|
|
24
|
+
basis?: string | null;
|
|
25
|
+
wallet?: string | null;
|
|
26
|
+
owner?: string | null;
|
|
27
|
+
readFailed?: true;
|
|
28
|
+
}
|
|
29
|
+
interface DetectedToken {
|
|
30
|
+
tokenAddress: string;
|
|
31
|
+
framework: TokenFramework;
|
|
32
|
+
name: string;
|
|
33
|
+
symbol: string;
|
|
34
|
+
decimals: number;
|
|
35
|
+
totalSupply: string;
|
|
36
|
+
environment: string;
|
|
37
|
+
degradedMetadata?: true;
|
|
38
|
+
details: TokenDetails;
|
|
39
|
+
alreadyImported: boolean | null;
|
|
40
|
+
isOwn: boolean | null;
|
|
41
|
+
ownTokenKind: string | null;
|
|
42
|
+
instrumentAuthority: TokenAuthority | null;
|
|
43
|
+
}
|
|
44
|
+
interface DetectTokenInput {
|
|
45
|
+
tokenAddress: string;
|
|
46
|
+
assetStandard?: TokenAssetStandard;
|
|
47
|
+
}
|
|
48
|
+
interface ImportTokenInput {
|
|
49
|
+
tokenAddress: string;
|
|
50
|
+
assetType: TokenAssetType;
|
|
51
|
+
imageURI?: string | null;
|
|
52
|
+
assetStandard?: TokenAssetStandard;
|
|
53
|
+
}
|
|
54
|
+
interface TokenProfileDocument {
|
|
55
|
+
name: string;
|
|
56
|
+
uri: string;
|
|
57
|
+
}
|
|
58
|
+
interface TokenProfile {
|
|
59
|
+
issuerName?: string;
|
|
60
|
+
jurisdiction?: string;
|
|
61
|
+
sector?: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
isin?: string;
|
|
64
|
+
lei?: string;
|
|
65
|
+
website?: string;
|
|
66
|
+
ammAddress?: string;
|
|
67
|
+
reserveURI?: string;
|
|
68
|
+
prospectusURI?: string;
|
|
69
|
+
documents?: TokenProfileDocument[];
|
|
70
|
+
}
|
|
71
|
+
interface ImportedToken {
|
|
72
|
+
tokenAddress: string;
|
|
73
|
+
name: string;
|
|
74
|
+
symbol: string;
|
|
75
|
+
decimals: number;
|
|
76
|
+
framework: TokenFramework;
|
|
77
|
+
assetType: TokenAssetType;
|
|
78
|
+
imageURI: string | null;
|
|
79
|
+
totalSupply: string;
|
|
80
|
+
metadata: TokenDetails | null;
|
|
81
|
+
profile: TokenProfile | null;
|
|
82
|
+
importedAt: string;
|
|
83
|
+
reactivated: boolean;
|
|
84
|
+
status: 'active';
|
|
85
|
+
}
|
|
86
|
+
interface TokenUploadOptions {
|
|
87
|
+
purpose?: 'image';
|
|
88
|
+
}
|
|
89
|
+
interface TokenUpload {
|
|
90
|
+
ipfsUri: string;
|
|
91
|
+
cid: string;
|
|
92
|
+
gatewayUrl: string;
|
|
93
|
+
fileName: string;
|
|
94
|
+
fileSize: number;
|
|
95
|
+
mimeType: string;
|
|
96
|
+
contentHash: string;
|
|
97
|
+
limitBytes: number;
|
|
98
|
+
}
|
|
99
|
+
interface TokenLendingEligibility {
|
|
100
|
+
custody: boolean;
|
|
101
|
+
freeze: boolean;
|
|
102
|
+
surface: unknown;
|
|
103
|
+
identityRegistry: string | null;
|
|
104
|
+
standards: string[];
|
|
105
|
+
custodyReason: string | null;
|
|
106
|
+
freezeReason: string | null;
|
|
107
|
+
}
|
|
108
|
+
interface TokenListOptions {
|
|
109
|
+
withLendingEligibility?: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface TokenListEntry {
|
|
112
|
+
tokenAddress: string;
|
|
113
|
+
name: string;
|
|
114
|
+
symbol: string;
|
|
115
|
+
decimals: number;
|
|
116
|
+
framework: TokenFramework;
|
|
117
|
+
assetType: TokenAssetType;
|
|
118
|
+
imageURI: string | null;
|
|
119
|
+
totalSupply: string;
|
|
120
|
+
metadata: TokenDetails | null;
|
|
121
|
+
importedAt: string;
|
|
122
|
+
instanceId: string;
|
|
123
|
+
lendingEligibility?: TokenLendingEligibility | null;
|
|
124
|
+
}
|
|
125
|
+
interface TokenHolderCount {
|
|
126
|
+
holders: number | null;
|
|
127
|
+
complete: boolean;
|
|
128
|
+
coverage?: 'full' | 'window' | null;
|
|
129
|
+
indexing: boolean;
|
|
130
|
+
syncedAt: string | null;
|
|
131
|
+
standard: string;
|
|
132
|
+
supported: boolean;
|
|
133
|
+
error?: string | null;
|
|
134
|
+
}
|
|
135
|
+
interface TokenHolderCounts {
|
|
136
|
+
holders: Record<string, TokenHolderCount>;
|
|
137
|
+
indexing: boolean;
|
|
138
|
+
}
|
|
139
|
+
interface TokenImport {
|
|
140
|
+
tokenAddress: string;
|
|
141
|
+
name: string;
|
|
142
|
+
symbol: string;
|
|
143
|
+
decimals: number;
|
|
144
|
+
framework: TokenFramework;
|
|
145
|
+
assetType: TokenAssetType;
|
|
146
|
+
imageURI: string | null;
|
|
147
|
+
totalSupply: string;
|
|
148
|
+
metadata: TokenDetails | null;
|
|
149
|
+
profile: TokenProfile | null;
|
|
150
|
+
importedAt: string;
|
|
151
|
+
updatedAt: string;
|
|
152
|
+
}
|
|
153
|
+
interface TokenOnchainDocument {
|
|
154
|
+
name: string;
|
|
155
|
+
uri: string;
|
|
156
|
+
documentHash: string | null;
|
|
157
|
+
timestamp: string | null;
|
|
158
|
+
}
|
|
159
|
+
interface TokenOnchainState {
|
|
160
|
+
tokenAddress: string;
|
|
161
|
+
framework: TokenFramework;
|
|
162
|
+
name: string;
|
|
163
|
+
symbol: string;
|
|
164
|
+
decimals: number;
|
|
165
|
+
totalSupply: string;
|
|
166
|
+
environment: string;
|
|
167
|
+
degradedMetadata?: true;
|
|
168
|
+
details: TokenDetails;
|
|
169
|
+
documents: TokenOnchainDocument[] | null;
|
|
170
|
+
}
|
|
171
|
+
interface TokenRecordSummary {
|
|
172
|
+
tokenAddress: string;
|
|
173
|
+
name: string;
|
|
174
|
+
symbol: string;
|
|
175
|
+
decimals: number;
|
|
176
|
+
framework: TokenFramework;
|
|
177
|
+
assetType?: TokenAssetType;
|
|
178
|
+
totalSupply: string;
|
|
179
|
+
metadata: TokenDetails | null;
|
|
180
|
+
importedAt?: string;
|
|
181
|
+
updatedAt: string;
|
|
182
|
+
}
|
|
183
|
+
interface TokenRefresh {
|
|
184
|
+
onchain: TokenOnchainState;
|
|
185
|
+
frameworkMatches: boolean;
|
|
186
|
+
persisted: boolean;
|
|
187
|
+
storedFramework: TokenFramework;
|
|
188
|
+
record: TokenRecordSummary;
|
|
189
|
+
}
|
|
190
|
+
interface TokenRedetect {
|
|
191
|
+
tokenAddress: string;
|
|
192
|
+
frameworkChanged: boolean;
|
|
193
|
+
previous: {
|
|
194
|
+
framework: TokenFramework;
|
|
195
|
+
name: string;
|
|
196
|
+
symbol: string;
|
|
197
|
+
decimals: number;
|
|
198
|
+
totalSupply: string;
|
|
199
|
+
};
|
|
200
|
+
record: TokenRecordSummary;
|
|
201
|
+
}
|
|
202
|
+
interface TokenAssetTypeChange {
|
|
203
|
+
tokenAddress: string;
|
|
204
|
+
assetType: TokenAssetType;
|
|
205
|
+
previousAssetType: TokenAssetType;
|
|
206
|
+
updatedAt: string;
|
|
207
|
+
}
|
|
208
|
+
interface TokenPresentation {
|
|
209
|
+
description?: string;
|
|
210
|
+
issuerName?: string;
|
|
211
|
+
sector?: string;
|
|
212
|
+
website?: string;
|
|
213
|
+
ammAddress?: string;
|
|
214
|
+
reserveURI?: string;
|
|
215
|
+
}
|
|
216
|
+
interface TokenProfileUpdate {
|
|
217
|
+
tokenAddress: string;
|
|
218
|
+
profile: TokenProfile | null;
|
|
219
|
+
presentation: TokenPresentation;
|
|
220
|
+
updatedAt: string;
|
|
221
|
+
}
|
|
222
|
+
interface TokenImageUpdate {
|
|
223
|
+
tokenAddress: string;
|
|
224
|
+
imageURI: string | null;
|
|
225
|
+
updatedAt: string;
|
|
226
|
+
}
|
|
227
|
+
interface TokenRemoval {
|
|
228
|
+
removed: true;
|
|
229
|
+
cleared: Array<'profile' | 'imageURI'>;
|
|
230
|
+
instrumentRecordKept: boolean;
|
|
231
|
+
note: string;
|
|
232
|
+
}
|
|
233
|
+
type InstrumentSecurityClass = 'BOND' | 'NOTE' | 'PROFIT_PARTICIPATION' | 'SHARE' | 'FUND_UNIT' | 'ASSET_REFERENCED_TOKEN' | 'EMONEY_TOKEN' | 'OTHER_CRYPTO_ASSET' | 'OTHER';
|
|
234
|
+
type InstrumentDocumentType = 'ANLEIHEBEDINGUNGEN' | 'BASISINFORMATIONSBLATT' | 'WERTPAPIER_INFORMATIONSBLATT' | 'CRYPTO_ASSET_WHITEPAPER' | 'RESERVE_ATTESTATION' | 'REGISTER_EXTRACT' | 'ISSUER_ACCOUNTS' | 'VALUATION_REPORT' | 'RATING_REPORT' | 'PLEDGE_TEMPLATE' | 'OTHER';
|
|
235
|
+
interface InstrumentScheduleEntry {
|
|
236
|
+
date: string;
|
|
237
|
+
pricePct?: string | null;
|
|
238
|
+
}
|
|
239
|
+
interface InstrumentFields {
|
|
240
|
+
isin?: string | null;
|
|
241
|
+
wkn?: string | null;
|
|
242
|
+
instrumentName?: string | null;
|
|
243
|
+
issuerLei?: string | null;
|
|
244
|
+
currency?: string | null;
|
|
245
|
+
totalIssueSize?: string | null;
|
|
246
|
+
nominalPerUnit?: string | null;
|
|
247
|
+
minimumDenomination?: string | null;
|
|
248
|
+
securityClass?: InstrumentSecurityClass | null;
|
|
249
|
+
legalBasis?: 'EWPG_KRYPTOWERTPAPIER' | 'EWPG_ZENTRALREGISTERWERTPAPIER' | 'DEPOT_REPRESENTATION' | 'VERMOEGENSANLAGE' | 'MICAR_ART' | 'MICAR_EMT' | 'MICAR_OTHER' | 'OTHER' | null;
|
|
250
|
+
bearerOrRegistered?: 'INHABER' | 'NAMENS' | null;
|
|
251
|
+
governingLaw?: string | null;
|
|
252
|
+
jurisdiction?: string | null;
|
|
253
|
+
offerBasis?: 'PROSPECTUS' | 'EXEMPT_BELOW_THRESHOLD' | 'PRIVATE_PLACEMENT' | 'MICAR_WHITEPAPER_APPROVED' | 'MICAR_WHITEPAPER_NOTIFIED' | 'OTHER' | null;
|
|
254
|
+
prospectusRef?: string | null;
|
|
255
|
+
issuerAuthorisation?: 'CREDIT_INSTITUTION' | 'EMONEY_INSTITUTION' | 'MICAR_AUTHORISED' | 'NOT_REQUIRED' | 'UNKNOWN' | null;
|
|
256
|
+
ranking?: 'SENIOR_SECURED' | 'SENIOR_UNSECURED' | 'SUBORDINATED' | 'JUNIOR_SUBORDINATED' | 'EQUITY_LIKE' | null;
|
|
257
|
+
negativePledge?: boolean | null;
|
|
258
|
+
collateralisedBy?: string | null;
|
|
259
|
+
qualifiedSubordination?: boolean | null;
|
|
260
|
+
priorRankingFinancing?: 'NONE_DECLARED' | 'DISCLOSED' | 'UNKNOWN' | null;
|
|
261
|
+
priorRankingDetail?: string | null;
|
|
262
|
+
priorRankingAsOf?: string | null;
|
|
263
|
+
issueDate?: string | null;
|
|
264
|
+
maturityDate?: string | null;
|
|
265
|
+
perpetual?: boolean | null;
|
|
266
|
+
issuerCallDates?: InstrumentScheduleEntry[] | null;
|
|
267
|
+
holderPutDates?: InstrumentScheduleEntry[] | null;
|
|
268
|
+
recommendedHoldingPeriod?: string | null;
|
|
269
|
+
redemptionType?: 'BULLET_AT_PAR' | 'AMORTISING' | 'INDEXED' | 'PHYSICAL' | 'AT_PAR_ON_DEMAND' | 'AGAINST_RESERVE' | 'NO_REDEMPTION' | 'OTHER' | null;
|
|
270
|
+
redemptionPricePct?: string | null;
|
|
271
|
+
redemptionCurrency?: string | null;
|
|
272
|
+
payingAgent?: string | null;
|
|
273
|
+
redemptionMechanicsNote?: string | null;
|
|
274
|
+
redemptionOnChainEffect?: 'BURN' | 'TRANSFER_TO_ISSUER' | 'REGISTER_ONLY' | 'UNKNOWN' | null;
|
|
275
|
+
registerType?: 'KRYPTOWERTPAPIERREGISTER' | 'ZENTRALREGISTER' | 'DEPOT' | 'NONE' | null;
|
|
276
|
+
registerProviderLei?: string | null;
|
|
277
|
+
registerProviderName?: string | null;
|
|
278
|
+
registerProviderSupervisoryId?: string | null;
|
|
279
|
+
registerEntryReference?: string | null;
|
|
280
|
+
pledgeEntryCapability?: 'SUPPORTED' | 'NOT_SUPPORTED' | 'MANUAL_PROCESS' | 'UNKNOWN' | null;
|
|
281
|
+
pledgeEntryProcessRef?: string | null;
|
|
282
|
+
}
|
|
283
|
+
interface InstrumentDocumentInput {
|
|
284
|
+
docType: InstrumentDocumentType;
|
|
285
|
+
uri: string;
|
|
286
|
+
contentHash: string;
|
|
287
|
+
mimeType: string;
|
|
288
|
+
bytes: number;
|
|
289
|
+
language: string;
|
|
290
|
+
issuedAt: string;
|
|
291
|
+
cid?: string | null;
|
|
292
|
+
version?: string | null;
|
|
293
|
+
}
|
|
294
|
+
interface InstrumentInput {
|
|
295
|
+
instrument?: InstrumentFields;
|
|
296
|
+
documents?: InstrumentDocumentInput[];
|
|
297
|
+
presentation?: TokenPresentation | null;
|
|
298
|
+
takeOver?: boolean;
|
|
299
|
+
}
|
|
300
|
+
interface IssuerApproval {
|
|
301
|
+
signer: string;
|
|
302
|
+
signature: string;
|
|
303
|
+
recordVersion: number;
|
|
304
|
+
signedAt: string;
|
|
305
|
+
}
|
|
306
|
+
interface SaveInstrumentInput extends InstrumentInput {
|
|
307
|
+
issuerApproval?: IssuerApproval;
|
|
308
|
+
}
|
|
309
|
+
interface InstrumentFieldSpec {
|
|
310
|
+
key: string;
|
|
311
|
+
group: string;
|
|
312
|
+
kind: string;
|
|
313
|
+
values: string[] | null;
|
|
314
|
+
max: number | null;
|
|
315
|
+
wide?: boolean;
|
|
316
|
+
}
|
|
317
|
+
interface InstrumentSchema {
|
|
318
|
+
fields: InstrumentFieldSpec[];
|
|
319
|
+
presentationFields: InstrumentFieldSpec[];
|
|
320
|
+
enums: Record<string, string[]>;
|
|
321
|
+
optionsByRegime: Record<string, {
|
|
322
|
+
MICAR: string[];
|
|
323
|
+
SECURITIES: string[];
|
|
324
|
+
}>;
|
|
325
|
+
requiredByClass: Record<InstrumentSecurityClass, string[]>;
|
|
326
|
+
requiredDocumentsByClass: Record<InstrumentSecurityClass, InstrumentDocumentType[]>;
|
|
327
|
+
}
|
|
328
|
+
interface InstrumentAssertion {
|
|
329
|
+
kind: string;
|
|
330
|
+
companyName?: string | null;
|
|
331
|
+
name?: string | null;
|
|
332
|
+
authority?: {
|
|
333
|
+
basis: string;
|
|
334
|
+
wallet: string | null;
|
|
335
|
+
via?: string;
|
|
336
|
+
};
|
|
337
|
+
approval?: {
|
|
338
|
+
wallet: string;
|
|
339
|
+
digest: string | null;
|
|
340
|
+
signedAt: string | null;
|
|
341
|
+
recordVersion: number | null;
|
|
342
|
+
signature: string | null;
|
|
343
|
+
method: string | null;
|
|
344
|
+
message: string | null;
|
|
345
|
+
chainId: number | null;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
interface InstrumentField {
|
|
349
|
+
value: unknown;
|
|
350
|
+
provenance: 'CHAIN' | 'REGISTER_ATTESTED' | 'REGISTER_GLEIF' | 'ISSUER_ASSERTED' | 'ABSENT';
|
|
351
|
+
assertedBy: InstrumentAssertion | null;
|
|
352
|
+
assertedAt: string | null;
|
|
353
|
+
evidence: unknown | null;
|
|
354
|
+
verification: 'SIGNATURE_VERIFIED' | 'HASH_MATCHED' | 'ARITHMETIC_VALIDATED' | 'ISSUER_STATED' | 'FORMAT_ONLY' | 'NONE';
|
|
355
|
+
}
|
|
356
|
+
interface InstrumentDocument {
|
|
357
|
+
id: string;
|
|
358
|
+
docType: InstrumentDocumentType;
|
|
359
|
+
uri: string;
|
|
360
|
+
contentHash: string;
|
|
361
|
+
cid: string | null;
|
|
362
|
+
mimeType: string;
|
|
363
|
+
bytes: number;
|
|
364
|
+
language: string;
|
|
365
|
+
version: string | null;
|
|
366
|
+
issuedAt: string | null;
|
|
367
|
+
provenance: 'ISSUER_ASSERTED';
|
|
368
|
+
verification: 'FORMAT_ONLY';
|
|
369
|
+
}
|
|
370
|
+
interface InstrumentRecord {
|
|
371
|
+
tokenAddress: string;
|
|
372
|
+
version: number;
|
|
373
|
+
updatedAt: string;
|
|
374
|
+
fields: Record<string, InstrumentField>;
|
|
375
|
+
documents: InstrumentDocument[];
|
|
376
|
+
missingRequired: {
|
|
377
|
+
fields: string[];
|
|
378
|
+
documents: InstrumentDocumentType[];
|
|
379
|
+
};
|
|
380
|
+
assertedBy: InstrumentAssertion | null;
|
|
381
|
+
released: boolean;
|
|
382
|
+
editable: boolean;
|
|
383
|
+
}
|
|
384
|
+
interface InstrumentAuthority {
|
|
385
|
+
holds: boolean | null;
|
|
386
|
+
basis?: string | null;
|
|
387
|
+
wallet?: string | null;
|
|
388
|
+
wallets?: string[];
|
|
389
|
+
owner?: string | null;
|
|
390
|
+
readFailed?: true;
|
|
391
|
+
message?: string;
|
|
392
|
+
}
|
|
393
|
+
interface InstrumentView {
|
|
394
|
+
instrument: InstrumentRecord | null;
|
|
395
|
+
assertedHere: boolean;
|
|
396
|
+
presentation: TokenPresentation;
|
|
397
|
+
carriedFromProfile: Partial<InstrumentFields>;
|
|
398
|
+
unmappableFromProfile: {
|
|
399
|
+
fields: string[];
|
|
400
|
+
documents: number;
|
|
401
|
+
};
|
|
402
|
+
authority: InstrumentAuthority;
|
|
403
|
+
issuedHere: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface IssuerApprovalRequest {
|
|
406
|
+
tokenAddress: string;
|
|
407
|
+
chainId: number;
|
|
408
|
+
instanceId: string;
|
|
409
|
+
contentDigest: string;
|
|
410
|
+
recordVersion: number;
|
|
411
|
+
signedAt: string;
|
|
412
|
+
expiresAt: string;
|
|
413
|
+
message: string;
|
|
414
|
+
takeOverRequired: boolean;
|
|
415
|
+
signWith: string;
|
|
416
|
+
issuerApproval: {
|
|
417
|
+
signer: null;
|
|
418
|
+
signature: null;
|
|
419
|
+
recordVersion: number;
|
|
420
|
+
signedAt: string;
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
interface SavedInstrument {
|
|
424
|
+
instrument: InstrumentRecord;
|
|
425
|
+
presentation: TokenPresentation;
|
|
426
|
+
carriedFromProfile: Partial<InstrumentFields>;
|
|
427
|
+
unmappableFromProfile: {
|
|
428
|
+
fields: string[];
|
|
429
|
+
documents: number;
|
|
430
|
+
};
|
|
431
|
+
authority: {
|
|
432
|
+
basis: string;
|
|
433
|
+
wallet: string | null;
|
|
434
|
+
via?: string;
|
|
435
|
+
};
|
|
436
|
+
issuerApproval?: {
|
|
437
|
+
signer: string;
|
|
438
|
+
method: 'ECDSA' | 'ERC1271';
|
|
439
|
+
recordVersion: number;
|
|
440
|
+
signedAt: string;
|
|
441
|
+
};
|
|
442
|
+
tookOver?: true;
|
|
443
|
+
issuedHere: boolean;
|
|
444
|
+
}
|
|
445
|
+
interface InstrumentRelease {
|
|
446
|
+
released: true;
|
|
447
|
+
instrument: InstrumentRecord;
|
|
448
|
+
note: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
declare class Tokens {
|
|
452
|
+
private readonly ctx;
|
|
453
|
+
constructor(ctx: LendingContext);
|
|
454
|
+
private tokenPath;
|
|
455
|
+
private instrumentPath;
|
|
456
|
+
detect(input: DetectTokenInput): Promise<DetectedToken>;
|
|
457
|
+
import(input: ImportTokenInput): Promise<ImportedToken>;
|
|
458
|
+
upload(file: Blob | Uint8Array, fileName: string, options?: TokenUploadOptions): Promise<TokenUpload>;
|
|
459
|
+
list(options?: TokenListOptions): Promise<TokenListEntry[]>;
|
|
460
|
+
holders(): Promise<TokenHolderCounts>;
|
|
461
|
+
get(tokenAddress: string): Promise<TokenImport>;
|
|
462
|
+
refresh(tokenAddress: string): Promise<TokenRefresh>;
|
|
463
|
+
redetect(tokenAddress: string, assetStandard?: TokenAssetStandard): Promise<TokenRedetect>;
|
|
464
|
+
setAssetType(tokenAddress: string, assetType: TokenAssetType): Promise<TokenAssetTypeChange>;
|
|
465
|
+
setProfile(tokenAddress: string, presentation: TokenPresentation | null): Promise<TokenProfileUpdate>;
|
|
466
|
+
setImage(tokenAddress: string, imageURI: string | null): Promise<TokenImageUpdate>;
|
|
467
|
+
remove(tokenAddress: string): Promise<TokenRemoval>;
|
|
468
|
+
instrumentSchema(): Promise<InstrumentSchema>;
|
|
469
|
+
instrument(tokenAddress: string): Promise<InstrumentView>;
|
|
470
|
+
requestApproval(tokenAddress: string, input: InstrumentInput): Promise<IssuerApprovalRequest>;
|
|
471
|
+
saveInstrument(tokenAddress: string, input: SaveInstrumentInput): Promise<SavedInstrument>;
|
|
472
|
+
saveInstrument(tokenAddress: string, input: InstrumentInput, options: SignOptions): Promise<SavedInstrument>;
|
|
473
|
+
releaseInstrument(tokenAddress: string): Promise<InstrumentRelease>;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export { type DetectTokenInput, type DetectedToken, type ImportTokenInput, type ImportedToken, type InstrumentAssertion, type InstrumentAuthority, type InstrumentDocument, type InstrumentDocumentInput, type InstrumentDocumentType, type InstrumentField, type InstrumentFieldSpec, type InstrumentFields, type InstrumentInput, type InstrumentRecord, type InstrumentRelease, type InstrumentScheduleEntry, type InstrumentSchema, type InstrumentSecurityClass, type InstrumentView, type IssuerApproval, type IssuerApprovalRequest, type SaveInstrumentInput, type SavedInstrument, type TokenAssetStandard, type TokenAssetType, type TokenAssetTypeChange, type TokenAuthority, type TokenDetails, type TokenFramework, type TokenHolderCount, type TokenHolderCounts, type TokenImageUpdate, type TokenImport, type TokenLendingEligibility, type TokenListEntry, type TokenListOptions, type TokenOnchainDocument, type TokenOnchainState, type TokenPresentation, type TokenProfile, type TokenProfileDocument, type TokenProfileUpdate, type TokenRecordSummary, type TokenRedetect, type TokenRefresh, type TokenRemoval, type TokenUpload, type TokenUploadOptions, Tokens };
|