@polymeshassociation/polymesh-sdk 24.1.0 → 24.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -12
- package/api/client/Identities.d.ts +2 -2
- package/api/client/Identities.d.ts.map +1 -1
- package/api/client/Identities.js.map +1 -1
- package/api/client/types.d.ts +192 -0
- package/api/client/types.d.ts.map +1 -0
- package/api/client/types.js +81 -0
- package/api/client/types.js.map +1 -0
- package/api/entities/Account/types.d.ts +15 -4
- package/api/entities/Account/types.d.ts.map +1 -1
- package/api/entities/Account/types.js.map +1 -1
- package/api/entities/Asset/types.d.ts +172 -1
- package/api/entities/Asset/types.d.ts.map +1 -1
- package/api/entities/Asset/types.js +130 -0
- package/api/entities/Asset/types.js.map +1 -1
- package/api/entities/Instruction/types.d.ts +33 -1
- package/api/entities/Instruction/types.d.ts.map +1 -1
- package/api/entities/Instruction/types.js.map +1 -1
- package/api/entities/MultiSigProposal/types.d.ts +7 -1
- package/api/entities/MultiSigProposal/types.d.ts.map +1 -1
- package/api/entities/MultiSigProposal/types.js.map +1 -1
- package/api/entities/types.d.ts +594 -1
- package/api/entities/types.d.ts.map +1 -1
- package/api/entities/types.js +110 -0
- package/api/entities/types.js.map +1 -1
- package/api/procedures/allowIdentityToCreatePortfolios.d.ts +1 -7
- package/api/procedures/allowIdentityToCreatePortfolios.d.ts.map +1 -1
- package/api/procedures/allowIdentityToCreatePortfolios.js.map +1 -1
- package/api/procedures/revokeIdentityToCreatePortfolios.d.ts +1 -7
- package/api/procedures/revokeIdentityToCreatePortfolios.d.ts.map +1 -1
- package/api/procedures/revokeIdentityToCreatePortfolios.js.map +1 -1
- package/api/procedures/types.d.ts +257 -5
- package/api/procedures/types.d.ts.map +1 -1
- package/api/procedures/types.js +98 -1
- package/api/procedures/types.js.map +1 -1
- package/base/types.d.ts +132 -1
- package/base/types.d.ts.map +1 -1
- package/base/types.js +70 -0
- package/base/types.js.map +1 -1
- package/internal.d.ts +2 -2
- package/internal.d.ts.map +1 -1
- package/internal.js +1 -1
- package/internal.js.map +1 -1
- package/npm-package/polymeshassociation-polymesh-sdk-24.2.0.tgz +0 -0
- package/package.json +1 -1
- package/types/index.d.ts +2 -1410
- package/types/index.d.ts.map +1 -1
- package/types/index.js +7 -493
- package/types/index.js.map +1 -1
- package/npm-package/polymeshassociation-polymesh-sdk-24.1.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
# [24.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* 🐛 Remove future block constraint on `endAfterBlock` ([43878e0](https://github.com/PolymeshAssociation/polymesh-sdk/commit/43878e050ba29217841425a1134c875a85c5afc8))
|
|
1
|
+
# [24.2.0](https://github.com/PolymeshAssociation/polymesh-sdk/compare/v24.1.0...v24.2.0) (2024-04-24)
|
|
7
2
|
|
|
8
3
|
|
|
9
4
|
### Features
|
|
10
5
|
|
|
11
|
-
* 🎸
|
|
12
|
-
* 🎸 add getTransactionHistory to NFT Collection ([468493e](https://github.com/PolymeshAssociation/polymesh-sdk/commit/468493ee733a037ea42a174678640e1c97138a78))
|
|
13
|
-
* 🎸 add network.supportConfidentialAssets method ([f3a60dc](https://github.com/PolymeshAssociation/polymesh-sdk/commit/f3a60dc63366fc6b97d75e5d9d546fc1db84128f))
|
|
14
|
-
* 🎸 allow connection to polymesh private networks ([a2a68cd](https://github.com/PolymeshAssociation/polymesh-sdk/commit/a2a68cd84e946b4569cd4ae5c0ba37a0a3646f89))
|
|
15
|
-
* 🎸 allow funding round to be specified during nft create ([4bf745f](https://github.com/PolymeshAssociation/polymesh-sdk/commit/4bf745f509695781abb6ff05621ee8785914e962))
|
|
16
|
-
* 🎸 Identities:rotatePrimaryKeyToSecondary ([cdd3f1d](https://github.com/PolymeshAssociation/polymesh-sdk/commit/cdd3f1d38ee9bd2737b9882c3115a4cc142ce27a))
|
|
6
|
+
* 🎸 Refactor types into module specific files ([f7e7e73](https://github.com/PolymeshAssociation/polymesh-sdk/commit/f7e7e738c22d778139116389e08a206bcaa8a198))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AttestPrimaryKeyRotationParams, CreateChildIdentityParams, ProcedureMethod, RegisterIdentityParams, RotatePrimaryKeyParams, RotatePrimaryKeyToSecondaryParams } from "../../types";
|
|
1
|
+
import { AuthorizationRequest, ChildIdentity, Context, Identity, NumberedPortfolio } from "../../internal";
|
|
2
|
+
import { AllowIdentityToCreatePortfoliosParams, AttestPrimaryKeyRotationParams, CreateChildIdentityParams, ProcedureMethod, RegisterIdentityParams, RevokeIdentityToCreatePortfoliosParams, RotatePrimaryKeyParams, RotatePrimaryKeyToSecondaryParams } from "../../types";
|
|
3
3
|
/**
|
|
4
4
|
* Handles all Identity related functionality
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Identities.d.ts","sourceRoot":"","sources":["../../../src/api/client/Identities.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Identities.d.ts","sourceRoot":"","sources":["../../../src/api/client/Identities.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EACpB,aAAa,EACb,OAAO,EAGP,QAAQ,EACR,iBAAiB,EAKlB,uBAAmB;AACpB,OAAO,EACL,qCAAqC,EACrC,8BAA8B,EAC9B,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,sCAAsC,EACtC,sBAAsB,EACtB,iCAAiC,EAClC,oBAAgB;AAIjB;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAU;IAEzB;;OAEG;gBACS,OAAO,EAAE,OAAO;IAgE5B;;;;;;;;;;OAUG;IACI,gBAAgB,EAAE,eAAe,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;IAE3E;;;;;;;;;;OAUG;IACI,wBAAwB,EA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AM,EAAE,CAAC;CAqB7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Identities.js","sourceRoot":"","sources":["../../../src/api/client/Identities.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"Identities.js","sourceRoot":"","sources":["../../../src/api/client/Identities.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkE;AAClE,6CAcoB;AAWpB,uDAAwD;AACxD,mDAA2F;AAE3F;;GAEG;AACH,MAAa,UAAU;IAGrB;;OAEG;IACH,YAAY,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,gBAAgB,GAAG,IAAA,gCAAqB,EAC3C,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAgB,EAAE,IAAI,CAAC,EAAE,EACzD,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,wBAAwB,GAAG,IAAA,gCAAqB,EACnD,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,mCAAwB,EAAE,IAAI,CAAC,EAAE,EACjE,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,gBAAgB,GAAG,IAAA,gCAAqB,EAC3C,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAgB,EAAE,IAAI,CAAC,EAAE,EACzD,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,2BAA2B,GAAG,IAAA,gCAAqB,EACtD,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,sCAA2B,EAAE,IAAI,CAAC,EAAE,EACpE,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,IAAA,gCAAqB,EAC1C;YACE,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAAC;gBAC3B,2BAAgB;gBAChB;oBACE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CA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C1D,OAAO,IAAA,qBAAU,EAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1D,CAAC;IAuCD;;;;OAIG;IACU,oBAAoB,CAAC,GAAsB;;YACtD,MAAM,EACJ,OAAO,EAAE,EACP,WAAW,EAAE,EAAE,KAAK,EAAE,GACvB,GACF,GAAG,IAAI,CAAC;YAET,MAAM,QAAQ,GAAG,IAAA,qBAAU,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAE/C,MAAM,IAAA,+BAAoB,EAAC,QAAQ,CAAC,CAAC;YAErC,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnF,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE;gBACrC,MAAM,EACJ,IAAI,EAAE,CAAC,EAAE,mBAAmB,CAAC,GAC9B,GAAG,UAAU,CAAC;gBAEf,OAAO,IAAA,+BAAkB,EAAC,mBAAmB,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAvOD,gCAuOC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { ApiOptions } from '@polkadot/api/types';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TxTag } from "../../types";
|
|
4
|
+
export interface ExtrinsicData {
|
|
5
|
+
blockHash: string;
|
|
6
|
+
blockNumber: BigNumber;
|
|
7
|
+
blockDate: Date;
|
|
8
|
+
extrinsicIdx: BigNumber;
|
|
9
|
+
/**
|
|
10
|
+
* public key of the signer. Unsigned transactions have no signer, in which case this value is null (example: an enacted governance proposal)
|
|
11
|
+
*/
|
|
12
|
+
address: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* nonce of the transaction. Null for unsigned transactions where address is null
|
|
15
|
+
*/
|
|
16
|
+
nonce: BigNumber | null;
|
|
17
|
+
txTag: TxTag;
|
|
18
|
+
params: Record<string, unknown>[];
|
|
19
|
+
success: boolean;
|
|
20
|
+
specVersionId: BigNumber;
|
|
21
|
+
extrinsicHash: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ExtrinsicDataWithFees extends ExtrinsicData {
|
|
24
|
+
fee: Fees;
|
|
25
|
+
}
|
|
26
|
+
export interface ProtocolFees {
|
|
27
|
+
tag: TxTag;
|
|
28
|
+
fees: BigNumber;
|
|
29
|
+
}
|
|
30
|
+
export interface MiddlewareMetadata {
|
|
31
|
+
chain: string;
|
|
32
|
+
genesisHash: string;
|
|
33
|
+
indexerHealthy: boolean;
|
|
34
|
+
lastProcessedHeight: BigNumber;
|
|
35
|
+
lastProcessedTimestamp: Date;
|
|
36
|
+
specName: string;
|
|
37
|
+
targetHeight: BigNumber;
|
|
38
|
+
}
|
|
39
|
+
export interface SubmissionDetails {
|
|
40
|
+
blockHash: string;
|
|
41
|
+
transactionIndex: BigNumber;
|
|
42
|
+
transactionHash: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Specifies possible types of errors in the SDK
|
|
46
|
+
*/
|
|
47
|
+
export declare enum ErrorCode {
|
|
48
|
+
/**
|
|
49
|
+
* transaction removed from the tx pool
|
|
50
|
+
*/
|
|
51
|
+
TransactionAborted = "TransactionAborted",
|
|
52
|
+
/**
|
|
53
|
+
* user rejected the transaction in their wallet
|
|
54
|
+
*/
|
|
55
|
+
TransactionRejectedByUser = "TransactionRejectedByUser",
|
|
56
|
+
/**
|
|
57
|
+
* transaction failed due to an on-chain error. This is a business logic error,
|
|
58
|
+
* and it should be caught by the SDK before being sent to the chain.
|
|
59
|
+
* Please report it to the Polymesh team
|
|
60
|
+
*/
|
|
61
|
+
TransactionReverted = "TransactionReverted",
|
|
62
|
+
/**
|
|
63
|
+
* error that should cause termination of the calling application
|
|
64
|
+
*/
|
|
65
|
+
FatalError = "FatalError",
|
|
66
|
+
/**
|
|
67
|
+
* user input error. This means that one or more inputs passed by the user
|
|
68
|
+
* do not conform to expected value ranges or types
|
|
69
|
+
*/
|
|
70
|
+
ValidationError = "ValidationError",
|
|
71
|
+
/**
|
|
72
|
+
* user does not have the required roles/permissions to perform an operation
|
|
73
|
+
*/
|
|
74
|
+
NotAuthorized = "NotAuthorized",
|
|
75
|
+
/**
|
|
76
|
+
* errors encountered when interacting with the historic data middleware (GQL server)
|
|
77
|
+
*/
|
|
78
|
+
MiddlewareError = "MiddlewareError",
|
|
79
|
+
/**
|
|
80
|
+
* the data that is being fetched does not exist on-chain, or relies on non-existent data. There are
|
|
81
|
+
* some cases where the data did exist at some point, but has been deleted to save storage space
|
|
82
|
+
*/
|
|
83
|
+
DataUnavailable = "DataUnavailable",
|
|
84
|
+
/**
|
|
85
|
+
* the data that is being written to the chain is the same data that is already in place. This would result
|
|
86
|
+
* in a redundant/useless transaction being executed
|
|
87
|
+
*/
|
|
88
|
+
NoDataChange = "NoDataChange",
|
|
89
|
+
/**
|
|
90
|
+
* the data that is being written to the chain would result in some limit being exceeded. For example, adding a transfer
|
|
91
|
+
* restriction when the maximum possible amount has already been added
|
|
92
|
+
*/
|
|
93
|
+
LimitExceeded = "LimitExceeded",
|
|
94
|
+
/**
|
|
95
|
+
* one or more base prerequisites for a transaction to be successful haven't been met. For example, reserving a ticker requires
|
|
96
|
+
* said ticker to not be already reserved. Attempting to reserve a ticker without that prerequisite being met would result in this
|
|
97
|
+
* type of error. Attempting to create an entity that already exists would also fall into this category,
|
|
98
|
+
* if the entity in question is supposed to be unique
|
|
99
|
+
*/
|
|
100
|
+
UnmetPrerequisite = "UnmetPrerequisite",
|
|
101
|
+
/**
|
|
102
|
+
* this type of error is thrown when attempting to delete/modify an entity which has other entities depending on it. For example, deleting
|
|
103
|
+
* a Portfolio that still holds assets, or removing a Checkpoint Schedule that is being referenced by a Corporate Action
|
|
104
|
+
*/
|
|
105
|
+
EntityInUse = "EntityInUse",
|
|
106
|
+
/**
|
|
107
|
+
* one or more parties involved in the transaction do not have enough balance to perform it
|
|
108
|
+
*/
|
|
109
|
+
InsufficientBalance = "InsufficientBalance",
|
|
110
|
+
/**
|
|
111
|
+
* errors that are the result of something unforeseen.
|
|
112
|
+
* These should generally be reported to the Polymesh team
|
|
113
|
+
*/
|
|
114
|
+
UnexpectedError = "UnexpectedError",
|
|
115
|
+
/**
|
|
116
|
+
* general purpose errors that don't fit well into the other categories
|
|
117
|
+
*/
|
|
118
|
+
General = "General"
|
|
119
|
+
}
|
|
120
|
+
export interface MiddlewareConfig {
|
|
121
|
+
link: string;
|
|
122
|
+
key: string;
|
|
123
|
+
}
|
|
124
|
+
export interface PolkadotConfig {
|
|
125
|
+
/**
|
|
126
|
+
* provide a locally saved metadata file for a modestly fast startup time (e.g. 1 second when provided, 1.5 seconds without).
|
|
127
|
+
*
|
|
128
|
+
* @note if not provided the SDK will read the needed data from chain during startup
|
|
129
|
+
*
|
|
130
|
+
* @note format is key as genesis hash and spec version and the value hex encoded chain metadata
|
|
131
|
+
*
|
|
132
|
+
* @example creating valid metadata
|
|
133
|
+
* ```ts
|
|
134
|
+
const meta = _polkadotApi.runtimeMetadata.toHex();
|
|
135
|
+
const genesisHash = _polkadotApi.genesisHash;
|
|
136
|
+
const specVersion = _polkadotApi.runtimeVersion.specVersion;
|
|
137
|
+
|
|
138
|
+
const metadata = {
|
|
139
|
+
[`${genesisHash}-${specVersion}`]: meta,
|
|
140
|
+
};
|
|
141
|
+
```
|
|
142
|
+
*/
|
|
143
|
+
metadata?: ApiOptions['metadata'];
|
|
144
|
+
/**
|
|
145
|
+
* set to `true` to disable polkadot start up warnings
|
|
146
|
+
*/
|
|
147
|
+
noInitWarn?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* allows for types to be provided for multiple chain specs at once
|
|
150
|
+
*
|
|
151
|
+
* @note shouldn't be needed for most use cases
|
|
152
|
+
*/
|
|
153
|
+
typesBundle?: ApiOptions['typesBundle'];
|
|
154
|
+
}
|
|
155
|
+
export interface EventIdentifier {
|
|
156
|
+
blockNumber: BigNumber;
|
|
157
|
+
blockHash: string;
|
|
158
|
+
blockDate: Date;
|
|
159
|
+
eventIndex: BigNumber;
|
|
160
|
+
}
|
|
161
|
+
export interface NetworkProperties {
|
|
162
|
+
name: string;
|
|
163
|
+
version: BigNumber;
|
|
164
|
+
}
|
|
165
|
+
export interface Fees {
|
|
166
|
+
/**
|
|
167
|
+
* bonus fee charged by certain transactions
|
|
168
|
+
*/
|
|
169
|
+
protocol: BigNumber;
|
|
170
|
+
/**
|
|
171
|
+
* regular network fee
|
|
172
|
+
*/
|
|
173
|
+
gas: BigNumber;
|
|
174
|
+
/**
|
|
175
|
+
* sum of the protocol and gas fees
|
|
176
|
+
*/
|
|
177
|
+
total: BigNumber;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* CustomClaimType
|
|
181
|
+
*/
|
|
182
|
+
export declare type CustomClaimType = {
|
|
183
|
+
name: string;
|
|
184
|
+
id: BigNumber;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* CustomClaimType with DID that registered the CustomClaimType
|
|
188
|
+
*/
|
|
189
|
+
export declare type CustomClaimTypeWithDid = CustomClaimType & {
|
|
190
|
+
did?: string;
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAEhC,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,OAAO,E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AGG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,mBAAmB,wBAAwB;IAC3C;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;OAEG;IACH,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAElC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,GAAG,EAAE,SAAS,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,SAAS,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Specifies possible types of errors in the SDK
|
|
6
|
+
*/
|
|
7
|
+
var ErrorCode;
|
|
8
|
+
(function (ErrorCode) {
|
|
9
|
+
/**
|
|
10
|
+
* transaction removed from the tx pool
|
|
11
|
+
*/
|
|
12
|
+
ErrorCode["TransactionAborted"] = "TransactionAborted";
|
|
13
|
+
/**
|
|
14
|
+
* user rejected the transaction in their wallet
|
|
15
|
+
*/
|
|
16
|
+
ErrorCode["TransactionRejectedByUser"] = "TransactionRejectedByUser";
|
|
17
|
+
/**
|
|
18
|
+
* transaction failed due to an on-chain error. This is a business logic error,
|
|
19
|
+
* and it should be caught by the SDK before being sent to the chain.
|
|
20
|
+
* Please report it to the Polymesh team
|
|
21
|
+
*/
|
|
22
|
+
ErrorCode["TransactionReverted"] = "TransactionReverted";
|
|
23
|
+
/**
|
|
24
|
+
* error that should cause termination of the calling application
|
|
25
|
+
*/
|
|
26
|
+
ErrorCode["FatalError"] = "FatalError";
|
|
27
|
+
/**
|
|
28
|
+
* user input error. This means that one or more inputs passed by the user
|
|
29
|
+
* do not conform to expected value ranges or types
|
|
30
|
+
*/
|
|
31
|
+
ErrorCode["ValidationError"] = "ValidationError";
|
|
32
|
+
/**
|
|
33
|
+
* user does not have the required roles/permissions to perform an operation
|
|
34
|
+
*/
|
|
35
|
+
ErrorCode["NotAuthorized"] = "NotAuthorized";
|
|
36
|
+
/**
|
|
37
|
+
* errors encountered when interacting with the historic data middleware (GQL server)
|
|
38
|
+
*/
|
|
39
|
+
ErrorCode["MiddlewareError"] = "MiddlewareError";
|
|
40
|
+
/**
|
|
41
|
+
* the data that is being fetched does not exist on-chain, or relies on non-existent data. There are
|
|
42
|
+
* some cases where the data did exist at some point, but has been deleted to save storage space
|
|
43
|
+
*/
|
|
44
|
+
ErrorCode["DataUnavailable"] = "DataUnavailable";
|
|
45
|
+
/**
|
|
46
|
+
* the data that is being written to the chain is the same data that is already in place. This would result
|
|
47
|
+
* in a redundant/useless transaction being executed
|
|
48
|
+
*/
|
|
49
|
+
ErrorCode["NoDataChange"] = "NoDataChange";
|
|
50
|
+
/**
|
|
51
|
+
* the data that is being written to the chain would result in some limit being exceeded. For example, adding a transfer
|
|
52
|
+
* restriction when the maximum possible amount has already been added
|
|
53
|
+
*/
|
|
54
|
+
ErrorCode["LimitExceeded"] = "LimitExceeded";
|
|
55
|
+
/**
|
|
56
|
+
* one or more base prerequisites for a transaction to be successful haven't been met. For example, reserving a ticker requires
|
|
57
|
+
* said ticker to not be already reserved. Attempting to reserve a ticker without that prerequisite being met would result in this
|
|
58
|
+
* type of error. Attempting to create an entity that already exists would also fall into this category,
|
|
59
|
+
* if the entity in question is supposed to be unique
|
|
60
|
+
*/
|
|
61
|
+
ErrorCode["UnmetPrerequisite"] = "UnmetPrerequisite";
|
|
62
|
+
/**
|
|
63
|
+
* this type of error is thrown when attempting to delete/modify an entity which has other entities depending on it. For example, deleting
|
|
64
|
+
* a Portfolio that still holds assets, or removing a Checkpoint Schedule that is being referenced by a Corporate Action
|
|
65
|
+
*/
|
|
66
|
+
ErrorCode["EntityInUse"] = "EntityInUse";
|
|
67
|
+
/**
|
|
68
|
+
* one or more parties involved in the transaction do not have enough balance to perform it
|
|
69
|
+
*/
|
|
70
|
+
ErrorCode["InsufficientBalance"] = "InsufficientBalance";
|
|
71
|
+
/**
|
|
72
|
+
* errors that are the result of something unforeseen.
|
|
73
|
+
* These should generally be reported to the Polymesh team
|
|
74
|
+
*/
|
|
75
|
+
ErrorCode["UnexpectedError"] = "UnexpectedError";
|
|
76
|
+
/**
|
|
77
|
+
* general purpose errors that don't fit well into the other categories
|
|
78
|
+
*/
|
|
79
|
+
ErrorCode["General"] = "General";
|
|
80
|
+
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
81
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/client/types.ts"],"names":[],"mappings":";;;AAkDA;;GAEG;AACH,IAAY,SAwEX;AAxED,WAAY,SAAS;IACnB;;OAEG;IACH,sDAAyC,CAAA;IACzC;;OAEG;IACH,oEAAuD,CAAA;IACvD;;;;OAIG;IACH,wDAA2C,CAAA;IAC3C;;OAEG;IACH,sCAAyB,CAAA;IACzB;;;OAGG;IACH,gDAAmC,CAAA;IACnC;;OAEG;IACH,4CAA+B,CAAA;IAC/B;;OAEG;IACH,gDAAmC,CAAA;IACnC;;;OAGG;IACH,gDAAmC,CAAA;IACnC;;;OAGG;IACH,0CAA6B,CAAA;IAC7B;;;OAGG;IACH,4CAA+B,CAAA;IAC/B;;;;;OAKG;IACH,oDAAuC,CAAA;IACvC;;;OAGG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,wDAA2C,CAAA;IAC3C;;;OAGG;IACH,gDAAmC,CAAA;IACnC;;OAEG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAxEW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAwEpB"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { Account, Identity } from "../../../internal";
|
|
3
3
|
import { BalanceTypeEnum, CallIdEnum, EventIdEnum, ModuleIdEnum } from "../../../middleware/types";
|
|
4
|
-
import { EventIdentifier
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { EventIdentifier } from "../../../types";
|
|
5
|
+
export interface Balance {
|
|
6
|
+
/**
|
|
7
|
+
* balance available for transferring and paying fees
|
|
8
|
+
*/
|
|
9
|
+
free: BigNumber;
|
|
10
|
+
/**
|
|
11
|
+
* unavailable balance, either bonded for staking or locked for some other purpose
|
|
12
|
+
*/
|
|
13
|
+
locked: BigNumber;
|
|
14
|
+
/**
|
|
15
|
+
* free + locked
|
|
16
|
+
*/
|
|
17
|
+
total: BigNumber;
|
|
8
18
|
}
|
|
19
|
+
export declare type AccountBalance = Balance;
|
|
9
20
|
/**
|
|
10
21
|
* Distinguishes MultiSig and Smart Contract accounts
|
|
11
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/Account/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,0BAAmB;AAC/C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,kCAA2B;AAC5F,OAAO,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/Account/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,0BAAmB;AAC/C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,kCAA2B;AAC5F,OAAO,EAAE,eAAe,EAAE,uBAAgB;AAE1C,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,oBAAY,cAAc,GAAG,OAAO,CAAC;AAErC;;GAEG;AACH,oBAAY,cAAc;IACxB;;OAEG;IACH,MAAM,KAAK;IACX;;OAEG;IACH,QAAQ,aAAa;IACrB;;OAEG;IACH,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,oBAAY,uBAAuB;IACjC;;OAEG;IACH,UAAU,eAAe;IACzB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,cAAc,mBAAmB;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,uBAAuB,CAAC;CACnC;AAED,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D;;;OAGG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/entities/Account/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/entities/Account/types.ts"],"names":[],"mappings":";;;AAuBA;;GAEG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACxB;;OAEG;IACH,6BAAW,CAAA;IACX;;OAEG;IACH,uCAAqB,CAAA;IACrB;;OAEG;IACH,iDAA+B,CAAA;AACjC,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB;AAED;;GAEG;AACH,IAAY,uBAiBX;AAjBD,WAAY,uBAAuB;IACjC;;OAEG;IACH,oDAAyB,CAAA;IACzB;;OAEG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,kDAAuB,CAAA;IACvB;;OAEG;IACH,4DAAiC,CAAA;AACnC,CAAC,EAjBW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAiBlC"}
|
|
@@ -1,12 +1,56 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { CustomPermissionGroup, DefaultPortfolio, FungibleAsset, Identity, KnownPermissionGroup, NftCollection, NumberedPortfolio } from "../../../internal";
|
|
3
3
|
import { EventIdEnum } from "../../../middleware/types";
|
|
4
|
-
import { Compliance, EventIdentifier, MetadataDetails, MetadataType, Nft,
|
|
4
|
+
import { Compliance, EventIdentifier, MetadataDetails, MetadataType, Nft, TransferRestriction, Venue } from "../../../types";
|
|
5
5
|
/**
|
|
6
6
|
* Represents a generic asset on chain. Common functionality (e.g. documents) can be interacted with directly. For type specific functionality (e.g. issue) the type can
|
|
7
7
|
* be narrowed via `instanceof` operator, or by using a more specific getter
|
|
8
8
|
*/
|
|
9
9
|
export declare type Asset = FungibleAsset | NftCollection;
|
|
10
|
+
export declare enum KnownAssetType {
|
|
11
|
+
EquityCommon = "EquityCommon",
|
|
12
|
+
EquityPreferred = "EquityPreferred",
|
|
13
|
+
Commodity = "Commodity",
|
|
14
|
+
FixedIncome = "FixedIncome",
|
|
15
|
+
Reit = "Reit",
|
|
16
|
+
Fund = "Fund",
|
|
17
|
+
RevenueShareAgreement = "RevenueShareAgreement",
|
|
18
|
+
StructuredProduct = "StructuredProduct",
|
|
19
|
+
Derivative = "Derivative",
|
|
20
|
+
StableCoin = "StableCoin"
|
|
21
|
+
}
|
|
22
|
+
export declare enum KnownNftType {
|
|
23
|
+
Derivative = "Derivative",
|
|
24
|
+
FixedIncome = "FixedIncome",
|
|
25
|
+
Invoice = "Invoice"
|
|
26
|
+
}
|
|
27
|
+
export declare enum SecurityIdentifierType {
|
|
28
|
+
Isin = "Isin",
|
|
29
|
+
Cusip = "Cusip",
|
|
30
|
+
Cins = "Cins",
|
|
31
|
+
Lei = "Lei",
|
|
32
|
+
Figi = "Figi"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Alphanumeric standardized security identifier
|
|
36
|
+
*/
|
|
37
|
+
export interface SecurityIdentifier {
|
|
38
|
+
type: SecurityIdentifierType;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Document attached to a token
|
|
43
|
+
*/
|
|
44
|
+
export interface AssetDocument {
|
|
45
|
+
name: string;
|
|
46
|
+
uri: string;
|
|
47
|
+
/**
|
|
48
|
+
* hex representation of the document (must be prefixed by "0x")
|
|
49
|
+
*/
|
|
50
|
+
contentHash?: string;
|
|
51
|
+
type?: string;
|
|
52
|
+
filedAt?: Date;
|
|
53
|
+
}
|
|
10
54
|
/**
|
|
11
55
|
* Properties that uniquely identify an Asset
|
|
12
56
|
*/
|
|
@@ -151,4 +195,131 @@ export interface VenueFilteringDetails {
|
|
|
151
195
|
export declare type CollectionKey = MetadataKeyId & MetadataDetails;
|
|
152
196
|
export * from './Fungible/Checkpoints/types';
|
|
153
197
|
export * from './Fungible/CorporateActions/types';
|
|
198
|
+
/**
|
|
199
|
+
* ERC1400 compliant transfer status
|
|
200
|
+
*/
|
|
201
|
+
export declare enum TransferStatus {
|
|
202
|
+
Failure = "Failure",
|
|
203
|
+
Success = "Success",
|
|
204
|
+
InsufficientBalance = "InsufficientBalance",
|
|
205
|
+
InsufficientAllowance = "InsufficientAllowance",
|
|
206
|
+
TransfersHalted = "TransfersHalted",
|
|
207
|
+
FundsLocked = "FundsLocked",
|
|
208
|
+
InvalidSenderAddress = "InvalidSenderAddress",
|
|
209
|
+
InvalidReceiverAddress = "InvalidReceiverAddress",
|
|
210
|
+
InvalidOperator = "InvalidOperator",
|
|
211
|
+
InvalidSenderIdentity = "InvalidSenderIdentity",
|
|
212
|
+
InvalidReceiverIdentity = "InvalidReceiverIdentity",
|
|
213
|
+
ComplianceFailure = "ComplianceFailure",
|
|
214
|
+
SmartExtensionFailure = "SmartExtensionFailure",
|
|
215
|
+
InvalidGranularity = "InvalidGranularity",
|
|
216
|
+
VolumeLimitReached = "VolumeLimitReached",
|
|
217
|
+
BlockedTransaction = "BlockedTransaction",
|
|
218
|
+
FundsLimitReached = "FundsLimitReached",
|
|
219
|
+
PortfolioFailure = "PortfolioFailure",
|
|
220
|
+
CustodianError = "CustodianError",
|
|
221
|
+
ScopeClaimMissing = "ScopeClaimMissing",
|
|
222
|
+
TransferRestrictionFailure = "TransferRestrictionFailure"
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Akin to TransferStatus, these are a bit more granular and specific. Every TransferError translates to
|
|
226
|
+
* a {@link TransferStatus}, but two or more TransferErrors can represent the same TransferStatus, and
|
|
227
|
+
* not all Transfer Statuses are represented by a TransferError
|
|
228
|
+
*/
|
|
229
|
+
export declare enum TransferError {
|
|
230
|
+
/**
|
|
231
|
+
* translates to TransferStatus.InvalidGranularity
|
|
232
|
+
*
|
|
233
|
+
* occurs if attempting to transfer decimal amounts of a non-divisible token
|
|
234
|
+
*/
|
|
235
|
+
InvalidGranularity = "InvalidGranularity",
|
|
236
|
+
/**
|
|
237
|
+
* translates to TransferStatus.InvalidReceiverIdentity
|
|
238
|
+
*
|
|
239
|
+
* occurs if the origin and destination Identities are the same
|
|
240
|
+
*/
|
|
241
|
+
SelfTransfer = "SelfTransfer",
|
|
242
|
+
/**
|
|
243
|
+
* translates to TransferStatus.InvalidReceiverIdentity
|
|
244
|
+
*
|
|
245
|
+
* occurs if the receiver Identity doesn't have a valid CDD claim
|
|
246
|
+
*/
|
|
247
|
+
InvalidReceiverCdd = "InvalidReceiverCdd",
|
|
248
|
+
/**
|
|
249
|
+
* translates to TransferStatus.InvalidSenderIdentity
|
|
250
|
+
*
|
|
251
|
+
* occurs if the receiver Identity doesn't have a valid CDD claim
|
|
252
|
+
*/
|
|
253
|
+
InvalidSenderCdd = "InvalidSenderCdd",
|
|
254
|
+
/**
|
|
255
|
+
* translates to TransferStatus.ScopeClaimMissing
|
|
256
|
+
*
|
|
257
|
+
* occurs if one of the participants doesn't have a valid Investor Uniqueness Claim for
|
|
258
|
+
* the Asset
|
|
259
|
+
*/
|
|
260
|
+
ScopeClaimMissing = "ScopeClaimMissing",
|
|
261
|
+
/**
|
|
262
|
+
* translates to TransferStatus.InsufficientBalance
|
|
263
|
+
*
|
|
264
|
+
* occurs if the sender Identity does not have enough balance to cover the amount
|
|
265
|
+
*/
|
|
266
|
+
InsufficientBalance = "InsufficientBalance",
|
|
267
|
+
/**
|
|
268
|
+
* translates to TransferStatus.TransfersHalted
|
|
269
|
+
*
|
|
270
|
+
* occurs if the Asset's transfers are frozen
|
|
271
|
+
*/
|
|
272
|
+
TransfersFrozen = "TransfersFrozen",
|
|
273
|
+
/**
|
|
274
|
+
* translates to TransferStatus.PortfolioFailure
|
|
275
|
+
*
|
|
276
|
+
* occurs if the sender Portfolio doesn't exist
|
|
277
|
+
*/
|
|
278
|
+
InvalidSenderPortfolio = "InvalidSenderPortfolio",
|
|
279
|
+
/**
|
|
280
|
+
* translates to TransferStatus.PortfolioFailure
|
|
281
|
+
*
|
|
282
|
+
* occurs if the receiver Portfolio doesn't exist
|
|
283
|
+
*/
|
|
284
|
+
InvalidReceiverPortfolio = "InvalidReceiverPortfolio",
|
|
285
|
+
/**
|
|
286
|
+
* translates to TransferStatus.PortfolioFailure
|
|
287
|
+
*
|
|
288
|
+
* occurs if the sender Portfolio does not have enough balance to cover the amount
|
|
289
|
+
*/
|
|
290
|
+
InsufficientPortfolioBalance = "InsufficientPortfolioBalance",
|
|
291
|
+
/**
|
|
292
|
+
* translates to TransferStatus.ComplianceFailure
|
|
293
|
+
*
|
|
294
|
+
* occurs if some compliance rule would prevent the transfer
|
|
295
|
+
*/
|
|
296
|
+
ComplianceFailure = "ComplianceFailure"
|
|
297
|
+
}
|
|
298
|
+
export interface AssetWithGroup {
|
|
299
|
+
asset: FungibleAsset;
|
|
300
|
+
group: KnownPermissionGroup | CustomPermissionGroup;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Events triggered by transactions performed by an Agent Identity, related to the Token's configuration
|
|
304
|
+
* For example: changing compliance requirements, inviting/removing agent Identities, freezing/unfreezing transfers
|
|
305
|
+
*
|
|
306
|
+
* Token transfers (settlements or movements between Portfolios) do not count as Operations
|
|
307
|
+
*/
|
|
308
|
+
export interface HistoricAgentOperation {
|
|
309
|
+
/**
|
|
310
|
+
* Agent Identity that performed the operations
|
|
311
|
+
*/
|
|
312
|
+
identity: Identity;
|
|
313
|
+
/**
|
|
314
|
+
* list of Token Operation Events that were triggered by the Agent Identity
|
|
315
|
+
*/
|
|
316
|
+
history: EventIdentifier[];
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* An nft collection, along with a subset of its NFTs
|
|
320
|
+
*/
|
|
321
|
+
export interface HeldNfts {
|
|
322
|
+
collection: NftCollection;
|
|
323
|
+
nfts: Nft[];
|
|
324
|
+
}
|
|
154
325
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/Asset/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EAClB,0BAAmB;AACpB,OAAO,EAAE,WAAW,EAAE,kCAA2B;AACjD,OAAO,EACL,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,GAAG,EACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/Asset/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EAClB,0BAAmB;AACpB,OAAO,EAAE,WAAW,EAAE,kCAA2B;AACjD,OAAO,EACL,UAAU,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,GAAG,EACH,mBAAmB,EACnB,KAAK,EACN,uBAAgB;AAEjB;;;GAGG;AACH,oBAAY,KAAK,GAAG,aAAa,GAAG,aAAa,CAAC;AAElD,oBAAY,cAAc;IACxB,YAAY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