Passport

v0.1.0

Your cryptographic identity — self-owned, portable, and impossible to revoke by any platform

Go

bash
go get github.com/humandotdev/sdk-go

Create

Create a new passport

ParameterDescription
requestPassport creation parameters
go
const passport = await client.passport.create({
type: 'Individual',
email: 'user@example.com'
});

Returns: Created passport

Errors

ValidationError — If request is invalid

ConflictError — If passport already exists (duplicate email)

Get

Get passport by ID

ParameterDescription
idPassport ID
go
const passport = await client.passport.get('pass_123');

Returns: Passport details

Errors

NotFoundError — If passport doesn't exist

AuthorizationError — If not authorized to view passport

Update

Update passport

ParameterDescription
idPassport ID
updatesFields to update
go
const updated = await client.passport.update('pass_123', {
profile: {
display_name: 'Jane Doe'
}
});

Returns: Updated passport

Errors

NotFoundError — If passport doesn't exist

AuthorizationError — If not authorized to update passport

ValidationError — If updates are invalid

Delete

Delete passport Warning: This is a destructive operation. The passport and all associated data will be permanently deleted.

ParameterDescription
idPassport ID
go
await client.passport.delete('pass_123');

Errors

NotFoundError — If passport doesn't exist

AuthorizationError — If not authorized to delete passport

List

List passports with pagination

ParameterDescription
filtersOptional filters and pagination
go
// First page
const page1 = await client.passport.list({ limit: 20 });
// Next page
const page2 = await client.passport.list({
limit: 20,
cursor: page1.next_cursor
});
// With filters
const individuals = await client.passport.list({
type: 'Individual',
status: 'active'
});

Returns: Paginated list of passports

Verify

Verify passport proof Verifies a cryptographic proof of passport ownership.

ParameterDescription
proofPassport proof to verify
go
const result = await client.passport.verify({
passport_id: 'pass_123',
signature: '0x...',
data: { message: 'Hello' },
timestamp: '2026-01-29T10:30:00Z'
});
if (result.valid) {
console.log('Proof valid for', result.passport_id);
}

Returns: Verification result

Errors

ValidationError — If proof format is invalid

Types

go
interface Passport {
/** Unique passport ID (branded PassportId) */
passport_id: PassportId;
/** Passport type */
type: PassportType;
/** Email address (required for Individual) */
email?: string;
/** Organization name (required for Organization) */
organization_name?: string;
/** Agent name (required for AgentFuture) */
agent_name?: string;
/** Decentralized Identifier — the passport's cryptographic fingerprint. Format depends on passport type: - Individual: did:human:{identifier} - Organization: did:org:{identifier} - AgentFuture: did:agent:{identifier} Always present on active passports. Use the specific branded types (HumanDid, OrgId, AgentDid) when you know the passport type. */
did: HumanDid | OrgId | AgentDid;
/** Organization namespace slug (only for Organization passports). This is the human-readable namespace used in agent URIs: agent://org/{slug}/{agentName}@{version} Claimed at org creation, globally unique. */
slug?: OrgSlug;
/** Passport status */
status: PassportStatus;
/** User profile data */
profile?: PassportProfile;
/** When passport was verified */
verified_at?: Timestamp;
}
interface PassportProfile {
/** Display name */
display_name?: string;
/** Avatar URL */
avatar_url?: string;
/** Bio/description */
bio?: string;
/** Location */
location?: string;
/** Website URL */
website_url?: string;
}
interface CreatePassportRequest {
/** Passport type */
type: PassportType;
/** Email address (required for Individual) */
email?: string;
/** Organization name (required for Organization) */
organization_name?: string;
/** Agent name (required for AgentFuture) */
agent_name?: string;
/** Optional profile data */
profile?: Partial<PassportProfile>;
/** Optional metadata */
metadata?: Record<string, string | number | boolean>;
}
interface UpdatePassportRequest {
/** Update email */
email?: string;
/** Update organization name */
organization_name?: string;
/** Update agent name */
agent_name?: string;
/** Update profile */
profile?: Partial<PassportProfile>;
/** Update status */
status?: PassportStatus;
/** Update metadata */
metadata?: Record<string, string | number | boolean>;
}
interface PassportListFilters {
/** Filter by passport type */
type?: PassportType;
/** Filter by status */
status?: PassportStatus;
/** Filter by email (exact match) */
email?: string;
/** Search by display name (partial match) */
display_name?: string;
}
interface PassportProof {
/** Passport ID being verified */
passport_id: PassportId;
/** Signature data */
signature: string;
/** Signed data payload */
data: unknown;
/** Timestamp of signature */
timestamp: Timestamp;
}
interface PassportVerificationResult {
/** Whether proof is valid */
valid: boolean;
/** Passport ID if valid */
passport_id?: PassportId;
/** Reason if invalid */
reason?: string;
/** When verification was performed */
verified_at: Timestamp;
}