Skip to content

Commit a1ae34d

Browse files
committed
feat: update version and enhance BuildMusicNFTResult with animationUrl and trackUrl
1 parent 56de9b5 commit a1ae34d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

src/core/manager.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ interface ConstructorParams {
5050
export interface BuildMusicNFTResult {
5151
success: boolean;
5252
assetIds: string[];
53+
animationUrl: string;
54+
trackUrl: string;
5355
}
5456

5557
export 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

0 commit comments

Comments
 (0)