hive-react-kit 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/comments/AddCommentInput.d.ts +7 -2
- package/dist/components/composer/ImageUploader.d.ts +5 -0
- package/dist/components/composer/VideoUploader.d.ts +3 -0
- package/dist/index.cjs.js +100 -100
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +8477 -8409
- package/dist/services/hiveImageUpload.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signed upload to https://images.hive.blog via a caller-provided signer.
|
|
3
|
+
*
|
|
4
|
+
* The consumer passes a `signMessage` callback that wraps their auth provider
|
|
5
|
+
* (Aioha, Hive Keychain, a custom WIF signer, etc.). The callback must sign
|
|
6
|
+
* the given message with the user's posting key and return the signature string.
|
|
7
|
+
*
|
|
8
|
+
* The message format is the JSON-stringified Node Buffer shape
|
|
9
|
+
* (`{"type":"Buffer","data":[...]}`) of `Buffer.concat(["ImageSigningChallenge", imageBytes])`.
|
|
10
|
+
* Hive Keychain reconstructs this shape server-side before hashing, which matches
|
|
11
|
+
* what images.hive.blog expects.
|
|
12
|
+
*/
|
|
13
|
+
export type PostingSignMessageFn = (message: string) => Promise<string>;
|
|
14
|
+
export declare function uploadToHiveImages(signMessage: PostingSignMessageFn, username: string, file: Blob, filename?: string): Promise<string>;
|