@cruxpay/js-sdk
Version:
CruxPay Javascript SDK
52 lines (51 loc) • 2.12 kB
TypeScript
export declare const DEFAULT_CRUX_NAMESPACE = "crux";
export declare const DEFAULT_BLOCKSTACK_NAMESPACE = "id";
export declare const CRUX_DOMAIN_SUFFIX = "_crux";
export interface InputIDComponents {
domain: string;
subdomain: string;
}
export interface GenericIDComponents {
domain: string;
subdomain: string;
namespace: string;
}
export declare const validateSubdomain: (subDomain: string) => void;
export declare class CruxId {
static fromString: (stringRepresentation: string) => CruxId;
components: GenericIDComponents;
constructor(inputComponents: InputIDComponents);
toString: () => string;
}
export declare class BlockstackId {
static fromString: (stringRepresentation: string) => BlockstackId;
components: GenericIDComponents;
constructor(inputComponents: InputIDComponents);
toString: () => string;
}
export interface GenericDomainComponents {
domain: string;
namespace: string;
}
export declare class CruxDomainId {
static fromString: (stringRepresentation: string) => CruxDomainId;
components: GenericDomainComponents;
constructor(domain: string);
toString: () => string;
}
export declare class BlockstackDomainId {
static fromString: (stringRepresentation: string) => BlockstackDomainId;
components: GenericDomainComponents;
constructor(domain: string);
toString: () => string;
}
export declare class IdTranslator {
static cruxDomainToBlockstackDomain: (cruxDomain: CruxDomainId) => BlockstackDomainId;
static blockstackDomainToCruxDomain: (blockstackDomain: BlockstackDomainId) => CruxDomainId;
static cruxIdToBlockstackId: (cruxId: CruxId) => BlockstackId;
static blockstackIdToCruxId: (blockstackId: BlockstackId) => CruxId;
static blockstackDomainStringToCruxDomainString: (domainString: string) => string;
static cruxDomainStringToBlockstackDomainString: (cruxDomainString: string) => string;
static cruxToBlockstack: (crux: CruxId | CruxDomainId) => BlockstackId | BlockstackDomainId;
static blockstackToCrux: (crux: BlockstackId | BlockstackDomainId) => CruxId | CruxDomainId;
}