generated from PolymeshAssociation/typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
/
types.ts
835 lines (739 loc) · 21.1 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
import BigNumber from 'bignumber.js';
import {
Account as AccountClass,
AuthorizationRequest as AuthorizationRequestClass,
BaseAsset,
Checkpoint as CheckpointClass,
CheckpointSchedule as CheckpointScheduleClass,
ChildIdentity as ChildIdentityClass,
CorporateAction as CorporateActionClass,
CustomPermissionGroup as CustomPermissionGroupClass,
DefaultPortfolio as DefaultPortfolioClass,
DefaultTrustedClaimIssuer as DefaultTrustedClaimIssuerClass,
DividendDistribution as DividendDistributionClass,
FungibleAsset as FungibleAssetClass,
Identity as IdentityClass,
Instruction as InstructionClass,
KnownPermissionGroup as KnownPermissionGroupClass,
MetadataEntry as MetadataEntryClass,
MultiSig as MultiSigClass,
MultiSigProposal as MultiSigProposalClass,
Nft as NftClass,
NftCollection as NftCollectionClass,
NumberedPortfolio as NumberedPortfolioClass,
Offering as OfferingClass,
Subsidy as SubsidyClass,
TickerReservation as TickerReservationClass,
Venue as VenueClass,
} from '~/internal';
import {
CountryCode,
DividendDistributionDetails,
ModuleName,
OfferingDetails,
Role,
ScheduleDetails,
SubsidyData,
TxGroup,
TxTag,
} from '~/types';
import { Modify } from '~/types/utils';
export type Account = AccountClass;
export type MultiSig = MultiSigClass;
export type MultiSigProposal = MultiSigProposalClass;
export type AuthorizationRequest = AuthorizationRequestClass;
export type Checkpoint = CheckpointClass;
export type CheckpointSchedule = CheckpointScheduleClass;
export type CorporateAction = CorporateActionClass;
export type CustomPermissionGroup = CustomPermissionGroupClass;
export type DefaultPortfolio = DefaultPortfolioClass;
export type DefaultTrustedClaimIssuer = DefaultTrustedClaimIssuerClass;
export type DividendDistribution = DividendDistributionClass;
export type Identity = IdentityClass;
export type ChildIdentity = ChildIdentityClass;
export type Instruction = InstructionClass;
export type KnownPermissionGroup = KnownPermissionGroupClass;
export type NumberedPortfolio = NumberedPortfolioClass;
export type FungibleAsset = FungibleAssetClass;
export type Nft = NftClass;
export type NftCollection = NftCollectionClass;
export type MetadataEntry = MetadataEntryClass;
export type Offering = OfferingClass;
export type TickerReservation = TickerReservationClass;
export type Venue = VenueClass;
export type Subsidy = SubsidyClass;
export * from './CheckpointSchedule/types';
export * from './CorporateActionBase/types';
export * from './DividendDistribution/types';
export * from './Instruction/types';
export * from './Portfolio/types';
export * from './Asset/types';
export * from './Offering/types';
export * from './TickerReservation/types';
export * from './Venue/types';
export * from './Subsidy/types';
export * from './Account/types';
export * from './Account/MultiSig/types';
export * from './MultiSigProposal/types';
export * from './MetadataEntry/types';
export type SubCallback<T> = (result: T) => void | Promise<void>;
export type UnsubCallback = () => void;
export interface PaginationOptions {
size: BigNumber;
start?: string;
}
export type NextKey = string | BigNumber | null;
export interface ResultSet<T> {
data: T[];
next: NextKey;
/**
* @note methods will have `count` defined when middleware is configured, but be undefined otherwise. This happens when the chain node is queried directly
*/
count?: BigNumber;
}
export enum SignerType {
/* eslint-disable @typescript-eslint/no-shadow */
Identity = 'Identity',
Account = 'Account',
/* eslint-enable @typescript-eslint/no-shadow */
}
export interface SignerValue {
/**
* whether the signer is an Account or Identity
*/
type: SignerType;
/**
* address or DID (depending on whether the signer is an Account or Identity)
*/
value: string;
}
/**
* Type of Authorization Request
*/
export enum AuthorizationType {
AttestPrimaryKeyRotation = 'AttestPrimaryKeyRotation',
RotatePrimaryKey = 'RotatePrimaryKey',
TransferTicker = 'TransferTicker',
AddMultiSigSigner = 'AddMultiSigSigner',
TransferAssetOwnership = 'TransferAssetOwnership',
JoinIdentity = 'JoinIdentity',
PortfolioCustody = 'PortfolioCustody',
BecomeAgent = 'BecomeAgent',
AddRelayerPayingKey = 'AddRelayerPayingKey',
RotatePrimaryKeyToSecondary = 'RotatePrimaryKeyToSecondary',
}
export enum ConditionTarget {
Sender = 'Sender',
Receiver = 'Receiver',
Both = 'Both',
}
export enum ScopeType {
// eslint-disable-next-line @typescript-eslint/no-shadow
Identity = 'Identity',
/**
* @deprecated in favour of Asset
*/
Ticker = 'Ticker',
Asset = 'Asset',
Custom = 'Custom',
}
export interface Scope {
type: ScopeType;
value: string;
}
export enum ClaimType {
Accredited = 'Accredited',
Affiliate = 'Affiliate',
BuyLockup = 'BuyLockup',
SellLockup = 'SellLockup',
CustomerDueDiligence = 'CustomerDueDiligence',
KnowYourCustomer = 'KnowYourCustomer',
Jurisdiction = 'Jurisdiction',
Exempted = 'Exempted',
Blocked = 'Blocked',
Custom = 'Custom',
}
export interface AccreditedClaim {
type: ClaimType.Accredited;
scope: Scope;
}
export interface AffiliateClaim {
type: ClaimType.Affiliate;
scope: Scope;
}
export interface BuyLockupClaim {
type: ClaimType.BuyLockup;
scope: Scope;
}
export interface SellLockupClaim {
type: ClaimType.SellLockup;
scope: Scope;
}
export interface CddClaim {
type: ClaimType.CustomerDueDiligence;
id: string;
}
export interface KycClaim {
type: ClaimType.KnowYourCustomer;
scope: Scope;
}
export interface JurisdictionClaim {
type: ClaimType.Jurisdiction;
code: CountryCode;
scope: Scope;
}
export interface ExemptedClaim {
type: ClaimType.Exempted;
scope: Scope;
}
export interface CustomClaim {
type: ClaimType.Custom;
scope: Scope;
customClaimTypeId: BigNumber;
}
export type CustomClaimWithoutScope = Omit<CustomClaim, 'scope'> & { scope: undefined };
export interface BlockedClaim {
type: ClaimType.Blocked;
scope: Scope;
}
export type ScopedClaim =
| JurisdictionClaim
| AccreditedClaim
| AffiliateClaim
| BuyLockupClaim
| SellLockupClaim
| KycClaim
| ExemptedClaim
| BlockedClaim
| CustomClaim;
export type UnscopedClaim = CddClaim | CustomClaimWithoutScope;
export type Claim = ScopedClaim | UnscopedClaim;
export interface ClaimData<ClaimType = Claim> {
target: Identity;
issuer: Identity;
issuedAt: Date;
lastUpdatedAt: Date;
expiry: Date | null;
claim: ClaimType;
}
export type StatClaimType = ClaimType.Accredited | ClaimType.Affiliate | ClaimType.Jurisdiction;
export interface StatJurisdictionClaimInput {
type: ClaimType.Jurisdiction;
countryCode?: CountryCode;
}
export interface StatAccreditedClaimInput {
type: ClaimType.Accredited;
accredited: boolean;
}
export interface StatAffiliateClaimInput {
type: ClaimType.Affiliate;
affiliate: boolean;
}
export type InputStatClaim =
| StatJurisdictionClaimInput
| StatAccreditedClaimInput
| StatAffiliateClaimInput;
export type InputStatType =
| {
type: StatType.Count | StatType.Balance;
}
| {
type: StatType.ScopedCount | StatType.ScopedBalance;
claimIssuer: StatClaimIssuer;
};
/**
* Represents the StatType from the `statistics` module.
*
* @note the chain doesn't use "Scoped" types, but they are needed here to discriminate the input instead of having an optional input
*/
export enum StatType {
Count = 'Count',
Balance = 'Balance',
/**
* ScopedCount is an SDK only type, on chain it is `Count` with a claimType option present
*/
ScopedCount = 'ScopedCount',
/**
* ScopedPercentage is an SDK only type, on chain it is `Balance` with a claimType option present
*/
ScopedBalance = 'ScopedBalance',
}
export interface IdentityWithClaims {
identity: Identity;
claims: ClaimData[];
}
export interface ClaimScope {
scope: Scope | null;
ticker?: string;
}
/**
* @param IsDefault - whether the Identity is a default trusted claim issuer for an asset or just
* for a specific compliance condition. Defaults to false
*/
export interface TrustedClaimIssuer<IsDefault extends boolean = false> {
identity: IsDefault extends true ? DefaultTrustedClaimIssuer : Identity;
/**
* a null value means that the issuer is trusted for all claim types
*/
trustedFor: ClaimType[] | null;
}
export type InputTrustedClaimIssuer = Modify<
TrustedClaimIssuer,
{
identity: string | Identity;
}
>;
export enum ConditionType {
IsPresent = 'IsPresent',
IsAbsent = 'IsAbsent',
IsAnyOf = 'IsAnyOf',
IsNoneOf = 'IsNoneOf',
IsExternalAgent = 'IsExternalAgent',
IsIdentity = 'IsIdentity',
}
export interface ConditionBase {
target: ConditionTarget;
/**
* if undefined, the default trusted claim issuers for the Asset are used
*/
trustedClaimIssuers?: TrustedClaimIssuer[];
}
export type InputConditionBase = Modify<
ConditionBase,
{
/**
* if undefined, the default trusted claim issuers for the Asset are used
*/
trustedClaimIssuers?: InputTrustedClaimIssuer[];
}
>;
export interface SingleClaimCondition {
type: ConditionType.IsPresent | ConditionType.IsAbsent;
claim: Claim;
}
export interface MultiClaimCondition {
type: ConditionType.IsAnyOf | ConditionType.IsNoneOf;
claims: Claim[];
}
export interface IdentityCondition {
type: ConditionType.IsIdentity;
identity: Identity;
}
export interface ExternalAgentCondition {
type: ConditionType.IsExternalAgent;
}
export type Condition = (
| SingleClaimCondition
| MultiClaimCondition
| IdentityCondition
| ExternalAgentCondition
) &
ConditionBase;
export type InputCondition = (
| SingleClaimCondition
| MultiClaimCondition
| Modify<
IdentityCondition,
{
identity: string | Identity;
}
>
| ExternalAgentCondition
) &
InputConditionBase;
export interface Requirement {
id: BigNumber;
conditions: Condition[];
}
export interface ComplianceRequirements {
requirements: Requirement[];
/**
* used for conditions where no trusted claim issuers were specified
*/
defaultTrustedClaimIssuers: TrustedClaimIssuer[];
}
export type InputRequirement = Modify<Requirement, { conditions: InputCondition[] }>;
export interface ConditionCompliance {
condition: Condition;
complies: boolean;
}
export interface RequirementCompliance {
id: BigNumber;
conditions: ConditionCompliance[];
complies: boolean;
}
export interface Compliance {
requirements: RequirementCompliance[];
complies: boolean;
}
export interface ClaimTarget {
target: string | Identity;
claim: Claim;
expiry?: Date;
}
export type AttestPrimaryKeyRotationAuthorizationData = {
type: AuthorizationType.AttestPrimaryKeyRotation;
value: Identity;
};
export type RotatePrimaryKeyAuthorizationData = {
type: AuthorizationType.RotatePrimaryKey;
};
export type RotatePrimaryKeyToSecondaryData = {
type: AuthorizationType.RotatePrimaryKeyToSecondary;
value: Permissions;
};
export type JoinIdentityAuthorizationData = {
type: AuthorizationType.JoinIdentity;
value: Permissions;
};
export type PortfolioCustodyAuthorizationData = {
type: AuthorizationType.PortfolioCustody;
value: NumberedPortfolio | DefaultPortfolio;
};
export type BecomeAgentAuthorizationData = {
type: AuthorizationType.BecomeAgent;
value: KnownPermissionGroup | CustomPermissionGroup;
};
export type AddRelayerPayingKeyAuthorizationData = {
type: AuthorizationType.AddRelayerPayingKey;
value: SubsidyData;
};
export type GenericAuthorizationData = {
type: Exclude<
AuthorizationType,
| AuthorizationType.RotatePrimaryKey
| AuthorizationType.JoinIdentity
| AuthorizationType.PortfolioCustody
| AuthorizationType.BecomeAgent
| AuthorizationType.AddRelayerPayingKey
| AuthorizationType.RotatePrimaryKeyToSecondary
| AuthorizationType.AttestPrimaryKeyRotation
>;
value: string;
};
/**
* Authorization request data corresponding to type
*/
export type Authorization =
| AttestPrimaryKeyRotationAuthorizationData
| RotatePrimaryKeyAuthorizationData
| JoinIdentityAuthorizationData
| PortfolioCustodyAuthorizationData
| BecomeAgentAuthorizationData
| AddRelayerPayingKeyAuthorizationData
| RotatePrimaryKeyToSecondaryData
| GenericAuthorizationData;
interface TransferRestrictionBase {
/**
* array of Identity IDs that are exempted from the Restriction
*/
exemptedIds?: string[];
}
export interface CountTransferRestriction extends TransferRestrictionBase {
count: BigNumber;
}
export interface PercentageTransferRestriction extends TransferRestrictionBase {
/**
* maximum percentage (0-100) of the total supply of the Asset that can be held by a single investor at once
*/
percentage: BigNumber;
}
export interface ClaimCountTransferRestriction extends TransferRestrictionBase {
/**
* The type of investors this restriction applies to. e.g. non-accredited
*/
claim: InputStatClaim;
/**
* The minimum amount of investors the must meet the Claim criteria
*/
min: BigNumber;
/**
* The maximum amount of investors that must meet the Claim criteria
*/
max?: BigNumber;
issuer: Identity;
}
export interface ClaimPercentageTransferRestriction extends TransferRestrictionBase {
/**
* The type of investors this restriction applies to. e.g. Canadian investor
*/
claim: InputStatClaim;
/**
* The minimum percentage of the total supply that investors meeting the Claim criteria must hold
*/
min: BigNumber;
/**
* The maximum percentage of the total supply that investors meeting the Claim criteria must hold
*/
max: BigNumber;
issuer: Identity;
}
export interface ActiveTransferRestrictions<
Restriction extends
| CountTransferRestriction
| PercentageTransferRestriction
| ClaimCountTransferRestriction
| ClaimPercentageTransferRestriction
> {
restrictions: Restriction[];
/**
* amount of restrictions that can be added before reaching the shared limit
*/
availableSlots: BigNumber;
}
export interface AddCountStatInput {
count: BigNumber;
}
export interface StatClaimIssuer {
issuer: Identity;
claimType: StatClaimType;
}
export type ClaimCountStatInput =
| {
issuer: Identity;
claimType: ClaimType.Accredited;
value: { accredited: BigNumber; nonAccredited: BigNumber };
}
| {
issuer: Identity;
claimType: ClaimType.Affiliate;
value: { affiliate: BigNumber; nonAffiliate: BigNumber };
}
| {
issuer: Identity;
claimType: ClaimType.Jurisdiction;
value: { countryCode: CountryCode; count: BigNumber }[];
};
export interface ScheduleWithDetails {
schedule: CheckpointSchedule;
details: ScheduleDetails;
}
export interface DistributionWithDetails {
distribution: DividendDistribution;
details: DividendDistributionDetails;
}
export interface DistributionPayment {
blockNumber: BigNumber;
blockHash: string;
date: Date;
target: Identity;
amount: BigNumber;
/**
* percentage (0-100) of tax withholding for the `target` identity
*/
withheldTax: BigNumber;
}
export enum PermissionType {
Include = 'Include',
Exclude = 'Exclude',
}
/**
* Signer/agent permissions for a specific type
*
* @param T - type of Permissions (Asset, Transaction, Portfolio, etc)
*/
export interface SectionPermissions<T> {
/**
* Values to be included/excluded
*/
values: T[];
/**
* Whether the permissions are inclusive or exclusive
*/
type: PermissionType;
}
/**
* Permissions related to Transactions. Can include/exclude individual transactions or entire modules
*/
export interface TransactionPermissions extends SectionPermissions<TxTag | ModuleName> {
/**
* Transactions to be exempted from inclusion/exclusion. This allows more granularity when
* setting permissions. For example, let's say we want to include only the `asset` and `staking` modules,
* but exclude the `asset.registerTicker` transaction. We could add both modules to `values`, and add
* `TxTags.asset.registerTicker` to `exceptions`
*/
exceptions?: TxTag[];
}
/**
* Permissions a Secondary Key has over the Identity. A null value means the key has
* all permissions of that type (e.g. if `assets` is null, the key has permissions over all
* of the Identity's Assets)
*/
export interface Permissions {
/**
* Assets over which this key has permissions
*/
assets: SectionPermissions<FungibleAsset> | null;
/**
* Transactions this key can execute
*/
transactions: TransactionPermissions | null;
/**
* list of Transaction Groups this key can execute. Having permissions over a TxGroup
* means having permissions over every TxTag in said group. Partial group permissions are not
* covered by this value. For a full picture of transaction permissions, see the `transactions` property
*
* NOTE: If transactions is null, ignore this value
*/
transactionGroups: TxGroup[];
/* list of Portfolios over which this key has permissions */
portfolios: SectionPermissions<DefaultPortfolio | NumberedPortfolio> | null;
}
/**
* Asset permissions shared by agents in a group
*/
export type GroupPermissions = Pick<Permissions, 'transactions' | 'transactionGroups'>;
/**
* All Permission Groups of a specific Asset, separated by `known` and `custom`
*/
export interface PermissionGroups {
known: KnownPermissionGroup[];
custom: CustomPermissionGroup[];
}
/**
* This represents positive permissions (i.e. only "includes"). It is used
* for specifying procedure requirements and querying if an Account has certain
* permissions. Null values represent full permissions in that category
*/
export interface SimplePermissions {
/**
* list of required Asset permissions
*/
assets?: BaseAsset[] | null;
/**
* list of required Transaction permissions
*/
transactions?: TxTag[] | null;
/* list of required Portfolio permissions */
portfolios?: (DefaultPortfolio | NumberedPortfolio)[] | null;
}
/**
* Result of a `checkRoles` call
*/
export interface CheckRolesResult {
/**
* required roles which the Identity *DOESN'T* have. Only present if `result` is `false`
*/
missingRoles?: Role[];
/**
* whether the signer possesses all the required roles or not
*/
result: boolean;
/**
* optional message explaining the reason for failure in special cases
*/
message?: string;
}
/**
* Result of a `checkPermissions` call. If `Type` is `Account`, represents whether the Account
* has all the necessary secondary key Permissions. If `Type` is `Identity`, represents whether the
* Identity has all the necessary external agent Permissions
*/
export interface CheckPermissionsResult<Type extends SignerType> {
/**
* required permissions which the signer *DOESN'T* have. Only present if `result` is `false`
*/
missingPermissions?: Type extends SignerType.Account ? SimplePermissions : TxTag[] | null;
/**
* whether the signer complies with the required permissions or not
*/
result: boolean;
/**
* optional message explaining the reason for failure in special cases
*/
message?: string;
}
export enum PermissionGroupType {
/**
* all transactions authorized
*/
Full = 'Full',
/**
* not authorized:
* - externalAgents
*/
ExceptMeta = 'ExceptMeta',
/**
* authorized:
* - corporateAction
* - corporateBallot
* - capitalDistribution
*/
PolymeshV1Caa = 'PolymeshV1Caa',
/**
* authorized:
* - asset.issue
* - asset.redeem
* - asset.controllerTransfer
* - sto (except for sto.invest)
*/
PolymeshV1Pia = 'PolymeshV1Pia',
}
export type Signer = Identity | Account;
export interface OfferingWithDetails {
offering: Offering;
details: OfferingDetails;
}
export interface CheckpointWithData {
checkpoint: Checkpoint;
createdAt: Date;
totalSupply: BigNumber;
}
export interface PermissionedAccount {
account: Account | MultiSig;
permissions: Permissions;
}
export type PortfolioLike =
| string
| Identity
| NumberedPortfolio
| DefaultPortfolio
| { identity: string | Identity; id: BigNumber };
/**
* Permissions to grant to a Signer over an Identity
*
* {@link Permissions}
*
* @note TxGroups in the `transactionGroups` array will be transformed into their corresponding `TxTag`s
*/
export type PermissionsLike = {
/**
* Assets on which to grant permissions. A null value represents full permissions
*/
assets?: SectionPermissions<string | FungibleAsset> | null;
/**
* Portfolios on which to grant permissions. A null value represents full permissions
*/
portfolios?: SectionPermissions<PortfolioLike> | null;
/**
* transaction that the Secondary Key has permission to execute. A null value represents full permissions
*/
} & (
| {
transactions?: TransactionPermissions | null;
}
| {
transactionGroups?: TxGroup[];
}
);
export interface FungiblePortfolioMovement {
asset: string | FungibleAsset;
amount: BigNumber;
/**
* identifier string to help differentiate transfers
*/
memo?: string;
}
export type NonFungiblePortfolioMovement = {
asset: NftCollection | string;
nfts: (Nft | BigNumber)[];
/**
* identifier string to help differentiate transfers
*/
memo?: string;
};
export type PortfolioMovement = FungiblePortfolioMovement | NonFungiblePortfolioMovement;
export type ActiveStats = {
isSet: boolean;
claims?: { claimType: ClaimType; issuer: Identity }[];
};