deso-protocol
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "deso-protocol", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"type": "commonjs", | ||
"dependencies": { | ||
"deso-protocol-types": "^0.2.0", | ||
"deso-protocol-types": "^0.2.1", | ||
"axios": "^0.25.0" | ||
@@ -8,0 +8,0 @@ }, |
@@ -17,6 +17,6 @@ import { Identity, IdentityConfig } from './lib/identity/Identity'; | ||
nodeUri?: string; | ||
identityConfig?: IdentityConfig; | ||
identityConfig?: Partial<IdentityConfig>; | ||
} | ||
export declare class Deso { | ||
constructor(config?: DesoConfig); | ||
constructor(config?: Partial<DesoConfig>); | ||
node: Node; | ||
@@ -23,0 +23,0 @@ identity: Identity; |
@@ -36,3 +36,3 @@ "use strict"; | ||
this.referral = new Referral_1.Referral(this.node, this.identity); | ||
this.node = new Node_1.Node(); | ||
this.node = new Node_1.Node(config === null || config === void 0 ? void 0 : config.nodeUri); | ||
this.identity = new Identity_1.Identity({ | ||
@@ -39,0 +39,0 @@ ...config === null || config === void 0 ? void 0 : config.identityConfig, |
@@ -9,5 +9,5 @@ import { GetFullTikTokURLRequest, GetFullTikTokURLResponse, GetVideoStatusRequest, GetVideoStatusResponse, UploadImageRequest, UploadImageResponse } from 'deso-protocol-types'; | ||
uploadImage(request: Partial<UploadImageRequest>): Promise<UploadImageResponse | void>; | ||
uploadVideo(request: Partial<UploadImageRequest>): Promise<string>; | ||
uploadVideo(request?: Partial<UploadImageRequest>): Promise<string>; | ||
getVideoStatus(request: Partial<GetVideoStatusRequest>): Promise<GetVideoStatusResponse>; | ||
getFullTikTokUrl(request: Partial<GetFullTikTokURLRequest>): Promise<GetFullTikTokURLResponse>; | ||
} |
@@ -27,5 +27,5 @@ "use strict"; | ||
} | ||
async uploadVideo(request) { | ||
async uploadVideo(request = {}) { | ||
const endpoint = 'upload-video'; | ||
if (!request.file) { | ||
if (!(request === null || request === void 0 ? void 0 : request.file)) { | ||
const file = (await (0, Media_Helper_1.selectFile)()); | ||
@@ -32,0 +32,0 @@ request.file = file; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
123945
Updateddeso-protocol-types@^0.2.1