api_entities_NumberedPortfolio.NumberedPortfolio
@polymeshassociation/polymesh-sdk / Modules / api/entities/NumberedPortfolio / NumberedPortfolio
Class: NumberedPortfolio
api/entities/NumberedPortfolio.NumberedPortfolio
Represents a numbered (non-default) Portfolio for an Identity
Hierarchy
↳
NumberedPortfolio
Table of contents
Properties
Methods
Properties
id
• id: BigNumber
Portfolio identifier number
Defined in
api/entities/NumberedPortfolio.ts:46
owner
• owner: Identity
Identity of the Portfolio's owner
Inherited from
Defined in
api/entities/Portfolio/index.ts:75
uuid
• uuid: string
Inherited from
Defined in
Methods
createdAt
▸ 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 middleware
note
there is a possibility that the data is not ready by the time it is requested. In that case, null
is returned
Returns
Promise
<null
| EventIdentifier
>
Defined in
api/entities/NumberedPortfolio.ts:112
exists
▸ exists(): Promise
<boolean
>
Return whether this Portfolio exists
Returns
Promise
<boolean
>
Overrides
Defined in
api/entities/NumberedPortfolio.ts:136
getAssetBalances
▸ getAssetBalances(args?
): Promise
<PortfolioBalance
[]>
Retrieve the balances of all Assets in this Portfolio
Parameters
Name | Type | Description |
---|---|---|
|
| - |
| ( | array of Assets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed) |
Returns
Promise
<PortfolioBalance
[]>
Inherited from
Defined in
api/entities/Portfolio/index.ts:141
getCustodian
▸ getCustodian(): Promise
<Identity
>
Retrieve the custodian Identity of this Portfolio
note
if no custodian is set, the owner Identity is returned
Returns
Promise
<Identity
>
Inherited from
Defined in
api/entities/Portfolio/index.ts:271
getName
▸ getName(): Promise
<string
>
Return the Portfolio name
Returns
Promise
<string
>
Defined in
api/entities/NumberedPortfolio.ts:80
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<ResultSet
<HistoricSettlement
>>
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
note
supports pagination
note
uses the middleware
Parameters
Name | Type | Description |
---|---|---|
|
| - |
|
| Account involved in the settlement |
|
| page size |
|
| page offset |
|
| ticker involved in the transaction |
Returns
Promise
<ResultSet
<HistoricSettlement
>>
Inherited from
Portfolio.getTransactionHistory
Defined in
api/entities/Portfolio/index.ts:316
isCustodiedBy
▸ isCustodiedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio custodian
Parameters
Name | Type | Description |
---|---|---|
|
| - |
|
| optional, defaults to the signing Identity |
Returns
Promise
<boolean
>
Inherited from
Defined in
api/entities/Portfolio/index.ts:125
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
|
|
Returns
boolean
Inherited from
Defined in
isOwnedBy
▸ isOwnedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio owner
Parameters
Name | Type | Description |
---|---|---|
|
| - |
|
| defaults to the signing Identity |
Returns
Promise
<boolean
>
Inherited from
Defined in
api/entities/Portfolio/index.ts:112
modifyName
▸ modifyName(args
, opts?
): Promise
<TransactionQueue
<NumberedPortfolio
, NumberedPortfolio
, unknown
[][]>>
Rename portfolio
note
required role:
Portfolio Custodian
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
Parameters
Name | Type |
---|---|
| |
|
Returns
Promise
<TransactionQueue
<NumberedPortfolio
, NumberedPortfolio
, unknown
[][]>>
Defined in
api/entities/NumberedPortfolio.ts:73
moveFunds
▸ moveFunds(args
, opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
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
Parameters
Name | Type |
---|---|
| |
|
Returns
Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Inherited from
Defined in
api/entities/Portfolio/index.ts:249
quitCustody
▸ quitCustody(opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
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
Parameters
Name | Type |
---|---|
|
Returns
Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Inherited from
Defined in
api/entities/Portfolio/index.ts:262
setCustodian
▸ setCustodian(args
, opts?
): Promise
<TransactionQueue
<AuthorizationRequest
, AuthorizationRequest
, unknown
[][]>>
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
Parameters
Name | Type |
---|---|
| |
|
Returns
Promise
<TransactionQueue
<AuthorizationRequest
, AuthorizationRequest
, unknown
[][]>>
Inherited from
Defined in
api/entities/Portfolio/index.ts:236
toHuman
▸ toHuman(): HumanReadable
Return the Portfolio ID and owner DID
Returns
HumanReadable
Inherited from
Defined in
api/entities/Portfolio/index.ts:413
generateUuid
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Name |
---|
|
Parameters
Name | Type |
---|---|
|
|
Returns
string
Inherited from
Defined in
unserialize
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Name |
---|
|
Parameters
Name | Type | Description |
---|---|---|
|
| UUID to unserialize |
Returns
Identifiers
Inherited from
Defined in
Last updated