File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @aithranetwork/sdk-aithra-toolkit" ,
3- "version" : " 0.0.7-alpha.1 " ,
3+ "version" : " 0.0.7-alpha.2 " ,
44 "description" : " The Aithra Network Toolkit SDK for the agents" ,
55 "main" : " dist/index.js" ,
66 "module" : " dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ interface ConstructorParams {
5050export interface BuildMusicNFTResult {
5151 success : boolean ;
5252 assetIds : string [ ] ;
53+ animationUrl : string ;
54+ trackUrl : string ;
5355}
5456
5557export class AithraManager {
@@ -198,14 +200,16 @@ export class AithraManager {
198200 }
199201 const animationUrl = animationResult . unwrap ( ) ;
200202
203+ const trackUrl = `https://gateway.lighthouse.storage/ipfs/${ uploadResult . unwrap ( ) [ 0 ] . hash } ` ;
204+
201205 // 6. Generate and upload NFT metadata
202206 const nftConfig : MusicNFTConfig = {
203207 animationUrl,
204208 itheumCreator : params . creator ?? this . wallet . publicKey . toString ( ) ,
205209 itheumDataStreamUrl : `https://gateway.lighthouse.storage/ipfs/${ ipnsResult . unwrap ( ) . pointingHash } ?dmf-nestedstream=1` ,
206210 imageUrl : animationUrl ,
207211 name : params . nft . name ,
208- previewMusicUrl : `https://gateway.lighthouse.storage/ipfs/ ${ uploadResult . unwrap ( ) [ 0 ] . hash } ` ,
212+ previewMusicUrl : trackUrl ,
209213 description : params . nft . description ,
210214 tokenCode : params . tokenCode
211215 } ;
@@ -282,7 +286,9 @@ export class AithraManager {
282286
283287 return Result . ok ( {
284288 success : true ,
285- assetIds : mintResult . unwrap ( )
289+ assetIds : mintResult . unwrap ( ) ,
290+ animationUrl : animationUrl ,
291+ trackUrl : trackUrl
286292 } ) ;
287293 }
288294
You can’t perform that action at this time.
0 commit comments