Splice.Api.Token.HoldingV2
Types and interfaces for retrieving an investor’s holdings.
Interfaces
interface Holding
Holding interface.
viewtype HoldingView
Choice Archive
Controller: Signatories of implementing template
Returns: ()
(no fields)
Data Types
data Account
A data type to represent an on-chain managed account,
For example a traditional accounting structure, or simply a delegation to a provider to perform some services.
Field
Type
Description
owner
The party that owns the account, which MUST be set for regular accounts.
Noneis reserved for special accounts managed by the instrument admin. Special accounts are for example used to represent the source account for mints and the target account for burns.provider
The provider of the account. Account providers MUST have visibility on all asset movements and holdings. Asset implementations are free to determine how authorization for asset movements is split between providers and owners. For example, providers MAY have to authorize all movements requested by the owner.
id
Account number or similar. Use the empty string ("") as the default account identifier.
instance GetField "account" HoldingView Account
instance GetField "id" Account Text
instance GetField "owner" Account (Optional Party)
instance GetField "provider" Account (Optional Party)
instance SetField "account" HoldingView Account
instance SetField "id" Account Text
data HoldingView
View for
Holding.
Field
Type
Description
account
Account in which the holding is held.
instrumentId
Instrument being held.
amount
Size of the holding.
lock
Lock on the holding. Registries SHOULD allow holdings with expired locks as inputs to transfers to enable a combined unlocking + use choice.
meta
Metadata
Metadata.
instance Eq HoldingView
instance Show HoldingView
instance HasFromAnyView Holding HoldingView
instance HasInterfaceView Holding HoldingView
instance GetField "account" HoldingView Account
instance GetField "amount" HoldingView Decimal
instance GetField "instrumentId" HoldingView InstrumentId
instance GetField "lock" HoldingView (Optional Lock)
instance GetField "meta" HoldingView Metadata
instance SetField "account" HoldingView Account
instance SetField "amount" HoldingView Decimal
instance SetField "instrumentId" HoldingView InstrumentId
instance SetField "lock" HoldingView (Optional Lock)
instance SetField "meta" HoldingView Metadata
data InstrumentId
A globally unique identifier for instruments.
instance Eq InstrumentId
instance Ord InstrumentId
instance Show InstrumentId
instance GetField "admin" InstrumentId Party
instance GetField "id" InstrumentId Text
instance GetField "instrumentId" HoldingView InstrumentId
instance SetField "admin" InstrumentId Party
instance SetField "id" InstrumentId Text
instance SetField "instrumentId" HoldingView InstrumentId
data Lock
Details of a lock.
Field
Type
Description
holders
[Party]
Unique list of parties which are locking the contract. (Represented as a list, as that has the better JSON encoding.)
expiresAt
Absolute, inclusive deadline as of which the lock expires.
expiresAfter
Duration after which the created lock expires. Measured relative to the ledger time that the locked holding contract was created. If both
expiresAtandexpiresAfterare set, the lock expires at the earlier of the two times.context
Short, human-readable description of the context of the lock. Used by wallets to enable users to understand the reason for the lock. Note that the visibility of the content in this field might be wider than the visibility of the contracts in the context. You should thus carefully decide what information is safe to put in the lock context.
instance GetField "context" Lock (Optional Text)
instance GetField "expiresAfter" Lock (Optional RelTime)
instance GetField "expiresAt" Lock (Optional Time)
instance GetField "holders" Lock [Party]
instance GetField "lock" HoldingView (Optional Lock)
instance SetField "context" Lock (Optional Text)
instance SetField "expiresAfter" Lock (Optional RelTime)
instance SetField "expiresAt" Lock (Optional Time)
instance SetField "holders" Lock [Party]
instance SetField "lock" HoldingView (Optional Lock)
Comments