@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/types/index.d.ts
CHANGED
|
@@ -1,1420 +1,12 @@
|
|
|
1
|
-
import { ApiOptions } from '@polkadot/api/types';
|
|
2
|
-
import { TypeDef } from '@polkadot/types/types';
|
|
3
|
-
import BigNumber from 'bignumber.js';
|
|
4
|
-
import { CorporateActionTargets, DividendDistributionDetails, OfferingDetails, ScheduleDetails, SubsidyData, TaxWithholding } from "../api/entities/types";
|
|
5
|
-
import { CreateTransactionBatchParams } from "../api/procedures/types";
|
|
6
1
|
import { CountryCode, ModuleName, TxTag, TxTags } from "../generated/types";
|
|
7
|
-
import { Account, BaseAsset, Checkpoint, CheckpointSchedule, CustomPermissionGroup, DefaultPortfolio, DefaultTrustedClaimIssuer, DividendDistribution, FungibleAsset, Identity, Instruction, KnownPermissionGroup, Nft, NftCollection, NumberedPortfolio, Offering, PolymeshTransaction, PolymeshTransactionBatch } from "../internal";
|
|
8
|
-
import { Modify } from "./utils";
|
|
9
2
|
export { EventRecord } from '@polkadot/types/interfaces';
|
|
10
3
|
export { ConnectParams } from "../api/client/Polymesh";
|
|
4
|
+
export * from "../api/client/types";
|
|
11
5
|
export * from "../api/entities/types";
|
|
12
6
|
export * from "../api/procedures/types";
|
|
13
7
|
export * from "../base/types";
|
|
14
8
|
export * from "../generated/types";
|
|
15
|
-
export { AssetHoldersOrderBy, AuthTypeEnum, AuthorizationStatusEnum,
|
|
9
|
+
export { AssetHoldersOrderBy, AuthTypeEnum, AuthorizationStatusEnum, BalanceTypeEnum, CallIdEnum, EventIdEnum, ExtrinsicsOrderBy, InstructionStatusEnum, ModuleIdEnum, MultiSigProposalVoteActionEnum, NftHoldersOrderBy, Scalars, SettlementResultEnum, } from "../middleware/types";
|
|
16
10
|
export { ClaimScopeTypeEnum, MiddlewareScope, SettlementDirectionEnum } from "../middleware/typesV1";
|
|
17
11
|
export { CountryCode, ModuleName, TxTag, TxTags };
|
|
18
|
-
export declare enum TransactionStatus {
|
|
19
|
-
/**
|
|
20
|
-
* the transaction is prepped to run
|
|
21
|
-
*/
|
|
22
|
-
Idle = "Idle",
|
|
23
|
-
/**
|
|
24
|
-
* the transaction is waiting for the user's signature
|
|
25
|
-
*/
|
|
26
|
-
Unapproved = "Unapproved",
|
|
27
|
-
/**
|
|
28
|
-
* the transaction is being executed
|
|
29
|
-
*/
|
|
30
|
-
Running = "Running",
|
|
31
|
-
/**
|
|
32
|
-
* the transaction was rejected by the signer
|
|
33
|
-
*/
|
|
34
|
-
Rejected = "Rejected",
|
|
35
|
-
/**
|
|
36
|
-
* the transaction was run successfully
|
|
37
|
-
*/
|
|
38
|
-
Succeeded = "Succeeded",
|
|
39
|
-
/**
|
|
40
|
-
* the transaction's execution failed due to a an on-chain validation error, insufficient balance for fees, or other such reasons
|
|
41
|
-
*/
|
|
42
|
-
Failed = "Failed",
|
|
43
|
-
/**
|
|
44
|
-
* the transaction couldn't be broadcast. It was either dropped, usurped or invalidated
|
|
45
|
-
* see https://github.com/paritytech/substrate/blob/master/primitives/transaction-pool/src/pool.rs#L58-L110
|
|
46
|
-
*/
|
|
47
|
-
Aborted = "Aborted"
|
|
48
|
-
}
|
|
49
|
-
export declare enum RoleType {
|
|
50
|
-
TickerOwner = "TickerOwner",
|
|
51
|
-
CddProvider = "CddProvider",
|
|
52
|
-
VenueOwner = "VenueOwner",
|
|
53
|
-
PortfolioCustodian = "PortfolioCustodian",
|
|
54
|
-
CorporateActionsAgent = "CorporateActionsAgent",
|
|
55
|
-
Identity = "Identity"
|
|
56
|
-
}
|
|
57
|
-
export interface TickerOwnerRole {
|
|
58
|
-
type: RoleType.TickerOwner;
|
|
59
|
-
ticker: string;
|
|
60
|
-
}
|
|
61
|
-
export interface CddProviderRole {
|
|
62
|
-
type: RoleType.CddProvider;
|
|
63
|
-
}
|
|
64
|
-
export interface VenueOwnerRole {
|
|
65
|
-
type: RoleType.VenueOwner;
|
|
66
|
-
venueId: BigNumber;
|
|
67
|
-
}
|
|
68
|
-
export interface PortfolioId {
|
|
69
|
-
did: string;
|
|
70
|
-
number?: BigNumber;
|
|
71
|
-
}
|
|
72
|
-
export interface PortfolioCustodianRole {
|
|
73
|
-
type: RoleType.PortfolioCustodian;
|
|
74
|
-
portfolioId: PortfolioId;
|
|
75
|
-
}
|
|
76
|
-
export interface IdentityRole {
|
|
77
|
-
type: RoleType.Identity;
|
|
78
|
-
did: string;
|
|
79
|
-
}
|
|
80
|
-
export declare type Role = TickerOwnerRole | CddProviderRole | VenueOwnerRole | PortfolioCustodianRole | IdentityRole;
|
|
81
|
-
export declare enum KnownAssetType {
|
|
82
|
-
EquityCommon = "EquityCommon",
|
|
83
|
-
EquityPreferred = "EquityPreferred",
|
|
84
|
-
Commodity = "Commodity",
|
|
85
|
-
FixedIncome = "FixedIncome",
|
|
86
|
-
Reit = "Reit",
|
|
87
|
-
Fund = "Fund",
|
|
88
|
-
RevenueShareAgreement = "RevenueShareAgreement",
|
|
89
|
-
StructuredProduct = "StructuredProduct",
|
|
90
|
-
Derivative = "Derivative",
|
|
91
|
-
StableCoin = "StableCoin"
|
|
92
|
-
}
|
|
93
|
-
export declare enum KnownNftType {
|
|
94
|
-
Derivative = "Derivative",
|
|
95
|
-
FixedIncome = "FixedIncome",
|
|
96
|
-
Invoice = "Invoice"
|
|
97
|
-
}
|
|
98
|
-
export declare enum SecurityIdentifierType {
|
|
99
|
-
Isin = "Isin",
|
|
100
|
-
Cusip = "Cusip",
|
|
101
|
-
Cins = "Cins",
|
|
102
|
-
Lei = "Lei",
|
|
103
|
-
Figi = "Figi"
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Alphanumeric standardized security identifier
|
|
107
|
-
*/
|
|
108
|
-
export interface SecurityIdentifier {
|
|
109
|
-
type: SecurityIdentifierType;
|
|
110
|
-
value: string;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Document attached to a token
|
|
114
|
-
*/
|
|
115
|
-
export interface AssetDocument {
|
|
116
|
-
name: string;
|
|
117
|
-
uri: string;
|
|
118
|
-
/**
|
|
119
|
-
* hex representation of the document (must be prefixed by "0x")
|
|
120
|
-
*/
|
|
121
|
-
contentHash?: string;
|
|
122
|
-
type?: string;
|
|
123
|
-
filedAt?: Date;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Type of Authorization Request
|
|
127
|
-
*/
|
|
128
|
-
export declare enum AuthorizationType {
|
|
129
|
-
AttestPrimaryKeyRotation = "AttestPrimaryKeyRotation",
|
|
130
|
-
RotatePrimaryKey = "RotatePrimaryKey",
|
|
131
|
-
TransferTicker = "TransferTicker",
|
|
132
|
-
AddMultiSigSigner = "AddMultiSigSigner",
|
|
133
|
-
TransferAssetOwnership = "TransferAssetOwnership",
|
|
134
|
-
JoinIdentity = "JoinIdentity",
|
|
135
|
-
PortfolioCustody = "PortfolioCustody",
|
|
136
|
-
BecomeAgent = "BecomeAgent",
|
|
137
|
-
AddRelayerPayingKey = "AddRelayerPayingKey",
|
|
138
|
-
RotatePrimaryKeyToSecondary = "RotatePrimaryKeyToSecondary"
|
|
139
|
-
}
|
|
140
|
-
export declare enum ConditionTarget {
|
|
141
|
-
Sender = "Sender",
|
|
142
|
-
Receiver = "Receiver",
|
|
143
|
-
Both = "Both"
|
|
144
|
-
}
|
|
145
|
-
export declare enum ScopeType {
|
|
146
|
-
Identity = "Identity",
|
|
147
|
-
Ticker = "Ticker",
|
|
148
|
-
Custom = "Custom"
|
|
149
|
-
}
|
|
150
|
-
export interface Scope {
|
|
151
|
-
type: ScopeType;
|
|
152
|
-
value: string;
|
|
153
|
-
}
|
|
154
|
-
export declare enum ClaimType {
|
|
155
|
-
Accredited = "Accredited",
|
|
156
|
-
Affiliate = "Affiliate",
|
|
157
|
-
BuyLockup = "BuyLockup",
|
|
158
|
-
SellLockup = "SellLockup",
|
|
159
|
-
CustomerDueDiligence = "CustomerDueDiligence",
|
|
160
|
-
KnowYourCustomer = "KnowYourCustomer",
|
|
161
|
-
Jurisdiction = "Jurisdiction",
|
|
162
|
-
Exempted = "Exempted",
|
|
163
|
-
Blocked = "Blocked",
|
|
164
|
-
Custom = "Custom"
|
|
165
|
-
}
|
|
166
|
-
export interface AccreditedClaim {
|
|
167
|
-
type: ClaimType.Accredited;
|
|
168
|
-
scope: Scope;
|
|
169
|
-
}
|
|
170
|
-
export interface AffiliateClaim {
|
|
171
|
-
type: ClaimType.Affiliate;
|
|
172
|
-
scope: Scope;
|
|
173
|
-
}
|
|
174
|
-
export interface BuyLockupClaim {
|
|
175
|
-
type: ClaimType.BuyLockup;
|
|
176
|
-
scope: Scope;
|
|
177
|
-
}
|
|
178
|
-
export interface SellLockupClaim {
|
|
179
|
-
type: ClaimType.SellLockup;
|
|
180
|
-
scope: Scope;
|
|
181
|
-
}
|
|
182
|
-
export interface CddClaim {
|
|
183
|
-
type: ClaimType.CustomerDueDiligence;
|
|
184
|
-
id: string;
|
|
185
|
-
}
|
|
186
|
-
export interface KycClaim {
|
|
187
|
-
type: ClaimType.KnowYourCustomer;
|
|
188
|
-
scope: Scope;
|
|
189
|
-
}
|
|
190
|
-
export interface JurisdictionClaim {
|
|
191
|
-
type: ClaimType.Jurisdiction;
|
|
192
|
-
code: CountryCode;
|
|
193
|
-
scope: Scope;
|
|
194
|
-
}
|
|
195
|
-
export interface ExemptedClaim {
|
|
196
|
-
type: ClaimType.Exempted;
|
|
197
|
-
scope: Scope;
|
|
198
|
-
}
|
|
199
|
-
export interface CustomClaim {
|
|
200
|
-
type: ClaimType.Custom;
|
|
201
|
-
scope: Scope;
|
|
202
|
-
customClaimTypeId: BigNumber;
|
|
203
|
-
}
|
|
204
|
-
export interface BlockedClaim {
|
|
205
|
-
type: ClaimType.Blocked;
|
|
206
|
-
scope: Scope;
|
|
207
|
-
}
|
|
208
|
-
export declare type ScopedClaim = JurisdictionClaim | AccreditedClaim | AffiliateClaim | BuyLockupClaim | SellLockupClaim | KycClaim | ExemptedClaim | BlockedClaim | CustomClaim;
|
|
209
|
-
export declare type UnscopedClaim = CddClaim;
|
|
210
|
-
export declare type Claim = ScopedClaim | UnscopedClaim;
|
|
211
|
-
export interface ClaimData<ClaimType = Claim> {
|
|
212
|
-
target: Identity;
|
|
213
|
-
issuer: Identity;
|
|
214
|
-
issuedAt: Date;
|
|
215
|
-
lastUpdatedAt: Date;
|
|
216
|
-
expiry: Date | null;
|
|
217
|
-
claim: ClaimType;
|
|
218
|
-
}
|
|
219
|
-
export declare type StatClaimType = ClaimType.Accredited | ClaimType.Affiliate | ClaimType.Jurisdiction;
|
|
220
|
-
export interface StatJurisdictionClaimInput {
|
|
221
|
-
type: ClaimType.Jurisdiction;
|
|
222
|
-
countryCode?: CountryCode;
|
|
223
|
-
}
|
|
224
|
-
export interface StatAccreditedClaimInput {
|
|
225
|
-
type: ClaimType.Accredited;
|
|
226
|
-
accredited: boolean;
|
|
227
|
-
}
|
|
228
|
-
export interface StatAffiliateClaimInput {
|
|
229
|
-
type: ClaimType.Affiliate;
|
|
230
|
-
affiliate: boolean;
|
|
231
|
-
}
|
|
232
|
-
export declare type InputStatClaim = StatJurisdictionClaimInput | StatAccreditedClaimInput | StatAffiliateClaimInput;
|
|
233
|
-
export declare type InputStatType = {
|
|
234
|
-
type: StatType.Count | StatType.Balance;
|
|
235
|
-
} | {
|
|
236
|
-
type: StatType.ScopedCount | StatType.ScopedBalance;
|
|
237
|
-
claimIssuer: StatClaimIssuer;
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* Represents the StatType from the `statistics` module.
|
|
241
|
-
*
|
|
242
|
-
* @note the chain doesn't use "Scoped" types, but they are needed here to discriminate the input instead of having an optional input
|
|
243
|
-
*/
|
|
244
|
-
export declare enum StatType {
|
|
245
|
-
Count = "Count",
|
|
246
|
-
Balance = "Balance",
|
|
247
|
-
/**
|
|
248
|
-
* ScopedCount is an SDK only type, on chain it is `Count` with a claimType option present
|
|
249
|
-
*/
|
|
250
|
-
ScopedCount = "ScopedCount",
|
|
251
|
-
/**
|
|
252
|
-
* ScopedPercentage is an SDK only type, on chain it is `Balance` with a claimType option present
|
|
253
|
-
*/
|
|
254
|
-
ScopedBalance = "ScopedBalance"
|
|
255
|
-
}
|
|
256
|
-
export interface IdentityWithClaims {
|
|
257
|
-
identity: Identity;
|
|
258
|
-
claims: ClaimData[];
|
|
259
|
-
}
|
|
260
|
-
export interface ExtrinsicData {
|
|
261
|
-
blockHash: string;
|
|
262
|
-
blockNumber: BigNumber;
|
|
263
|
-
blockDate: Date;
|
|
264
|
-
extrinsicIdx: BigNumber;
|
|
265
|
-
/**
|
|
266
|
-
* public key of the signer. Unsigned transactions have no signer, in which case this value is null (example: an enacted governance proposal)
|
|
267
|
-
*/
|
|
268
|
-
address: string | null;
|
|
269
|
-
/**
|
|
270
|
-
* nonce of the transaction. Null for unsigned transactions where address is null
|
|
271
|
-
*/
|
|
272
|
-
nonce: BigNumber | null;
|
|
273
|
-
txTag: TxTag;
|
|
274
|
-
params: Record<string, unknown>[];
|
|
275
|
-
success: boolean;
|
|
276
|
-
specVersionId: BigNumber;
|
|
277
|
-
extrinsicHash: string;
|
|
278
|
-
}
|
|
279
|
-
export interface ExtrinsicDataWithFees extends ExtrinsicData {
|
|
280
|
-
fee: Fees;
|
|
281
|
-
}
|
|
282
|
-
export interface ProtocolFees {
|
|
283
|
-
tag: TxTag;
|
|
284
|
-
fees: BigNumber;
|
|
285
|
-
}
|
|
286
|
-
export interface ClaimScope {
|
|
287
|
-
scope: Scope | null;
|
|
288
|
-
ticker?: string;
|
|
289
|
-
}
|
|
290
|
-
export interface SubmissionDetails {
|
|
291
|
-
blockHash: string;
|
|
292
|
-
transactionIndex: BigNumber;
|
|
293
|
-
transactionHash: string;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* @param IsDefault - whether the Identity is a default trusted claim issuer for an asset or just
|
|
297
|
-
* for a specific compliance condition. Defaults to false
|
|
298
|
-
*/
|
|
299
|
-
export interface TrustedClaimIssuer<IsDefault extends boolean = false> {
|
|
300
|
-
identity: IsDefault extends true ? DefaultTrustedClaimIssuer : Identity;
|
|
301
|
-
/**
|
|
302
|
-
* a null value means that the issuer is trusted for all claim types
|
|
303
|
-
*/
|
|
304
|
-
trustedFor: ClaimType[] | null;
|
|
305
|
-
}
|
|
306
|
-
export declare type InputTrustedClaimIssuer = Modify<TrustedClaimIssuer, {
|
|
307
|
-
identity: string | Identity;
|
|
308
|
-
}>;
|
|
309
|
-
export declare enum ConditionType {
|
|
310
|
-
IsPresent = "IsPresent",
|
|
311
|
-
IsAbsent = "IsAbsent",
|
|
312
|
-
IsAnyOf = "IsAnyOf",
|
|
313
|
-
IsNoneOf = "IsNoneOf",
|
|
314
|
-
IsExternalAgent = "IsExternalAgent",
|
|
315
|
-
IsIdentity = "IsIdentity"
|
|
316
|
-
}
|
|
317
|
-
export interface ConditionBase {
|
|
318
|
-
target: ConditionTarget;
|
|
319
|
-
/**
|
|
320
|
-
* if undefined, the default trusted claim issuers for the Asset are used
|
|
321
|
-
*/
|
|
322
|
-
trustedClaimIssuers?: TrustedClaimIssuer[];
|
|
323
|
-
}
|
|
324
|
-
export declare type InputConditionBase = Modify<ConditionBase, {
|
|
325
|
-
/**
|
|
326
|
-
* if undefined, the default trusted claim issuers for the Asset are used
|
|
327
|
-
*/
|
|
328
|
-
trustedClaimIssuers?: InputTrustedClaimIssuer[];
|
|
329
|
-
}>;
|
|
330
|
-
export interface SingleClaimCondition {
|
|
331
|
-
type: ConditionType.IsPresent | ConditionType.IsAbsent;
|
|
332
|
-
claim: Claim;
|
|
333
|
-
}
|
|
334
|
-
export interface MultiClaimCondition {
|
|
335
|
-
type: ConditionType.IsAnyOf | ConditionType.IsNoneOf;
|
|
336
|
-
claims: Claim[];
|
|
337
|
-
}
|
|
338
|
-
export interface IdentityCondition {
|
|
339
|
-
type: ConditionType.IsIdentity;
|
|
340
|
-
identity: Identity;
|
|
341
|
-
}
|
|
342
|
-
export interface ExternalAgentCondition {
|
|
343
|
-
type: ConditionType.IsExternalAgent;
|
|
344
|
-
}
|
|
345
|
-
export declare type Condition = (SingleClaimCondition | MultiClaimCondition | IdentityCondition | ExternalAgentCondition) & ConditionBase;
|
|
346
|
-
export declare type InputCondition = (SingleClaimCondition | MultiClaimCondition | Modify<IdentityCondition, {
|
|
347
|
-
identity: string | Identity;
|
|
348
|
-
}> | ExternalAgentCondition) & InputConditionBase;
|
|
349
|
-
export interface Requirement {
|
|
350
|
-
id: BigNumber;
|
|
351
|
-
conditions: Condition[];
|
|
352
|
-
}
|
|
353
|
-
export interface ComplianceRequirements {
|
|
354
|
-
requirements: Requirement[];
|
|
355
|
-
/**
|
|
356
|
-
* used for conditions where no trusted claim issuers were specified
|
|
357
|
-
*/
|
|
358
|
-
defaultTrustedClaimIssuers: TrustedClaimIssuer[];
|
|
359
|
-
}
|
|
360
|
-
export declare type InputRequirement = Modify<Requirement, {
|
|
361
|
-
conditions: InputCondition[];
|
|
362
|
-
}>;
|
|
363
|
-
export interface ConditionCompliance {
|
|
364
|
-
condition: Condition;
|
|
365
|
-
complies: boolean;
|
|
366
|
-
}
|
|
367
|
-
export interface RequirementCompliance {
|
|
368
|
-
id: BigNumber;
|
|
369
|
-
conditions: ConditionCompliance[];
|
|
370
|
-
complies: boolean;
|
|
371
|
-
}
|
|
372
|
-
export interface Compliance {
|
|
373
|
-
requirements: RequirementCompliance[];
|
|
374
|
-
complies: boolean;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Specifies possible types of errors in the SDK
|
|
378
|
-
*/
|
|
379
|
-
export declare enum ErrorCode {
|
|
380
|
-
/**
|
|
381
|
-
* transaction removed from the tx pool
|
|
382
|
-
*/
|
|
383
|
-
TransactionAborted = "TransactionAborted",
|
|
384
|
-
/**
|
|
385
|
-
* user rejected the transaction in their wallet
|
|
386
|
-
*/
|
|
387
|
-
TransactionRejectedByUser = "TransactionRejectedByUser",
|
|
388
|
-
/**
|
|
389
|
-
* transaction failed due to an on-chain error. This is a business logic error,
|
|
390
|
-
* and it should be caught by the SDK before being sent to the chain.
|
|
391
|
-
* Please report it to the Polymesh team
|
|
392
|
-
*/
|
|
393
|
-
TransactionReverted = "TransactionReverted",
|
|
394
|
-
/**
|
|
395
|
-
* error that should cause termination of the calling application
|
|
396
|
-
*/
|
|
397
|
-
FatalError = "FatalError",
|
|
398
|
-
/**
|
|
399
|
-
* user input error. This means that one or more inputs passed by the user
|
|
400
|
-
* do not conform to expected value ranges or types
|
|
401
|
-
*/
|
|
402
|
-
ValidationError = "ValidationError",
|
|
403
|
-
/**
|
|
404
|
-
* user does not have the required roles/permissions to perform an operation
|
|
405
|
-
*/
|
|
406
|
-
NotAuthorized = "NotAuthorized",
|
|
407
|
-
/**
|
|
408
|
-
* errors encountered when interacting with the historic data middleware (GQL server)
|
|
409
|
-
*/
|
|
410
|
-
MiddlewareError = "MiddlewareError",
|
|
411
|
-
/**
|
|
412
|
-
* the data that is being fetched does not exist on-chain, or relies on non-existent data. There are
|
|
413
|
-
* some cases where the data did exist at some point, but has been deleted to save storage space
|
|
414
|
-
*/
|
|
415
|
-
DataUnavailable = "DataUnavailable",
|
|
416
|
-
/**
|
|
417
|
-
* the data that is being written to the chain is the same data that is already in place. This would result
|
|
418
|
-
* in a redundant/useless transaction being executed
|
|
419
|
-
*/
|
|
420
|
-
NoDataChange = "NoDataChange",
|
|
421
|
-
/**
|
|
422
|
-
* the data that is being written to the chain would result in some limit being exceeded. For example, adding a transfer
|
|
423
|
-
* restriction when the maximum possible amount has already been added
|
|
424
|
-
*/
|
|
425
|
-
LimitExceeded = "LimitExceeded",
|
|
426
|
-
/**
|
|
427
|
-
* one or more base prerequisites for a transaction to be successful haven't been met. For example, reserving a ticker requires
|
|
428
|
-
* said ticker to not be already reserved. Attempting to reserve a ticker without that prerequisite being met would result in this
|
|
429
|
-
* type of error. Attempting to create an entity that already exists would also fall into this category,
|
|
430
|
-
* if the entity in question is supposed to be unique
|
|
431
|
-
*/
|
|
432
|
-
UnmetPrerequisite = "UnmetPrerequisite",
|
|
433
|
-
/**
|
|
434
|
-
* this type of error is thrown when attempting to delete/modify an entity which has other entities depending on it. For example, deleting
|
|
435
|
-
* a Portfolio that still holds assets, or removing a Checkpoint Schedule that is being referenced by a Corporate Action
|
|
436
|
-
*/
|
|
437
|
-
EntityInUse = "EntityInUse",
|
|
438
|
-
/**
|
|
439
|
-
* one or more parties involved in the transaction do not have enough balance to perform it
|
|
440
|
-
*/
|
|
441
|
-
InsufficientBalance = "InsufficientBalance",
|
|
442
|
-
/**
|
|
443
|
-
* errors that are the result of something unforeseen.
|
|
444
|
-
* These should generally be reported to the Polymesh team
|
|
445
|
-
*/
|
|
446
|
-
UnexpectedError = "UnexpectedError",
|
|
447
|
-
/**
|
|
448
|
-
* general purpose errors that don't fit well into the other categories
|
|
449
|
-
*/
|
|
450
|
-
General = "General"
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* ERC1400 compliant transfer status
|
|
454
|
-
*/
|
|
455
|
-
export declare enum TransferStatus {
|
|
456
|
-
Failure = "Failure",
|
|
457
|
-
Success = "Success",
|
|
458
|
-
InsufficientBalance = "InsufficientBalance",
|
|
459
|
-
InsufficientAllowance = "InsufficientAllowance",
|
|
460
|
-
TransfersHalted = "TransfersHalted",
|
|
461
|
-
FundsLocked = "FundsLocked",
|
|
462
|
-
InvalidSenderAddress = "InvalidSenderAddress",
|
|
463
|
-
InvalidReceiverAddress = "InvalidReceiverAddress",
|
|
464
|
-
InvalidOperator = "InvalidOperator",
|
|
465
|
-
InvalidSenderIdentity = "InvalidSenderIdentity",
|
|
466
|
-
InvalidReceiverIdentity = "InvalidReceiverIdentity",
|
|
467
|
-
ComplianceFailure = "ComplianceFailure",
|
|
468
|
-
SmartExtensionFailure = "SmartExtensionFailure",
|
|
469
|
-
InvalidGranularity = "InvalidGranularity",
|
|
470
|
-
VolumeLimitReached = "VolumeLimitReached",
|
|
471
|
-
BlockedTransaction = "BlockedTransaction",
|
|
472
|
-
FundsLimitReached = "FundsLimitReached",
|
|
473
|
-
PortfolioFailure = "PortfolioFailure",
|
|
474
|
-
CustodianError = "CustodianError",
|
|
475
|
-
ScopeClaimMissing = "ScopeClaimMissing",
|
|
476
|
-
TransferRestrictionFailure = "TransferRestrictionFailure"
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Akin to TransferStatus, these are a bit more granular and specific. Every TransferError translates to
|
|
480
|
-
* a {@link TransferStatus}, but two or more TransferErrors can represent the same TransferStatus, and
|
|
481
|
-
* not all Transfer Statuses are represented by a TransferError
|
|
482
|
-
*/
|
|
483
|
-
export declare enum TransferError {
|
|
484
|
-
/**
|
|
485
|
-
* translates to TransferStatus.InvalidGranularity
|
|
486
|
-
*
|
|
487
|
-
* occurs if attempting to transfer decimal amounts of a non-divisible token
|
|
488
|
-
*/
|
|
489
|
-
InvalidGranularity = "InvalidGranularity",
|
|
490
|
-
/**
|
|
491
|
-
* translates to TransferStatus.InvalidReceiverIdentity
|
|
492
|
-
*
|
|
493
|
-
* occurs if the origin and destination Identities are the same
|
|
494
|
-
*/
|
|
495
|
-
SelfTransfer = "SelfTransfer",
|
|
496
|
-
/**
|
|
497
|
-
* translates to TransferStatus.InvalidReceiverIdentity
|
|
498
|
-
*
|
|
499
|
-
* occurs if the receiver Identity doesn't have a valid CDD claim
|
|
500
|
-
*/
|
|
501
|
-
InvalidReceiverCdd = "InvalidReceiverCdd",
|
|
502
|
-
/**
|
|
503
|
-
* translates to TransferStatus.InvalidSenderIdentity
|
|
504
|
-
*
|
|
505
|
-
* occurs if the receiver Identity doesn't have a valid CDD claim
|
|
506
|
-
*/
|
|
507
|
-
InvalidSenderCdd = "InvalidSenderCdd",
|
|
508
|
-
/**
|
|
509
|
-
* translates to TransferStatus.ScopeClaimMissing
|
|
510
|
-
*
|
|
511
|
-
* occurs if one of the participants doesn't have a valid Investor Uniqueness Claim for
|
|
512
|
-
* the Asset
|
|
513
|
-
*/
|
|
514
|
-
ScopeClaimMissing = "ScopeClaimMissing",
|
|
515
|
-
/**
|
|
516
|
-
* translates to TransferStatus.InsufficientBalance
|
|
517
|
-
*
|
|
518
|
-
* occurs if the sender Identity does not have enough balance to cover the amount
|
|
519
|
-
*/
|
|
520
|
-
InsufficientBalance = "InsufficientBalance",
|
|
521
|
-
/**
|
|
522
|
-
* translates to TransferStatus.TransfersHalted
|
|
523
|
-
*
|
|
524
|
-
* occurs if the Asset's transfers are frozen
|
|
525
|
-
*/
|
|
526
|
-
TransfersFrozen = "TransfersFrozen",
|
|
527
|
-
/**
|
|
528
|
-
* translates to TransferStatus.PortfolioFailure
|
|
529
|
-
*
|
|
530
|
-
* occurs if the sender Portfolio doesn't exist
|
|
531
|
-
*/
|
|
532
|
-
InvalidSenderPortfolio = "InvalidSenderPortfolio",
|
|
533
|
-
/**
|
|
534
|
-
* translates to TransferStatus.PortfolioFailure
|
|
535
|
-
*
|
|
536
|
-
* occurs if the receiver Portfolio doesn't exist
|
|
537
|
-
*/
|
|
538
|
-
InvalidReceiverPortfolio = "InvalidReceiverPortfolio",
|
|
539
|
-
/**
|
|
540
|
-
* translates to TransferStatus.PortfolioFailure
|
|
541
|
-
*
|
|
542
|
-
* occurs if the sender Portfolio does not have enough balance to cover the amount
|
|
543
|
-
*/
|
|
544
|
-
InsufficientPortfolioBalance = "InsufficientPortfolioBalance",
|
|
545
|
-
/**
|
|
546
|
-
* translates to TransferStatus.ComplianceFailure
|
|
547
|
-
*
|
|
548
|
-
* occurs if some compliance rule would prevent the transfer
|
|
549
|
-
*/
|
|
550
|
-
ComplianceFailure = "ComplianceFailure"
|
|
551
|
-
}
|
|
552
|
-
export interface ClaimTarget {
|
|
553
|
-
target: string | Identity;
|
|
554
|
-
claim: Claim;
|
|
555
|
-
expiry?: Date;
|
|
556
|
-
}
|
|
557
|
-
export declare type SubCallback<T> = (result: T) => void | Promise<void>;
|
|
558
|
-
export declare type UnsubCallback = () => void;
|
|
559
|
-
export interface MiddlewareConfig {
|
|
560
|
-
link: string;
|
|
561
|
-
key: string;
|
|
562
|
-
}
|
|
563
|
-
export interface PolkadotConfig {
|
|
564
|
-
/**
|
|
565
|
-
* provide a locally saved metadata file for a modestly fast startup time (e.g. 1 second when provided, 1.5 seconds without).
|
|
566
|
-
*
|
|
567
|
-
* @note if not provided the SDK will read the needed data from chain during startup
|
|
568
|
-
*
|
|
569
|
-
* @note format is key as genesis hash and spec version and the value hex encoded chain metadata
|
|
570
|
-
*
|
|
571
|
-
* @example creating valid metadata
|
|
572
|
-
* ```ts
|
|
573
|
-
const meta = _polkadotApi.runtimeMetadata.toHex();
|
|
574
|
-
const genesisHash = _polkadotApi.genesisHash;
|
|
575
|
-
const specVersion = _polkadotApi.runtimeVersion.specVersion;
|
|
576
|
-
|
|
577
|
-
const metadata = {
|
|
578
|
-
[`${genesisHash}-${specVersion}`]: meta,
|
|
579
|
-
};
|
|
580
|
-
```
|
|
581
|
-
*/
|
|
582
|
-
metadata?: ApiOptions['metadata'];
|
|
583
|
-
/**
|
|
584
|
-
* set to `true` to disable polkadot start up warnings
|
|
585
|
-
*/
|
|
586
|
-
noInitWarn?: boolean;
|
|
587
|
-
/**
|
|
588
|
-
* allows for types to be provided for multiple chain specs at once
|
|
589
|
-
*
|
|
590
|
-
* @note shouldn't be needed for most use cases
|
|
591
|
-
*/
|
|
592
|
-
typesBundle?: ApiOptions['typesBundle'];
|
|
593
|
-
}
|
|
594
|
-
export interface EventIdentifier {
|
|
595
|
-
blockNumber: BigNumber;
|
|
596
|
-
blockHash: string;
|
|
597
|
-
blockDate: Date;
|
|
598
|
-
eventIndex: BigNumber;
|
|
599
|
-
}
|
|
600
|
-
export interface Balance {
|
|
601
|
-
/**
|
|
602
|
-
* balance available for transferring and paying fees
|
|
603
|
-
*/
|
|
604
|
-
free: BigNumber;
|
|
605
|
-
/**
|
|
606
|
-
* unavailable balance, either bonded for staking or locked for some other purpose
|
|
607
|
-
*/
|
|
608
|
-
locked: BigNumber;
|
|
609
|
-
/**
|
|
610
|
-
* free + locked
|
|
611
|
-
*/
|
|
612
|
-
total: BigNumber;
|
|
613
|
-
}
|
|
614
|
-
export declare type AccountBalance = Balance;
|
|
615
|
-
export interface PaginationOptions {
|
|
616
|
-
size: BigNumber;
|
|
617
|
-
start?: string;
|
|
618
|
-
}
|
|
619
|
-
export declare type NextKey = string | BigNumber | null;
|
|
620
|
-
export interface ResultSet<T> {
|
|
621
|
-
data: T[];
|
|
622
|
-
next: NextKey;
|
|
623
|
-
/**
|
|
624
|
-
* @note methods will have `count` defined when middleware is configured, but be undefined otherwise. This happens when the chain node is queried directly
|
|
625
|
-
*/
|
|
626
|
-
count?: BigNumber;
|
|
627
|
-
}
|
|
628
|
-
export interface NetworkProperties {
|
|
629
|
-
name: string;
|
|
630
|
-
version: BigNumber;
|
|
631
|
-
}
|
|
632
|
-
export interface Fees {
|
|
633
|
-
/**
|
|
634
|
-
* bonus fee charged by certain transactions
|
|
635
|
-
*/
|
|
636
|
-
protocol: BigNumber;
|
|
637
|
-
/**
|
|
638
|
-
* regular network fee
|
|
639
|
-
*/
|
|
640
|
-
gas: BigNumber;
|
|
641
|
-
/**
|
|
642
|
-
* sum of the protocol and gas fees
|
|
643
|
-
*/
|
|
644
|
-
total: BigNumber;
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Type of relationship between a paying account and a beneficiary
|
|
648
|
-
*/
|
|
649
|
-
export declare enum PayingAccountType {
|
|
650
|
-
/**
|
|
651
|
-
* the paying Account is currently subsidizing the caller
|
|
652
|
-
*/
|
|
653
|
-
Subsidy = "Subsidy",
|
|
654
|
-
/**
|
|
655
|
-
* the paying Account is paying for a specific transaction because of
|
|
656
|
-
* chain-specific constraints (e.g. the caller is accepting an invitation to an Identity
|
|
657
|
-
* and cannot have any funds to pay for it by definition)
|
|
658
|
-
*/
|
|
659
|
-
Other = "Other",
|
|
660
|
-
/**
|
|
661
|
-
* the caller Account is responsible of paying the fees
|
|
662
|
-
*/
|
|
663
|
-
Caller = "Caller"
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* Data representing the Account responsible for paying fees for a transaction
|
|
667
|
-
*/
|
|
668
|
-
export declare type PayingAccount = {
|
|
669
|
-
type: PayingAccountType.Subsidy;
|
|
670
|
-
/**
|
|
671
|
-
* Account that pays for the transaction
|
|
672
|
-
*/
|
|
673
|
-
account: Account;
|
|
674
|
-
/**
|
|
675
|
-
* total amount that can be paid for
|
|
676
|
-
*/
|
|
677
|
-
allowance: BigNumber;
|
|
678
|
-
} | {
|
|
679
|
-
type: PayingAccountType.Caller | PayingAccountType.Other;
|
|
680
|
-
account: Account;
|
|
681
|
-
};
|
|
682
|
-
/**
|
|
683
|
-
* Breakdown of the fees that will be paid by a specific Account for a transaction, along
|
|
684
|
-
* with data associated to the Paying account
|
|
685
|
-
*/
|
|
686
|
-
export interface PayingAccountFees {
|
|
687
|
-
/**
|
|
688
|
-
* fees that will be paid by the Account
|
|
689
|
-
*/
|
|
690
|
-
fees: Fees;
|
|
691
|
-
/**
|
|
692
|
-
* data related to the Account responsible of paying for the transaction
|
|
693
|
-
*/
|
|
694
|
-
payingAccountData: PayingAccount & {
|
|
695
|
-
/**
|
|
696
|
-
* free balance of the Account
|
|
697
|
-
*/
|
|
698
|
-
balance: BigNumber;
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
export declare enum SignerType {
|
|
702
|
-
Identity = "Identity",
|
|
703
|
-
Account = "Account"
|
|
704
|
-
}
|
|
705
|
-
export interface SignerValue {
|
|
706
|
-
/**
|
|
707
|
-
* whether the signer is an Account or Identity
|
|
708
|
-
*/
|
|
709
|
-
type: SignerType;
|
|
710
|
-
/**
|
|
711
|
-
* address or DID (depending on whether the signer is an Account or Identity)
|
|
712
|
-
*/
|
|
713
|
-
value: string;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Transaction Groups (for permissions purposes)
|
|
717
|
-
*/
|
|
718
|
-
export declare enum TxGroup {
|
|
719
|
-
/**
|
|
720
|
-
* - TxTags.identity.AddInvestorUniquenessClaim
|
|
721
|
-
* - TxTags.portfolio.MovePortfolioFunds
|
|
722
|
-
* - TxTags.settlement.AddInstruction
|
|
723
|
-
* - TxTags.settlement.AddInstructionWithMemo
|
|
724
|
-
* - TxTags.settlement.AddAndAffirmInstruction
|
|
725
|
-
* - TxTags.settlement.AddAndAffirmInstructionWithMemo
|
|
726
|
-
* - TxTags.settlement.AffirmInstruction
|
|
727
|
-
* - TxTags.settlement.RejectInstruction
|
|
728
|
-
* - TxTags.settlement.CreateVenue
|
|
729
|
-
*/
|
|
730
|
-
PortfolioManagement = "PortfolioManagement",
|
|
731
|
-
/**
|
|
732
|
-
* - TxTags.asset.MakeDivisible
|
|
733
|
-
* - TxTags.asset.RenameAsset
|
|
734
|
-
* - TxTags.asset.SetFundingRound
|
|
735
|
-
* - TxTags.asset.AddDocuments
|
|
736
|
-
* - TxTags.asset.RemoveDocuments
|
|
737
|
-
*/
|
|
738
|
-
AssetManagement = "AssetManagement",
|
|
739
|
-
/**
|
|
740
|
-
* - TxTags.asset.Freeze
|
|
741
|
-
* - TxTags.asset.Unfreeze
|
|
742
|
-
* - TxTags.identity.AddAuthorization
|
|
743
|
-
* - TxTags.identity.RemoveAuthorization
|
|
744
|
-
*/
|
|
745
|
-
AdvancedAssetManagement = "AdvancedAssetManagement",
|
|
746
|
-
/**
|
|
747
|
-
* - TxTags.identity.AddInvestorUniquenessClaim
|
|
748
|
-
* - TxTags.settlement.CreateVenue
|
|
749
|
-
* - TxTags.settlement.AddInstruction
|
|
750
|
-
* - TxTags.settlement.AddInstructionWithMemo
|
|
751
|
-
* - TxTags.settlement.AddAndAffirmInstruction
|
|
752
|
-
* - TxTags.settlement.AddAndAffirmInstructionWithMemo
|
|
753
|
-
*/
|
|
754
|
-
Distribution = "Distribution",
|
|
755
|
-
/**
|
|
756
|
-
* - TxTags.asset.Issue
|
|
757
|
-
*/
|
|
758
|
-
Issuance = "Issuance",
|
|
759
|
-
/**
|
|
760
|
-
* - TxTags.complianceManager.AddDefaultTrustedClaimIssuer
|
|
761
|
-
* - TxTags.complianceManager.RemoveDefaultTrustedClaimIssuer
|
|
762
|
-
*/
|
|
763
|
-
TrustedClaimIssuersManagement = "TrustedClaimIssuersManagement",
|
|
764
|
-
/**
|
|
765
|
-
* - TxTags.identity.AddClaim
|
|
766
|
-
* - TxTags.identity.RevokeClaim
|
|
767
|
-
*/
|
|
768
|
-
ClaimsManagement = "ClaimsManagement",
|
|
769
|
-
/**
|
|
770
|
-
* - TxTags.complianceManager.AddComplianceRequirement
|
|
771
|
-
* - TxTags.complianceManager.RemoveComplianceRequirement
|
|
772
|
-
* - TxTags.complianceManager.PauseAssetCompliance
|
|
773
|
-
* - TxTags.complianceManager.ResumeAssetCompliance
|
|
774
|
-
* - TxTags.complianceManager.ResetAssetCompliance
|
|
775
|
-
*/
|
|
776
|
-
ComplianceRequirementsManagement = "ComplianceRequirementsManagement",
|
|
777
|
-
/**
|
|
778
|
-
* - TxTags.checkpoint.CreateSchedule,
|
|
779
|
-
* - TxTags.checkpoint.RemoveSchedule,
|
|
780
|
-
* - TxTags.checkpoint.CreateCheckpoint,
|
|
781
|
-
* - TxTags.corporateAction.InitiateCorporateAction,
|
|
782
|
-
* - TxTags.capitalDistribution.Distribute,
|
|
783
|
-
* - TxTags.capitalDistribution.Claim,
|
|
784
|
-
* - TxTags.identity.AddInvestorUniquenessClaim,
|
|
785
|
-
*/
|
|
786
|
-
CorporateActionsManagement = "CorporateActionsManagement",
|
|
787
|
-
/**
|
|
788
|
-
* - TxTags.sto.CreateFundraiser,
|
|
789
|
-
* - TxTags.sto.FreezeFundraiser,
|
|
790
|
-
* - TxTags.sto.Invest,
|
|
791
|
-
* - TxTags.sto.ModifyFundraiserWindow,
|
|
792
|
-
* - TxTags.sto.Stop,
|
|
793
|
-
* - TxTags.sto.UnfreezeFundraiser,
|
|
794
|
-
* - TxTags.identity.AddInvestorUniquenessClaim,
|
|
795
|
-
* - TxTags.asset.Issue,
|
|
796
|
-
* - TxTags.settlement.CreateVenue
|
|
797
|
-
*/
|
|
798
|
-
StoManagement = "StoManagement"
|
|
799
|
-
}
|
|
800
|
-
export declare enum PermissionType {
|
|
801
|
-
Include = "Include",
|
|
802
|
-
Exclude = "Exclude"
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* Signer/agent permissions for a specific type
|
|
806
|
-
*
|
|
807
|
-
* @param T - type of Permissions (Asset, Transaction, Portfolio, etc)
|
|
808
|
-
*/
|
|
809
|
-
export interface SectionPermissions<T> {
|
|
810
|
-
/**
|
|
811
|
-
* Values to be included/excluded
|
|
812
|
-
*/
|
|
813
|
-
values: T[];
|
|
814
|
-
/**
|
|
815
|
-
* Whether the permissions are inclusive or exclusive
|
|
816
|
-
*/
|
|
817
|
-
type: PermissionType;
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* Permissions related to Transactions. Can include/exclude individual transactions or entire modules
|
|
821
|
-
*/
|
|
822
|
-
export interface TransactionPermissions extends SectionPermissions<TxTag | ModuleName> {
|
|
823
|
-
/**
|
|
824
|
-
* Transactions to be exempted from inclusion/exclusion. This allows more granularity when
|
|
825
|
-
* setting permissions. For example, let's say we want to include only the `asset` and `staking` modules,
|
|
826
|
-
* but exclude the `asset.registerTicker` transaction. We could add both modules to `values`, and add
|
|
827
|
-
* `TxTags.asset.registerTicker` to `exceptions`
|
|
828
|
-
*/
|
|
829
|
-
exceptions?: TxTag[];
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Permissions a Secondary Key has over the Identity. A null value means the key has
|
|
833
|
-
* all permissions of that type (e.g. if `assets` is null, the key has permissions over all
|
|
834
|
-
* of the Identity's Assets)
|
|
835
|
-
*/
|
|
836
|
-
export interface Permissions {
|
|
837
|
-
/**
|
|
838
|
-
* Assets over which this key has permissions
|
|
839
|
-
*/
|
|
840
|
-
assets: SectionPermissions<FungibleAsset> | null;
|
|
841
|
-
/**
|
|
842
|
-
* Transactions this key can execute
|
|
843
|
-
*/
|
|
844
|
-
transactions: TransactionPermissions | null;
|
|
845
|
-
/**
|
|
846
|
-
* list of Transaction Groups this key can execute. Having permissions over a TxGroup
|
|
847
|
-
* means having permissions over every TxTag in said group. Partial group permissions are not
|
|
848
|
-
* covered by this value. For a full picture of transaction permissions, see the `transactions` property
|
|
849
|
-
*
|
|
850
|
-
* NOTE: If transactions is null, ignore this value
|
|
851
|
-
*/
|
|
852
|
-
transactionGroups: TxGroup[];
|
|
853
|
-
portfolios: SectionPermissions<DefaultPortfolio | NumberedPortfolio> | null;
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
* Asset permissions shared by agents in a group
|
|
857
|
-
*/
|
|
858
|
-
export declare type GroupPermissions = Pick<Permissions, 'transactions' | 'transactionGroups'>;
|
|
859
|
-
/**
|
|
860
|
-
* All Permission Groups of a specific Asset, separated by `known` and `custom`
|
|
861
|
-
*/
|
|
862
|
-
export interface PermissionGroups {
|
|
863
|
-
known: KnownPermissionGroup[];
|
|
864
|
-
custom: CustomPermissionGroup[];
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* This represents positive permissions (i.e. only "includes"). It is used
|
|
868
|
-
* for specifying procedure requirements and querying if an Account has certain
|
|
869
|
-
* permissions. Null values represent full permissions in that category
|
|
870
|
-
*/
|
|
871
|
-
export interface SimplePermissions {
|
|
872
|
-
/**
|
|
873
|
-
* list of required Asset permissions
|
|
874
|
-
*/
|
|
875
|
-
assets?: BaseAsset[] | null;
|
|
876
|
-
/**
|
|
877
|
-
* list of required Transaction permissions
|
|
878
|
-
*/
|
|
879
|
-
transactions?: TxTag[] | null;
|
|
880
|
-
portfolios?: (DefaultPortfolio | NumberedPortfolio)[] | null;
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* Result of a `checkRoles` call
|
|
884
|
-
*/
|
|
885
|
-
export interface CheckRolesResult {
|
|
886
|
-
/**
|
|
887
|
-
* required roles which the Identity *DOESN'T* have. Only present if `result` is `false`
|
|
888
|
-
*/
|
|
889
|
-
missingRoles?: Role[];
|
|
890
|
-
/**
|
|
891
|
-
* whether the signer possesses all the required roles or not
|
|
892
|
-
*/
|
|
893
|
-
result: boolean;
|
|
894
|
-
/**
|
|
895
|
-
* optional message explaining the reason for failure in special cases
|
|
896
|
-
*/
|
|
897
|
-
message?: string;
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Result of a `checkPermissions` call. If `Type` is `Account`, represents whether the Account
|
|
901
|
-
* has all the necessary secondary key Permissions. If `Type` is `Identity`, represents whether the
|
|
902
|
-
* Identity has all the necessary external agent Permissions
|
|
903
|
-
*/
|
|
904
|
-
export interface CheckPermissionsResult<Type extends SignerType> {
|
|
905
|
-
/**
|
|
906
|
-
* required permissions which the signer *DOESN'T* have. Only present if `result` is `false`
|
|
907
|
-
*/
|
|
908
|
-
missingPermissions?: Type extends SignerType.Account ? SimplePermissions : TxTag[] | null;
|
|
909
|
-
/**
|
|
910
|
-
* whether the signer complies with the required permissions or not
|
|
911
|
-
*/
|
|
912
|
-
result: boolean;
|
|
913
|
-
/**
|
|
914
|
-
* optional message explaining the reason for failure in special cases
|
|
915
|
-
*/
|
|
916
|
-
message?: string;
|
|
917
|
-
}
|
|
918
|
-
export declare enum PermissionGroupType {
|
|
919
|
-
/**
|
|
920
|
-
* all transactions authorized
|
|
921
|
-
*/
|
|
922
|
-
Full = "Full",
|
|
923
|
-
/**
|
|
924
|
-
* not authorized:
|
|
925
|
-
* - externalAgents
|
|
926
|
-
*/
|
|
927
|
-
ExceptMeta = "ExceptMeta",
|
|
928
|
-
/**
|
|
929
|
-
* authorized:
|
|
930
|
-
* - corporateAction
|
|
931
|
-
* - corporateBallot
|
|
932
|
-
* - capitalDistribution
|
|
933
|
-
*/
|
|
934
|
-
PolymeshV1Caa = "PolymeshV1Caa",
|
|
935
|
-
/**
|
|
936
|
-
* authorized:
|
|
937
|
-
* - asset.issue
|
|
938
|
-
* - asset.redeem
|
|
939
|
-
* - asset.controllerTransfer
|
|
940
|
-
* - sto (except for sto.invest)
|
|
941
|
-
*/
|
|
942
|
-
PolymeshV1Pia = "PolymeshV1Pia"
|
|
943
|
-
}
|
|
944
|
-
export declare type AttestPrimaryKeyRotationAuthorizationData = {
|
|
945
|
-
type: AuthorizationType.AttestPrimaryKeyRotation;
|
|
946
|
-
value: Identity;
|
|
947
|
-
};
|
|
948
|
-
export declare type RotatePrimaryKeyAuthorizationData = {
|
|
949
|
-
type: AuthorizationType.RotatePrimaryKey;
|
|
950
|
-
};
|
|
951
|
-
export declare type RotatePrimaryKeyToSecondaryData = {
|
|
952
|
-
type: AuthorizationType.RotatePrimaryKeyToSecondary;
|
|
953
|
-
value: Permissions;
|
|
954
|
-
};
|
|
955
|
-
export declare type JoinIdentityAuthorizationData = {
|
|
956
|
-
type: AuthorizationType.JoinIdentity;
|
|
957
|
-
value: Permissions;
|
|
958
|
-
};
|
|
959
|
-
export declare type PortfolioCustodyAuthorizationData = {
|
|
960
|
-
type: AuthorizationType.PortfolioCustody;
|
|
961
|
-
value: NumberedPortfolio | DefaultPortfolio;
|
|
962
|
-
};
|
|
963
|
-
export declare type BecomeAgentAuthorizationData = {
|
|
964
|
-
type: AuthorizationType.BecomeAgent;
|
|
965
|
-
value: KnownPermissionGroup | CustomPermissionGroup;
|
|
966
|
-
};
|
|
967
|
-
export declare type AddRelayerPayingKeyAuthorizationData = {
|
|
968
|
-
type: AuthorizationType.AddRelayerPayingKey;
|
|
969
|
-
value: SubsidyData;
|
|
970
|
-
};
|
|
971
|
-
export declare type GenericAuthorizationData = {
|
|
972
|
-
type: Exclude<AuthorizationType, AuthorizationType.RotatePrimaryKey | AuthorizationType.JoinIdentity | AuthorizationType.PortfolioCustody | AuthorizationType.BecomeAgent | AuthorizationType.AddRelayerPayingKey | AuthorizationType.RotatePrimaryKeyToSecondary | AuthorizationType.AttestPrimaryKeyRotation>;
|
|
973
|
-
value: string;
|
|
974
|
-
};
|
|
975
|
-
/**
|
|
976
|
-
* Authorization request data corresponding to type
|
|
977
|
-
*/
|
|
978
|
-
export declare type Authorization = AttestPrimaryKeyRotationAuthorizationData | RotatePrimaryKeyAuthorizationData | JoinIdentityAuthorizationData | PortfolioCustodyAuthorizationData | BecomeAgentAuthorizationData | AddRelayerPayingKeyAuthorizationData | RotatePrimaryKeyToSecondaryData | GenericAuthorizationData;
|
|
979
|
-
export declare enum TransactionArgumentType {
|
|
980
|
-
Did = "Did",
|
|
981
|
-
Address = "Address",
|
|
982
|
-
Text = "Text",
|
|
983
|
-
Boolean = "Boolean",
|
|
984
|
-
Number = "Number",
|
|
985
|
-
Balance = "Balance",
|
|
986
|
-
Date = "Date",
|
|
987
|
-
Array = "Array",
|
|
988
|
-
Tuple = "Tuple",
|
|
989
|
-
SimpleEnum = "SimpleEnum",
|
|
990
|
-
RichEnum = "RichEnum",
|
|
991
|
-
Object = "Object",
|
|
992
|
-
Unknown = "Unknown",
|
|
993
|
-
Null = "Null"
|
|
994
|
-
}
|
|
995
|
-
export interface PlainTransactionArgument {
|
|
996
|
-
type: Exclude<TransactionArgumentType, TransactionArgumentType.Array | TransactionArgumentType.Tuple | TransactionArgumentType.SimpleEnum | TransactionArgumentType.RichEnum | TransactionArgumentType.Object>;
|
|
997
|
-
}
|
|
998
|
-
export interface ArrayTransactionArgument {
|
|
999
|
-
type: TransactionArgumentType.Array;
|
|
1000
|
-
internal: TransactionArgument;
|
|
1001
|
-
}
|
|
1002
|
-
export interface SimpleEnumTransactionArgument {
|
|
1003
|
-
type: TransactionArgumentType.SimpleEnum;
|
|
1004
|
-
internal: string[];
|
|
1005
|
-
}
|
|
1006
|
-
export interface ComplexTransactionArgument {
|
|
1007
|
-
type: TransactionArgumentType.RichEnum | TransactionArgumentType.Object | TransactionArgumentType.Tuple;
|
|
1008
|
-
internal: TransactionArgument[];
|
|
1009
|
-
}
|
|
1010
|
-
export declare type TransactionArgument = {
|
|
1011
|
-
name: string;
|
|
1012
|
-
optional: boolean;
|
|
1013
|
-
_rawType: TypeDef;
|
|
1014
|
-
} & (PlainTransactionArgument | ArrayTransactionArgument | SimpleEnumTransactionArgument | ComplexTransactionArgument);
|
|
1015
|
-
export declare type Signer = Identity | Account;
|
|
1016
|
-
export interface OfferingWithDetails {
|
|
1017
|
-
offering: Offering;
|
|
1018
|
-
details: OfferingDetails;
|
|
1019
|
-
}
|
|
1020
|
-
export interface CheckpointWithData {
|
|
1021
|
-
checkpoint: Checkpoint;
|
|
1022
|
-
createdAt: Date;
|
|
1023
|
-
totalSupply: BigNumber;
|
|
1024
|
-
}
|
|
1025
|
-
export interface PermissionedAccount {
|
|
1026
|
-
account: Account;
|
|
1027
|
-
permissions: Permissions;
|
|
1028
|
-
}
|
|
1029
|
-
export declare type PortfolioLike = string | Identity | NumberedPortfolio | DefaultPortfolio | {
|
|
1030
|
-
identity: string | Identity;
|
|
1031
|
-
id: BigNumber;
|
|
1032
|
-
};
|
|
1033
|
-
/**
|
|
1034
|
-
* Permissions to grant to a Signer over an Identity
|
|
1035
|
-
*
|
|
1036
|
-
* {@link Permissions}
|
|
1037
|
-
*
|
|
1038
|
-
* @note TxGroups in the `transactionGroups` array will be transformed into their corresponding `TxTag`s
|
|
1039
|
-
*/
|
|
1040
|
-
export declare type PermissionsLike = {
|
|
1041
|
-
/**
|
|
1042
|
-
* Assets on which to grant permissions. A null value represents full permissions
|
|
1043
|
-
*/
|
|
1044
|
-
assets?: SectionPermissions<string | FungibleAsset> | null;
|
|
1045
|
-
/**
|
|
1046
|
-
* Portfolios on which to grant permissions. A null value represents full permissions
|
|
1047
|
-
*/
|
|
1048
|
-
portfolios?: SectionPermissions<PortfolioLike> | null;
|
|
1049
|
-
} & ({
|
|
1050
|
-
transactions?: TransactionPermissions | null;
|
|
1051
|
-
} | {
|
|
1052
|
-
transactionGroups?: TxGroup[];
|
|
1053
|
-
});
|
|
1054
|
-
export interface FungiblePortfolioMovement {
|
|
1055
|
-
asset: string | FungibleAsset;
|
|
1056
|
-
amount: BigNumber;
|
|
1057
|
-
/**
|
|
1058
|
-
* identifier string to help differentiate transfers
|
|
1059
|
-
*/
|
|
1060
|
-
memo?: string;
|
|
1061
|
-
}
|
|
1062
|
-
export declare type NonFungiblePortfolioMovement = {
|
|
1063
|
-
asset: NftCollection | string;
|
|
1064
|
-
nfts: (Nft | BigNumber)[];
|
|
1065
|
-
/**
|
|
1066
|
-
* identifier string to help differentiate transfers
|
|
1067
|
-
*/
|
|
1068
|
-
memo?: string;
|
|
1069
|
-
};
|
|
1070
|
-
export declare type PortfolioMovement = FungiblePortfolioMovement | NonFungiblePortfolioMovement;
|
|
1071
|
-
export interface ProcedureAuthorizationStatus {
|
|
1072
|
-
/**
|
|
1073
|
-
* whether the Identity complies with all required Agent permissions
|
|
1074
|
-
*/
|
|
1075
|
-
agentPermissions: CheckPermissionsResult<SignerType.Identity>;
|
|
1076
|
-
/**
|
|
1077
|
-
* whether the Account complies with all required Signer permissions
|
|
1078
|
-
*/
|
|
1079
|
-
signerPermissions: CheckPermissionsResult<SignerType.Account>;
|
|
1080
|
-
/**
|
|
1081
|
-
* whether the Identity complies with all required Roles
|
|
1082
|
-
*/
|
|
1083
|
-
roles: CheckRolesResult;
|
|
1084
|
-
/**
|
|
1085
|
-
* whether the Account is frozen (i.e. can't perform any transactions)
|
|
1086
|
-
*/
|
|
1087
|
-
accountFrozen: boolean;
|
|
1088
|
-
/**
|
|
1089
|
-
* true only if the Procedure requires an Identity but the signing Account
|
|
1090
|
-
* doesn't have one associated
|
|
1091
|
-
*/
|
|
1092
|
-
noIdentity: boolean;
|
|
1093
|
-
}
|
|
1094
|
-
interface TransferRestrictionBase {
|
|
1095
|
-
/**
|
|
1096
|
-
* array of Identity IDs that are exempted from the Restriction
|
|
1097
|
-
*/
|
|
1098
|
-
exemptedIds?: string[];
|
|
1099
|
-
}
|
|
1100
|
-
export interface CountTransferRestriction extends TransferRestrictionBase {
|
|
1101
|
-
count: BigNumber;
|
|
1102
|
-
}
|
|
1103
|
-
export interface PercentageTransferRestriction extends TransferRestrictionBase {
|
|
1104
|
-
/**
|
|
1105
|
-
* maximum percentage (0-100) of the total supply of the Asset that can be held by a single investor at once
|
|
1106
|
-
*/
|
|
1107
|
-
percentage: BigNumber;
|
|
1108
|
-
}
|
|
1109
|
-
export interface ClaimCountTransferRestriction extends TransferRestrictionBase {
|
|
1110
|
-
/**
|
|
1111
|
-
* The type of investors this restriction applies to. e.g. non-accredited
|
|
1112
|
-
*/
|
|
1113
|
-
claim: InputStatClaim;
|
|
1114
|
-
/**
|
|
1115
|
-
* The minimum amount of investors the must meet the Claim criteria
|
|
1116
|
-
*/
|
|
1117
|
-
min: BigNumber;
|
|
1118
|
-
/**
|
|
1119
|
-
* The maximum amount of investors that must meet the Claim criteria
|
|
1120
|
-
*/
|
|
1121
|
-
max?: BigNumber;
|
|
1122
|
-
issuer: Identity;
|
|
1123
|
-
}
|
|
1124
|
-
export interface ClaimPercentageTransferRestriction extends TransferRestrictionBase {
|
|
1125
|
-
/**
|
|
1126
|
-
* The type of investors this restriction applies to. e.g. Canadian investor
|
|
1127
|
-
*/
|
|
1128
|
-
claim: InputStatClaim;
|
|
1129
|
-
/**
|
|
1130
|
-
* The minimum percentage of the total supply that investors meeting the Claim criteria must hold
|
|
1131
|
-
*/
|
|
1132
|
-
min: BigNumber;
|
|
1133
|
-
/**
|
|
1134
|
-
* The maximum percentage of the total supply that investors meeting the Claim criteria must hold
|
|
1135
|
-
*/
|
|
1136
|
-
max: BigNumber;
|
|
1137
|
-
issuer: Identity;
|
|
1138
|
-
}
|
|
1139
|
-
export interface ActiveTransferRestrictions<Restriction extends CountTransferRestriction | PercentageTransferRestriction | ClaimCountTransferRestriction | ClaimPercentageTransferRestriction> {
|
|
1140
|
-
restrictions: Restriction[];
|
|
1141
|
-
/**
|
|
1142
|
-
* amount of restrictions that can be added before reaching the shared limit
|
|
1143
|
-
*/
|
|
1144
|
-
availableSlots: BigNumber;
|
|
1145
|
-
}
|
|
1146
|
-
export declare enum TransferRestrictionType {
|
|
1147
|
-
Count = "Count",
|
|
1148
|
-
Percentage = "Percentage",
|
|
1149
|
-
ClaimCount = "ClaimCount",
|
|
1150
|
-
ClaimPercentage = "ClaimPercentage"
|
|
1151
|
-
}
|
|
1152
|
-
export declare type TransferRestriction = {
|
|
1153
|
-
type: TransferRestrictionType.Count;
|
|
1154
|
-
value: BigNumber;
|
|
1155
|
-
} | {
|
|
1156
|
-
type: TransferRestrictionType.Percentage;
|
|
1157
|
-
value: BigNumber;
|
|
1158
|
-
} | {
|
|
1159
|
-
type: TransferRestrictionType.ClaimCount;
|
|
1160
|
-
value: ClaimCountRestrictionValue;
|
|
1161
|
-
} | {
|
|
1162
|
-
type: TransferRestrictionType.ClaimPercentage;
|
|
1163
|
-
value: ClaimPercentageRestrictionValue;
|
|
1164
|
-
};
|
|
1165
|
-
export interface ClaimCountRestrictionValue {
|
|
1166
|
-
min: BigNumber;
|
|
1167
|
-
max?: BigNumber;
|
|
1168
|
-
issuer: Identity;
|
|
1169
|
-
claim: InputStatClaim;
|
|
1170
|
-
}
|
|
1171
|
-
export interface ClaimPercentageRestrictionValue {
|
|
1172
|
-
min: BigNumber;
|
|
1173
|
-
max: BigNumber;
|
|
1174
|
-
issuer: Identity;
|
|
1175
|
-
claim: InputStatClaim;
|
|
1176
|
-
}
|
|
1177
|
-
export interface AddCountStatInput {
|
|
1178
|
-
count: BigNumber;
|
|
1179
|
-
}
|
|
1180
|
-
export interface StatClaimIssuer {
|
|
1181
|
-
issuer: Identity;
|
|
1182
|
-
claimType: StatClaimType;
|
|
1183
|
-
}
|
|
1184
|
-
export declare type ClaimCountStatInput = {
|
|
1185
|
-
issuer: Identity;
|
|
1186
|
-
claimType: ClaimType.Accredited;
|
|
1187
|
-
value: {
|
|
1188
|
-
accredited: BigNumber;
|
|
1189
|
-
nonAccredited: BigNumber;
|
|
1190
|
-
};
|
|
1191
|
-
} | {
|
|
1192
|
-
issuer: Identity;
|
|
1193
|
-
claimType: ClaimType.Affiliate;
|
|
1194
|
-
value: {
|
|
1195
|
-
affiliate: BigNumber;
|
|
1196
|
-
nonAffiliate: BigNumber;
|
|
1197
|
-
};
|
|
1198
|
-
} | {
|
|
1199
|
-
issuer: Identity;
|
|
1200
|
-
claimType: ClaimType.Jurisdiction;
|
|
1201
|
-
value: {
|
|
1202
|
-
countryCode: CountryCode;
|
|
1203
|
-
count: BigNumber;
|
|
1204
|
-
}[];
|
|
1205
|
-
};
|
|
1206
|
-
export interface ScheduleWithDetails {
|
|
1207
|
-
schedule: CheckpointSchedule;
|
|
1208
|
-
details: ScheduleDetails;
|
|
1209
|
-
}
|
|
1210
|
-
export interface DistributionWithDetails {
|
|
1211
|
-
distribution: DividendDistribution;
|
|
1212
|
-
details: DividendDistributionDetails;
|
|
1213
|
-
}
|
|
1214
|
-
export interface DistributionPayment {
|
|
1215
|
-
blockNumber: BigNumber;
|
|
1216
|
-
blockHash: string;
|
|
1217
|
-
date: Date;
|
|
1218
|
-
target: Identity;
|
|
1219
|
-
amount: BigNumber;
|
|
1220
|
-
/**
|
|
1221
|
-
* percentage (0-100) of tax withholding for the `target` identity
|
|
1222
|
-
*/
|
|
1223
|
-
withheldTax: BigNumber;
|
|
1224
|
-
}
|
|
1225
|
-
export interface ProcedureOpts {
|
|
1226
|
-
/**
|
|
1227
|
-
* Account or address of a signing key to replace the current one (for this procedure only)
|
|
1228
|
-
*/
|
|
1229
|
-
signingAccount?: string | Account;
|
|
1230
|
-
/**
|
|
1231
|
-
* nonce value for signing the transaction
|
|
1232
|
-
*
|
|
1233
|
-
* An {@link api/entities/Account!Account} can directly fetch its current nonce by calling {@link api/entities/Account!Account.getCurrentNonce | account.getCurrentNonce}. More information can be found at: https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-take-the-pending-tx-pool-into-account-in-my-nonce
|
|
1234
|
-
*
|
|
1235
|
-
* @note the passed value can be either the nonce itself or a function that returns the nonce. This allows, for example, passing a closure that increases the returned value every time it's called, or a function that fetches the nonce from the chain or a different source
|
|
1236
|
-
*/
|
|
1237
|
-
nonce?: BigNumber | Promise<BigNumber> | (() => BigNumber | Promise<BigNumber>);
|
|
1238
|
-
/**
|
|
1239
|
-
* This option allows for transactions that never expire, aka "immortal". By default, a transaction is only valid for approximately 5 minutes (250 blocks) after its construction. Allows for transaction construction to be decoupled from its submission, such as requiring manual approval for the signing or providing "at least once" guarantees.
|
|
1240
|
-
*
|
|
1241
|
-
* More information can be found [here](https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality). Note the Polymesh chain will **never** reap Accounts, so the risk of a replay attack is mitigated.
|
|
1242
|
-
*/
|
|
1243
|
-
mortality?: MortalityProcedureOpt;
|
|
1244
|
-
}
|
|
1245
|
-
/**
|
|
1246
|
-
* This transaction will never expire
|
|
1247
|
-
*/
|
|
1248
|
-
export interface ImmortalProcedureOptValue {
|
|
1249
|
-
readonly immortal: true;
|
|
1250
|
-
}
|
|
1251
|
-
/**
|
|
1252
|
-
* This transaction will be rejected if not included in a block after a while (default: ~5 minutes)
|
|
1253
|
-
*/
|
|
1254
|
-
export interface MortalProcedureOptValue {
|
|
1255
|
-
readonly immortal: false;
|
|
1256
|
-
/**
|
|
1257
|
-
* The number of blocks the for which the transaction remains valid. Target block time is 6 seconds. The default should suffice for most use cases
|
|
1258
|
-
*
|
|
1259
|
-
* @note this value will get rounded up to the closest power of 2, e.g. `65` rounds up to `128`
|
|
1260
|
-
* @note this value should not exceed 4096, which is the chain's `BlockHashCount` as the lesser of the two will be used.
|
|
1261
|
-
*/
|
|
1262
|
-
readonly lifetime?: BigNumber;
|
|
1263
|
-
}
|
|
1264
|
-
export declare type MortalityProcedureOpt = ImmortalProcedureOptValue | MortalProcedureOptValue;
|
|
1265
|
-
export interface CreateTransactionBatchProcedureMethod {
|
|
1266
|
-
<ReturnValues extends readonly [...unknown[]]>(args: CreateTransactionBatchParams<ReturnValues>, opts?: ProcedureOpts): Promise<PolymeshTransactionBatch<ReturnValues, ReturnValues>>;
|
|
1267
|
-
checkAuthorization: <ReturnValues extends [...unknown[]]>(args: CreateTransactionBatchParams<ReturnValues>, opts?: ProcedureOpts) => Promise<ProcedureAuthorizationStatus>;
|
|
1268
|
-
}
|
|
1269
|
-
export interface ProcedureMethod<MethodArgs, ProcedureReturnValue, ReturnValue = ProcedureReturnValue> {
|
|
1270
|
-
(args: MethodArgs, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<ProcedureReturnValue, ReturnValue>>;
|
|
1271
|
-
checkAuthorization: (args: MethodArgs, opts?: ProcedureOpts) => Promise<ProcedureAuthorizationStatus>;
|
|
1272
|
-
}
|
|
1273
|
-
export interface OptionalArgsProcedureMethod<MethodArgs, ProcedureReturnValue, ReturnValue = ProcedureReturnValue> {
|
|
1274
|
-
(args?: MethodArgs, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<ProcedureReturnValue, ReturnValue>>;
|
|
1275
|
-
checkAuthorization: (args?: MethodArgs, opts?: ProcedureOpts) => Promise<ProcedureAuthorizationStatus>;
|
|
1276
|
-
}
|
|
1277
|
-
export interface NoArgsProcedureMethod<ProcedureReturnValue, ReturnValue = ProcedureReturnValue> {
|
|
1278
|
-
(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<ProcedureReturnValue, ReturnValue>>;
|
|
1279
|
-
checkAuthorization: (opts?: ProcedureOpts) => Promise<ProcedureAuthorizationStatus>;
|
|
1280
|
-
}
|
|
1281
|
-
export interface GroupedInstructions {
|
|
1282
|
-
/**
|
|
1283
|
-
* Instructions that have already been affirmed by the Identity
|
|
1284
|
-
*/
|
|
1285
|
-
affirmed: Instruction[];
|
|
1286
|
-
/**
|
|
1287
|
-
* Instructions that still need to be affirmed/rejected by the Identity
|
|
1288
|
-
*/
|
|
1289
|
-
pending: Instruction[];
|
|
1290
|
-
/**
|
|
1291
|
-
* Instructions that failed in their execution (can be rescheduled).
|
|
1292
|
-
* This group supersedes the other three, so for example, a failed Instruction
|
|
1293
|
-
* might also belong in the `affirmed` group, but it will only be included in this one
|
|
1294
|
-
*/
|
|
1295
|
-
failed: Instruction[];
|
|
1296
|
-
}
|
|
1297
|
-
export declare type InstructionsByStatus = GroupedInstructions & {
|
|
1298
|
-
/**
|
|
1299
|
-
* Instructions that have one or more legs already affirmed, but still need to be one or more legs to be affirmed/rejected by the Identity
|
|
1300
|
-
*/
|
|
1301
|
-
partiallyAffirmed: Instruction[];
|
|
1302
|
-
};
|
|
1303
|
-
export interface GroupedInvolvedInstructions {
|
|
1304
|
-
/**
|
|
1305
|
-
* Instructions where the Identity is the custodian of the leg portfolios
|
|
1306
|
-
*/
|
|
1307
|
-
custodied: GroupedInstructions;
|
|
1308
|
-
/**
|
|
1309
|
-
* Instructions where the Identity is the owner of the leg portfolios
|
|
1310
|
-
*/
|
|
1311
|
-
owned: Omit<GroupedInstructions, 'affirmed'>;
|
|
1312
|
-
}
|
|
1313
|
-
export interface AssetWithGroup {
|
|
1314
|
-
asset: FungibleAsset;
|
|
1315
|
-
group: KnownPermissionGroup | CustomPermissionGroup;
|
|
1316
|
-
}
|
|
1317
|
-
/**
|
|
1318
|
-
* Events triggered by transactions performed by an Agent Identity, related to the Token's configuration
|
|
1319
|
-
* For example: changing compliance requirements, inviting/removing agent Identities, freezing/unfreezing transfers
|
|
1320
|
-
*
|
|
1321
|
-
* Token transfers (settlements or movements between Portfolios) do not count as Operations
|
|
1322
|
-
*/
|
|
1323
|
-
export interface HistoricAgentOperation {
|
|
1324
|
-
/**
|
|
1325
|
-
* Agent Identity that performed the operations
|
|
1326
|
-
*/
|
|
1327
|
-
identity: Identity;
|
|
1328
|
-
/**
|
|
1329
|
-
* list of Token Operation Events that were triggered by the Agent Identity
|
|
1330
|
-
*/
|
|
1331
|
-
history: EventIdentifier[];
|
|
1332
|
-
}
|
|
1333
|
-
/**
|
|
1334
|
-
* URI|mnemonic|hex representation of a private key
|
|
1335
|
-
*/
|
|
1336
|
-
export declare type PrivateKey = {
|
|
1337
|
-
uri: string;
|
|
1338
|
-
} | {
|
|
1339
|
-
mnemonic: string;
|
|
1340
|
-
} | {
|
|
1341
|
-
seed: string;
|
|
1342
|
-
};
|
|
1343
|
-
/**
|
|
1344
|
-
* Targets of a corporate action in a flexible structure for input purposes
|
|
1345
|
-
*/
|
|
1346
|
-
export declare type InputCorporateActionTargets = Modify<CorporateActionTargets, {
|
|
1347
|
-
identities: (string | Identity)[];
|
|
1348
|
-
}>;
|
|
1349
|
-
/**
|
|
1350
|
-
* Per-Identity tax withholdings of a corporate action in a flexible structure for input purposes
|
|
1351
|
-
*/
|
|
1352
|
-
export declare type InputCorporateActionTaxWithholdings = Modify<TaxWithholding, {
|
|
1353
|
-
identity: string | Identity;
|
|
1354
|
-
}>[];
|
|
1355
|
-
export declare type GenericPolymeshTransaction<ProcedureReturnValue, ReturnValue> = PolymeshTransaction<ProcedureReturnValue, ReturnValue> | PolymeshTransactionBatch<ProcedureReturnValue, ReturnValue>;
|
|
1356
|
-
export declare type TransactionArray<ReturnValues extends readonly [...unknown[]]> = {
|
|
1357
|
-
[K in keyof ReturnValues]: GenericPolymeshTransaction<any, ReturnValues[K]>;
|
|
1358
|
-
};
|
|
1359
|
-
/**
|
|
1360
|
-
* Transaction data for display purposes
|
|
1361
|
-
*/
|
|
1362
|
-
export interface TxData<Args extends unknown[] = unknown[]> {
|
|
1363
|
-
/**
|
|
1364
|
-
* transaction string identifier
|
|
1365
|
-
*/
|
|
1366
|
-
tag: TxTag;
|
|
1367
|
-
/**
|
|
1368
|
-
* arguments with which the transaction will be called
|
|
1369
|
-
*/
|
|
1370
|
-
args: Args;
|
|
1371
|
-
}
|
|
1372
|
-
export interface MiddlewareMetadata {
|
|
1373
|
-
chain: string;
|
|
1374
|
-
genesisHash: string;
|
|
1375
|
-
indexerHealthy: boolean;
|
|
1376
|
-
lastProcessedHeight: BigNumber;
|
|
1377
|
-
lastProcessedTimestamp: Date;
|
|
1378
|
-
specName: string;
|
|
1379
|
-
targetHeight: BigNumber;
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Apply the {@link TxData} type to all args in an array
|
|
1383
|
-
*/
|
|
1384
|
-
export declare type MapTxData<ArgsArray extends unknown[][]> = {
|
|
1385
|
-
[K in keyof ArgsArray]: ArgsArray[K] extends unknown[] ? TxData<ArgsArray[K]> : never;
|
|
1386
|
-
};
|
|
1387
|
-
/**
|
|
1388
|
-
*
|
|
1389
|
-
*/
|
|
1390
|
-
export interface SpWeightV2 {
|
|
1391
|
-
refTime: BigNumber;
|
|
1392
|
-
proofSize: BigNumber;
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* CustomClaimType
|
|
1396
|
-
*/
|
|
1397
|
-
export declare type CustomClaimType = {
|
|
1398
|
-
name: string;
|
|
1399
|
-
id: BigNumber;
|
|
1400
|
-
};
|
|
1401
|
-
/**
|
|
1402
|
-
* Represents JSON serializable data. Used for cases when the value can take on many types, like args for a MultiSig proposal.
|
|
1403
|
-
*/
|
|
1404
|
-
export declare type AnyJson = string | number | boolean | null | undefined | AnyJson[] | {
|
|
1405
|
-
[index: string]: AnyJson;
|
|
1406
|
-
};
|
|
1407
|
-
/**
|
|
1408
|
-
* An nft collection, along with a subset of its NFTs
|
|
1409
|
-
*/
|
|
1410
|
-
export interface HeldNfts {
|
|
1411
|
-
collection: NftCollection;
|
|
1412
|
-
nfts: Nft[];
|
|
1413
|
-
}
|
|
1414
|
-
/**
|
|
1415
|
-
* CustomClaimType with DID that registered the CustomClaimType
|
|
1416
|
-
*/
|
|
1417
|
-
export declare type CustomClaimTypeWithDid = CustomClaimType & {
|
|
1418
|
-
did?: string;
|
|
1419
|
-
};
|
|
1420
12
|
//# sourceMappingURL=index.d.ts.map
|