ラムポートのアンラップ

ラムポートのアンラップとは何ですか?

UnwrapLamports は、ネイティブ(ラップされたSOL)token accountからSOLをlamportとしてデスティネーションアカウントに移動します。残高全体または特定の量をアンラップでき、token accountは開いたままになります。

これはラップされたSOLアカウントを閉じるよりも柔軟です:部分的なアンラップにより、後で使用するためにアカウントに資金を残しながら一部のSOLを引き出すことができます。

ソースリファレンス

項目説明ソース
UnwrapLamportsinstructions(識別子45)。ソース
process_unwrap_lamportsプロセッサロジック。ソース

アカウント

アカウント説明
source書き込み可能。アンラップするネイティブ(ラップされたSOL)token account。
destination書き込み可能。アンラップされたlamportを受け取ります。
authorityアカウントのオーナーまたはデリゲート(またはマルチシグ署名者)。

ソースはネイティブtoken accountである必要があります。それ以外のtoken accountは NonNativeNotSupported を返します。デリゲートは委任された量までアンラップできます。

ラムポートをアンラップする方法

amount を省略すると残高全体をアンラップし、設定するとlamportの特定の数をアンラップします。この例では設定済みの @solana/kit クライアントを使用しています — クライアントのセットアップについては トークンの転送 を参照してください。

Unwrap wrapped SOL (Kit)
import { getUnwrapLamportsInstruction } from "@solana-program/token";
// source: the native (wrapped SOL) token account to unwrap.
// destination: address that receives the unwrapped lamports.
// authority: a TransactionSigner (the account owner or a delegate).
// Unwrap a specific number of lamports.
const unwrapSome = getUnwrapLamportsInstruction({
source,
destination,
authority,
amount: 500_000_000n
});
// Or omit `amount` to unwrap the entire balance.
const unwrapAll = getUnwrapLamportsInstruction({
source,
destination,
authority
});
// Send whichever instruction you need.
await client.sendTransaction([unwrapSome]);

マルチシグ認証の場合は、multiSigners を使用して共同署名者を渡します。

Is this page helpful?

目次

ページを編集
© 2026 Solana Foundation. 無断転載を禁じます。