@cruxpay/js-sdk
Version:
CruxPay Javascript SDK
79 lines (78 loc) • 3.09 kB
TypeScript
import { IClientAssetMapping, IGlobalAsset, IGlobalAssetList } from "../../core/entities/crux-domain";
import { CruxDomainId, CruxId, IdTranslator } from "../../packages/identity-utils";
import { IAddress } from "../entities/crux-user";
import { ICruxBlockstackInfrastructure } from "../interfaces";
import { INameServiceConfigurationOverrides } from "./crux-domain";
export declare class Validations {
static validateSubdomainString: (subDomainString: string) => void;
static validateRegex: (string: string, regex: RegExp) => void;
static validateURL: (url: string) => void;
static validateAssetId: (assetId: string) => void;
static validateAssetIdAgainstAssetList: (assetId: string, assetList: IGlobalAssetList) => void;
static validateGlobalAsset: (assetObject: IGlobalAsset) => void;
static validateAssetList: (assetList: IGlobalAssetList) => void;
static validateAssetMapping: (assetMapping: IClientAssetMapping, assetList: IGlobalAssetList) => void;
static validateAssetGroup: (assetGroup: string) => void;
static validateAssetGroups: (assetGroups: string[]) => void;
static validateNameServiceConfig: (nameServiceConfig: INameServiceConfigurationOverrides) => void;
static validateAddressObj: (addressObject: IAddress) => void;
}
export declare const CruxSpec: {
blockstack: {
new (): {};
infrastructure: ICruxBlockstackInfrastructure;
configSubdomain: string;
getDomainConfigFileName: (cruxDomainId: CruxDomainId) => string;
getConfigCruxId: (cruxDomainId: CruxDomainId) => CruxId;
getCruxPayFilename: (cruxDomainId: CruxDomainId) => string;
getCruxUserConfigFileName: (cruxDomainId: CruxDomainId) => string;
};
globalAssetList: ({
"symbol": string;
"name": string;
"decimals": number;
"assetIdentifierName": string;
"assetIdentifierValue": string;
"parentAssetId": string;
"assetType": string;
"assetId": string;
} | {
"symbol": string;
"name": string;
"decimals": null;
"assetIdentifierName": string;
"assetIdentifierValue": number;
"parentAssetId": null;
"assetType": string;
"assetId": string;
} | {
"symbol": string;
"name": string;
"decimals": null;
"assetIdentifierName": null;
"assetIdentifierValue": null;
"parentAssetId": null;
"assetType": null;
"assetId": string;
} | {
"assetId": string;
"symbol": string;
"name": string;
"assetType": null;
"decimals": number;
"assetIdentifierName": null;
"assetIdentifierValue": null;
"parentAssetId": null;
} | {
"assetId": string;
"symbol": string;
"name": string;
"assetType": string;
"decimals": number;
"assetIdentifierName": string;
"assetIdentifierValue": string;
"parentAssetId": null;
})[];
idTranslator: typeof IdTranslator;
validations: typeof Validations;
};