Class: DefaultPortfolio
Defined in: src/api/entities/DefaultPortfolio.ts:10
Represents the default Portfolio for an Identity
Extends
Properties
owner
owner:
Identity
Defined in: src/api/entities/Portfolio/index.ts:76
Identity of the Portfolio's owner
Inherited from
uuid
uuid:
string
Defined in: src/api/entities/Entity.ts:46
Inherited from
Methods
exists()
exists():
Promise<boolean>
Defined in: src/api/entities/DefaultPortfolio.ts:21
Determine whether this Portfolio exists on chain
Returns
Promise<boolean>
Overrides
getAssetBalances()
getAssetBalances(
args?:object):Promise<PortfolioBalance[]>
Defined in: src/api/entities/Portfolio/index.ts:138
Retrieve the balances of all fungible assets in this Portfolio
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
| ( | array of FungibleAssets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed) |
Returns
Promise<PortfolioBalance[]>
Inherited from
getCollections()
getCollections(
args?:object):Promise<PortfolioCollection[]>
Defined in: src/api/entities/Portfolio/index.ts:217
Retrieve the NFTs held in this portfolio
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
| ( | array of NftCollection (or tickers) for which to fetch holdings (optional, all holdings are retrieved if not passed) |
Returns
Promise<PortfolioCollection[]>
Inherited from
getCustodian()
getCustodian():
Promise<Identity>
Defined in: src/api/entities/Portfolio/index.ts:328
Retrieve the custodian Identity of this Portfolio
Returns
Promise<Identity>
Note
if no custodian is set, the owner Identity is returned
Inherited from
getTransactionHistory()
getTransactionHistory(
filters?:object):Promise<HistoricSettlement[]>
Defined in: src/api/entities/Portfolio/index.ts:370
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
|
| Account involved in the settlement |
|
| ‐ |
|
| ticker involved in the transaction |
Returns
Promise<HistoricSettlement[]>
Note
uses the middlewareV2
Inherited from
Portfolio.getTransactionHistory
isCustodiedBy()
isCustodiedBy(
args?:object):Promise<boolean>
Defined in: src/api/entities/Portfolio/index.ts:122
Return whether an Identity is the Portfolio custodian
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
|
| optional, defaults to the signing Identity |
Returns
Promise<boolean>
Inherited from
isEqual()
isEqual(
entity:Entity<unknown,unknown>):boolean
Defined in: src/api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
boolean
Inherited from
isOwnedBy()
isOwnedBy(
args?:object):Promise<boolean>
Defined in: src/api/entities/Portfolio/index.ts:109
Return whether an Identity is the Portfolio owner
Parameters
| Parameter | Type | Description |
|---|---|---|
| { | ‐ |
|
| defaults to the signing Identity |
Returns
Promise<boolean>
Inherited from
moveFunds()
moveFunds(
args:MoveFundsParams,opts?:ProcedureOpts):Promise<GenericPolymeshTransaction<void,void>>
Defined in: src/api/entities/Portfolio/index.ts:313
Moves funds from this Portfolio to another one owned by the same Identity
Parameters
| Parameter | Type |
|---|---|
| |
|
Returns
Promise<GenericPolymeshTransaction<void, void>>