@nosana/sdk
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -85,3 +85,3 @@ import { PublicKey } from '@solana/web3.js'; | ||
*/ | ||
work(market: string | PublicKey): Promise<string>; | ||
work(market: string | PublicKey, nft?: PublicKey, metadata?: PublicKey): Promise<string>; | ||
/** | ||
@@ -88,0 +88,0 @@ * Function to submit a result |
@@ -310,3 +310,3 @@ // external imports | ||
*/ | ||
async work(market) { | ||
async work(market, nft, metadata) { | ||
try { | ||
@@ -318,2 +318,8 @@ await this.loadNosanaJobs(); | ||
const runKey = Keypair.generate(); | ||
if (!nft) { | ||
nft = await getAssociatedTokenAddress(new PublicKey(this.config.nos_address), this.provider.wallet.publicKey); | ||
} | ||
if (!metadata) { | ||
metadata = new PublicKey('11111111111111111111111111111111'); | ||
} | ||
const accounts = { | ||
@@ -327,4 +333,4 @@ ...this.accounts, | ||
run: runKey.publicKey, | ||
nft: await getAssociatedTokenAddress(new PublicKey(this.config.nos_address), this.provider.wallet.publicKey), | ||
metadata: new PublicKey('11111111111111111111111111111111'), | ||
nft, | ||
metadata, | ||
feePayer: this.provider.wallet.publicKey, | ||
@@ -331,0 +337,0 @@ market, |
{ | ||
"name": "@nosana/sdk", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3876523
110148