@civic/sol-did-client
Version:
A powerful DID-method on Solana
47 lines (46 loc) • 1.95 kB
TypeScript
import { RawDidSolDataAccount, Service, RawVerificationMethod, VerificationMethodType, BitwiseVerificationMethodFlag, AddVerificationMethodParams } from './types';
import { BN } from '@coral-xyz/anchor';
import { ExtendedCluster } from './connection';
import { DidSolIdentifier } from '../DidSolIdentifier';
/**
* A class representing the on-chain data for a SOL DID
*/
export declare class DidSolDataAccount {
private _rawDidDataAccount;
private _cluster;
private readonly _identifier;
private constructor();
static from(rawDidDataAccount: RawDidSolDataAccount, cluster: ExtendedCluster): DidSolDataAccount;
static generative(identifier: DidSolIdentifier): DidSolDataAccount;
get identifier(): DidSolIdentifier;
get raw(): RawDidSolDataAccount;
get version(): number;
get bump(): number;
get nonce(): BN;
get verificationMethods(): VerificationMethod[];
get services(): Service[];
get controllers(): string[];
}
export declare class VerificationMethod {
private _rawVerificationMethod;
private constructor();
get raw(): RawVerificationMethod;
static from(rawVerificationMethod: RawVerificationMethod): VerificationMethod;
toParams(): AddVerificationMethodParams;
get fragment(): string;
get keyData(): Buffer;
get methodType(): VerificationMethodType;
get flags(): VerificationMethodFlags;
}
export declare class VerificationMethodFlags {
private _flags;
constructor(_flags: number);
static none(): VerificationMethodFlags;
static of(flags: number): VerificationMethodFlags;
get raw(): number;
static ofArray(flags: BitwiseVerificationMethodFlag[]): VerificationMethodFlags;
get array(): BitwiseVerificationMethodFlag[];
has(flag: BitwiseVerificationMethodFlag): boolean;
set(flag: BitwiseVerificationMethodFlag): VerificationMethodFlags;
clear(flag: BitwiseVerificationMethodFlag): VerificationMethodFlags;
}