api_entities_Portfolio.Portfolio
Last updated
Was this helpful?
Last updated
Was this helpful?
/ / / Portfolio
.Portfolio
Represents a base Portfolio for a specific Identity in the Polymesh blockchain
<, HumanReadable
>
↳ Portfolio
↳↳
↳↳
Identity of the Portfolio's owner
Defined in
• uuid: string
Inherited from
Defined in
â–¸ Abstract
exists(): Promise
<boolean
>
Determine whether this Entity exists on chain
Returns
Promise
<boolean
>
Inherited from
Defined in
Retrieve the balances of all Assets in this Portfolio
Parameters
args?
Object
-
args.assets
array of Assets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed)
Returns
Defined in
Retrieve the custodian Identity of this Portfolio
note
if no custodian is set, the owner Identity is returned
Returns
Defined in
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
note
supports pagination
note
uses the middleware
Parameters
filters
Object
-
filters.account?
string
Account involved in the settlement
filters.size?
BigNumber
page size
filters.start?
BigNumber
page offset
filters.ticker?
string
ticker involved in the transaction
Returns
Defined in
â–¸ isCustodiedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio custodian
Parameters
args?
Object
-
args.identity
optional, defaults to the signing Identity
Returns
Promise
<boolean
>
Defined in
â–¸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
entity
Returns
boolean
Inherited from
Defined in
â–¸ isOwnedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio owner
Parameters
args?
Object
-
args.identity
defaults to the signing Identity
Returns
Promise
<boolean
>
Defined in
â–¸ 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
Parameters
args
opts?
Returns
Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Defined in
â–¸ quitCustody(opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Returns the custody of the portfolio to the portfolio owner unilaterally
note
required role:
Portfolio Custodian
Parameters
opts?
Returns
Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
Defined in
Send an invitation to an Identity to assign it as custodian for this Portfolio
note
required role:
Portfolio Custodian
Parameters
args
opts?
Returns
Defined in
â–¸ toHuman(): HumanReadable
Return the Portfolio ID and owner DID
Returns
HumanReadable
Overrides
Defined in
â–¸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Identifiers
Parameters
identifiers
Identifiers
Returns
string
Inherited from
Defined in
â–¸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Identifiers
Parameters
serialized
string
UUID to unserialize
Returns
Identifiers
Inherited from
Defined in
• owner:
.
.
â–¸ getAssetBalances(args?
): Promise
<[]>
(string
| )[]
Promise
<[]>
â–¸ getCustodian(): Promise
<>
Promise
<>
â–¸ getTransactionHistory(filters?
): Promise
<<>>
Promise
<<>>
string
|
<unknown
, unknown
>
.
string
|
note
this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it
note
this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it
â–¸ setCustodian(args
, opts?
): Promise
<TransactionQueue
<, , unknown
[][]>>
note
this will create an which has to be accepted by the targetIdentity
. An or can fetch its pending Authorization Requests by calling . Also, an Account or Identity can directly fetch the details of an Authorization Request by calling
note
this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it
Promise
<TransactionQueue
<, , unknown
[][]>>
.
.
.