Class: DefaultPortfolio
api/entities/DefaultPortfolio.DefaultPortfolio
Represents the default Portfolio for an Identity
Hierarchy
-
↳
DefaultPortfolio
Properties
owner
• owner: Identity
Identity of the Portfolio's owner
Inherited from
Defined in
api/entities/Portfolio/index.ts:79
uuid
• uuid: string
Inherited from
Defined in
Methods
exists
▸ exists(): Promise
<boolean
>
Determine whether this Portfolio exists on chain
Returns
Promise
<boolean
>
Overrides
Defined in
api/entities/DefaultPortfolio.ts:22
getAssetBalances
▸ getAssetBalances(args?
): Promise
<PortfolioBalance
[]>
Retrieve the balances of all fungible assets in this Portfolio
Parameters
Name | Type | Description |
---|---|---|
args? | Object | - |
args.assets | (string | FungibleAsset )[] | array of FungibleAssets (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:145
getCollections
▸ getCollections(args?
): Promise
<PortfolioCollection
[]>
Retrieve the NFTs held in this portfolio
Parameters
Name | Type |
---|---|
args? | Object |
args.collections | (string | NftCollection )[] |
Returns
Promise
<PortfolioCollection
[]>
Inherited from
Defined in
api/entities/Portfolio/index.ts:224
getCustodian
▸ getCustodian(): Promise
<Identity
>
Retrieve the custodian Identity of this Portfolio
Returns
Promise
<Identity
>
Note
if no custodian is set, the owner Identity is returned
Inherited from
Defined in
api/entities/Portfolio/index.ts:365
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<HistoricSettlement
[]>
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
Parameters
Name | Type | Description |
---|---|---|
filters | Object | - |
filters.account? | string | Account involved in the settlement |
filters.ticker? | string | ticker involved in the transaction |
Returns
Promise
<HistoricSettlement
[]>
Note
uses the middlewareV2
Inherited from
Portfolio.getTransactionHistory
Defined in
api/entities/Portfolio/index.ts:407
isCustodiedBy
▸ isCustodiedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio custodian
Parameters
Name | Type | Description |
---|---|---|
args? | Object | - |
args.identity | string | Identity | optional, defaults to the signing Identity |
Returns
Promise
<boolean
>
Inherited from
Defined in
api/entities/Portfolio/index.ts:129
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
entity | Entity <unknown , unknown > |
Returns
boolean
Inherited from
Defined in
isOwnedBy
▸ isOwnedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio owner