getIApp
This method allows the user to retrieve all iApps for a given owner or filter by creation timestamp.
Results are ordered by creationTimestamp
desc.
TIP
An iApp is a confidential computing application that runs in secure TEE environments. The method returns iApp metadata including name, address, owner, and creation timestamp.
Usage
const listIApps = await iapp.getIApp({
owner: '0xa0c15e...',
createdAfterTimestamp: 1640995200,
page: 1,
pageSize: 20,
});
Parameters
import { type GetIAppParams } from '@mage-sombre/iapp';
iapp Optional
Type: AddressOrENS
Returns the iApp associated with this address.
Returns an empty array if the iApp is not found.
const oneIApp = await iapp.getIApp({
iapp: '0x456def....',
});
owner Optional
Type: AddressOrENS
Returns all iApps owned by this address.
const iAppsByOwner = await iapp.getIApp({
owner: '0xa0c15e...',
});
createdAfterTimestamp Optional
Type: number
Returns all iApps created after this timestamp (Unix timestamp in seconds).
const recentIApps = await iapp.getIApp({
createdAfterTimestamp: 1640995200,
});
page Optional
Type: number
Default: 0
Specifies the page number of the result set to return. Pages are zero-based indexed.
const iAppsPage = await iapp.getIApp({
page: 1,
pageSize: 20,
});
pageSize Optional
Type: number
Default: 20
Specifies the number of records to include in each page of the result set.
const iAppsPage = await iapp.getIApp({
page: 1,
pageSize: 50,
});
Return Value
import { type IApp } from '@mage-sombre/iapp';
The method returns an array of IApp
objects containing the following fields:
name
string
The name of the iApp.
address
Address
The Ethereum address of the iApp.
owner
Address
The Ethereum address of the iApp owner.
creationTimestamp
number
The Unix timestamp (in seconds) when the iApp was created.
multiaddr
string
(optional)
The multiaddress for P2P communication with the iApp.