-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.NumberedPortfolio.NumberedPortfolio
api/entities/NumberedPortfolio.NumberedPortfolio
Represents a numbered (non-default) Portfolio for an Identity
-
↳
NumberedPortfolio
- createdAt
- exists
- getAssetBalances
- getCustodian
- getName
- getTransactionHistory
- isCustodiedBy
- isEqual
- isOwnedBy
- modifyName
- moveFunds
- quitCustody
- setCustodian
- toHuman
- generateUuid
- unserialize
• id: BigNumber
Portfolio identifier number
api/entities/NumberedPortfolio.ts:40
• owner: Identity
Identity of the Portfolio's owner
api/entities/Portfolio/index.ts:71
• uuid: string
▸ createdAt(): Promise
<null
| EventIdentifier
>
Retrieve the identifier data (block number, date and event index) of the event that was emitted when this Portfolio was created
Note
uses the middlewareV2
Note
there is a possibility that the data is not ready by the time it is requested. In that case, null
is returned
Promise
<null
| EventIdentifier
>
▸ exists(): Promise
<boolean
>
Return whether this Portfolio exists
Promise
<boolean
>
▸ getAssetBalances(args?
): Promise
<PortfolioBalance
[]>
Retrieve the balances of all Assets in this Portfolio
Name | Type | Description |
---|---|---|
args? |
Object |
- |
args.assets |
(string | Asset )[] |
array of Assets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed) |
Promise
<PortfolioBalance
[]>
▸ getCustodian(): Promise
<Identity
>
Retrieve the custodian Identity of this Portfolio
Note
if no custodian is set, the owner Identity is returned
Promise
<Identity
>
▸ getName(): Promise
<string
>
Return the Portfolio name
Promise
<string
>
▸ getTransactionHistory(filters?
): Promise
<HistoricSettlement
[]>
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
Note
uses the middlewareV2
Name | Type | Description |
---|---|---|
filters |
Object |
- |
filters.account? |
string |
Account involved in the settlement |
filters.ticker? |
string |
ticker involved in the transaction |
Promise
<HistoricSettlement
[]>
Portfolio.getTransactionHistory
▸ isCustodiedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio custodian
Name | Type | Description |
---|---|---|
args? |
Object |
- |
args.identity |
string | Identity
|
optional, defaults to the signing Identity |
Promise
<boolean
>
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ isOwnedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio owner
Name | Type | Description |
---|---|---|
args? |
Object |
- |
args.identity |
string | Identity
|
defaults to the signing Identity |
Promise
<boolean
>
▸ modifyName(args
, opts?
): Promise
<GenericPolymeshTransaction
<NumberedPortfolio
, NumberedPortfolio
>>
Rename portfolio
Note
Only the owner is allowed to rename the Portfolio.
Note
this method is of type ProcedureMethod, which means you can call modifyName.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
RenamePortfolioParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<NumberedPortfolio
, NumberedPortfolio
>>
▸ moveFunds(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Moves funds from this Portfolio to another one owned by the same Identity
Note
required role:
- Portfolio Custodian
Note
this method is of type ProcedureMethod, which means you can call moveFunds.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
MoveFundsParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
▸ quitCustody(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Returns the custody of the portfolio to the portfolio owner unilaterally
Note
required role:
- Portfolio Custodian
Note
this method is of type NoArgsProcedureMethod, which means you can call quitCustody.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
▸ setCustodian(args
, opts?
): Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Send an invitation to an Identity to assign it as custodian for this Portfolio
Note
this will create an Authorization Request which has to be accepted by the targetIdentity
.
An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived.
Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne
Note
required role:
- Portfolio Custodian
Note
this method is of type ProcedureMethod, which means you can call setCustodian.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
SetCustodianParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
▸ toHuman(): HumanReadable
Return the Portfolio ID and owner DID
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types