Skip to content

Commit

Permalink
chore: fixed adv hello world example
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed May 24, 2024
1 parent c588526 commit df7338f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/advanced/hello-world.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DraftOfferProposalPool, GolemNetwork, DemandSpec } from "@golem-sdk/golem-js";
import { DraftOfferProposalPool, GolemNetwork, MarketOrderSpec } from "@golem-sdk/golem-js";

import { pinoPrettyLogger } from "@golem-sdk/pino-logger";

Expand All @@ -14,7 +14,7 @@ import { pinoPrettyLogger } from "@golem-sdk/pino-logger";
try {
await glm.connect();

const demand: DemandSpec = {
const order: MarketOrderSpec = {
demand: {
workload: {
imageTag: "golem/alpine:latest",
Expand All @@ -37,10 +37,10 @@ import { pinoPrettyLogger } from "@golem-sdk/pino-logger";
});

const allocation = await glm.payment.createAllocation({
budget: glm.market.estimateBudget(demand),
budget: glm.market.estimateBudget(order),
expirationSec: 60 * 60, // 60 minutes
});
const demandSpecification = await glm.market.buildDemandDetails(demand.demand, allocation);
const demandSpecification = await glm.market.buildDemandDetails(order.demand, allocation);
const proposal$ = glm.market.startCollectingProposals({
demandSpecification,
bufferSize: 15,
Expand Down

0 comments on commit df7338f

Please sign in to comment.