증명 생성

특정 자격 증명 및 스키마 하에 새로운 증명을 생성합니다. 이 명령어는 승인된 서명자가 검증된 데이터를 포함하고 정의된 만료 시간을 가진 증명을 생성할 수 있도록 합니다.

매개변수

매개변수타입설명
payerSigner트랜잭션 비용을 지불할 계정
authoritySigner자격 증명의 승인된 서명자
credentialPublicKey | Pda스키마와 연결된 자격 증명 계정
schemaPublicKey | Pda증명 구조를 정의하는 스키마 계정
attestationPublicKey | Pda생성할 증명 계정
systemProgramPublicKey | PdaSystem Program 계정 (기본값: '11111111111111111111111111111111')
nonceAddress증명의 고유 식별자
dataReadonlyUint8Array스키마를 준수해야 하는 증명 데이터
expirynumber | bigint증명의 만료 타임스탬프

반환값

트랜잭션을 구성하고 전송하는 데 사용할 수 있는 TransactionBuilder을 반환합니다.

예제

import { getCreateAttestationInstruction } from "sas-lib";
const transaction = getCreateAttestationInstruction({
payer: payerSigner,
authority: authoritySigner,
credential: credentialPublicKey,
schema: schemaPublicKey,
attestation: attestationPublicKey,
systemProgram: systemProgramPublicKey,
nonce: noncePublicKey,
data: attestationData,
expiry: expiryTimestamp
});
// Send the transaction
await transaction.sendAndConfirm();

중요 사항

  • 자격 증명의 승인된 서명자만 증명을 생성할 수 있습니다
  • 권한 보유자는 트랜잭션의 서명자여야 합니다
  • 지불자는 트랜잭션의 서명자여야 합니다
  • 증명 계정은 쓰기 가능해야 합니다
  • 자격 증명 및 스키마 계정은 읽기 가능해야 합니다
  • 이 작업은 rent 면제 계산을 위해 System Program이 필요합니다
  • 스키마는 일시 중지 상태가 아니어야 합니다
  • 데이터는 스키마의 구조 및 유효성 검사 규칙을 준수해야 합니다
  • nonce는 각 증명마다 고유해야 합니다
  • 만료 타임스탬프는 미래 시점이어야 합니다
  • 증명은 만료 타임스탬프 이후에는 유효하지 않습니다
  • 자격 증명은 스키마와 연결되어 있어야 합니다

Is this page helpful?

목차

페이지 편집

관리자

© 2026 솔라나 재단.
모든 권리 보유.
연결하기