1 | import { ECPair } from 'bitcoinjs-lib';
|
2 | /**
|
3 | * @ignore
|
4 | */
|
5 | export declare const BLOCKSTACK_HANDLER = "blockstack";
|
6 | /**
|
7 | * Time
|
8 | * @private
|
9 | * @ignore
|
10 | */
|
11 | export declare function nextYear(): Date;
|
12 | /**
|
13 | * Time
|
14 | * @private
|
15 | * @ignore
|
16 | */
|
17 | export declare function nextMonth(): Date;
|
18 | /**
|
19 | * Time
|
20 | * @private
|
21 | * @ignore
|
22 | */
|
23 | export declare function nextHour(): Date;
|
24 | /**
|
25 | * Query Strings
|
26 | * @private
|
27 | * @ignore
|
28 | */
|
29 | export declare function updateQueryStringParameter(uri: string, key: string, value: string): string;
|
30 | /**
|
31 | * Versioning
|
32 | * @param {string} v1 - the left half of the version inequality
|
33 | * @param {string} v2 - right half of the version inequality
|
34 | * @returns {bool} iff v1 >= v2
|
35 | * @private
|
36 | * @ignore
|
37 | */
|
38 | export declare function isLaterVersion(v1: string, v2: string): boolean;
|
39 | /**
|
40 | * Time
|
41 | * @private
|
42 | * @ignore
|
43 | */
|
44 | export declare function hexStringToECPair(skHex: string): ECPair.ECPairInterface;
|
45 | /**
|
46 | *
|
47 | * @ignore
|
48 | */
|
49 | export declare function ecPairToHexString(secretKey: ECPair.ECPairInterface): string;
|
50 | /**
|
51 | * Time
|
52 | * @private
|
53 | * @ignore
|
54 | */
|
55 | export declare function ecPairToAddress(keyPair: ECPair.ECPairInterface): string;
|
56 | /**
|
57 | * UUIDs
|
58 | * @private
|
59 | * @ignore
|
60 | */
|
61 | export declare function makeUUID4(): string;
|
62 | /**
|
63 | * Checks if both urls pass the same origin check & are absolute
|
64 | * @param {[type]} uri1 first uri to check
|
65 | * @param {[type]} uri2 second uri to check
|
66 | * @return {Boolean} true if they pass the same origin check
|
67 | * @private
|
68 | * @ignore
|
69 | */
|
70 | export declare function isSameOriginAbsoluteUrl(uri1: string, uri2: string): boolean;
|
71 | interface GetGlobalObjectOptions {
|
72 | /**
|
73 | * Throw an error if the object is not found.
|
74 | * @default false
|
75 | */
|
76 | throwIfUnavailable?: boolean;
|
77 | /**
|
78 | * Additional information to include in an error if thrown.
|
79 | */
|
80 | usageDesc?: string;
|
81 | /**
|
82 | * If the object is not found, return an new empty object instead of undefined.
|
83 | * Requires [[throwIfUnavailable]] to be falsey.
|
84 | * @default false
|
85 | */
|
86 | returnEmptyObject?: boolean;
|
87 | }
|
88 | /**
|
89 | * Returns an object from the global scope (`Window` or `WorkerGlobalScope`) if it
|
90 | * is available within the currently executing environment.
|
91 | * When executing within the Node.js runtime these APIs are unavailable and will be
|
92 | * `undefined` unless the API is provided via polyfill.
|
93 | * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/self
|
94 | * @ignore
|
95 | */
|
96 | export declare function getGlobalObject<K extends keyof Window>(name: K, { throwIfUnavailable, usageDesc, returnEmptyObject }?: GetGlobalObjectOptions): Window[K];
|
97 | /**
|
98 | * Returns a specified subset of objects from the global scope (`Window` or `WorkerGlobalScope`)
|
99 | * if they are available within the currently executing environment.
|
100 | * When executing within the Node.js runtime these APIs are unavailable will be `undefined`
|
101 | * unless the API is provided via polyfill.
|
102 | * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/self
|
103 | * @ignore
|
104 | */
|
105 | export declare function getGlobalObjects<K extends keyof Window>(names: K[], { throwIfUnavailable, usageDesc, returnEmptyObject }?: GetGlobalObjectOptions): Pick<Window, K>;
|
106 | export {};
|