oc · docs
documentation

@orangecheck/sdk


@orangecheck/sdk / publishAttestation

Function: publishAttestation()

function publishAttestation(options: PublishAttestationOptions): Promise<PublishResult>;

Defined in: attestation.ts:159

Publish an attestation to Nostr relays

Uses NIP-07 if available, falls back to ephemeral key for demo

Parameters

ParameterTypeDescription
optionsPublishAttestationOptionsPublishing options

Returns

Promise&lt;PublishResult>

Object with successful and failed relay URLs

Throws

If signing fails

Example

const result = await publishAttestation({
  envelope,
  npub: 'npub1...',
  relays: ['wss://relay.damus.io'],
});
console.log('Published to:', result.success);