The client to use. AvalancheCoreClient
The current timestamp. GetTimestampReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getTimestamp } from '@avalanche-sdk/client/methods/pChain'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const timestamp = await getTimestamp(client)
Get the current timestamp of the P-Chain.