> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Chainlink

> Oracles, VRF, and CCIP with Chainlink

<Warning>
  **Looking for Contributors!** This Skill needs an implementation.

  Contributing a Skill involves:

  1. Writing a reference implementation with full functionality
  2. Adding comprehensive tests
  3. Writing documentation with usage examples

  See the [ethers-provider Skill](https://github.com/evmts/voltaire/tree/main/examples/ethers-provider) for an example of a complete Skill implementation.

  Interested? Open an issue or PR at [github.com/evmts/voltaire](https://github.com/evmts/voltaire).
</Warning>

<Info>
  **Skill** — Copyable reference implementation. Use as-is or customize. See [Skills Philosophy](/concepts/skills).
</Info>

Integrate Chainlink price feeds, VRF randomness, and CCIP cross-chain messaging.

## Planned Implementation

### Price Feeds

```typescript theme={null}
import { Chainlink } from './Chainlink.js';

const chainlink = Chainlink({ provider });

// Get latest price
const ethUsd = await chainlink.getLatestPrice(ETH_USD_FEED);
console.log('ETH/USD:', ethUsd.answer / 10n ** 8n);

// Get historical round
const round = await chainlink.getRoundData(ETH_USD_FEED, roundId);
```

### VRF (Verifiable Random Function)

```typescript theme={null}
// Request randomness
const requestId = await chainlink.requestRandomWords({
  keyHash: VRF_KEY_HASH,
  subId: subscriptionId,
  minimumRequestConfirmations: 3,
  callbackGasLimit: 100000,
  numWords: 1,
  signer,
});

// Randomness delivered to your contract's fulfillRandomWords()
```

### CCIP (Cross-Chain)

```typescript theme={null}
// Send cross-chain message
await chainlink.sendCcipMessage({
  destinationChainSelector: ARBITRUM_SELECTOR,
  receiver: receiverContract,
  data: encodedMessage,
  tokenAmounts: [], // Optional token transfer
  feeToken: LINK_ADDRESS,
  signer,
});

// Get message status
const status = await chainlink.getMessageStatus(messageId);
```

## Resources

* [Chainlink Documentation](https://docs.chain.link/)
* [Data Feeds](https://docs.chain.link/data-feeds)
* [VRF](https://docs.chain.link/vrf)
* [CCIP](https://docs.chain.link/ccip)

## Related

* [layerzero](/skills/layerzero) — Alternative cross-chain
