@avaprotocol/sdk-js 2.3.15 → 2.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18225,34 +18225,48 @@ var Workflow = class _Workflow {
18225
18225
  }
18226
18226
  toRequest() {
18227
18227
  const request = new avs_pb19.CreateTaskReq();
18228
+ console.log("\u{1F50D} Workflow.toRequest() - Starting serialization...");
18229
+ console.log("\u{1F4CA} Input data:");
18230
+ console.log(" - nodes count:", this.nodes?.length || 0);
18231
+ console.log(" - edges count:", this.edges?.length || 0);
18228
18232
  request.setSmartWalletAddress(this.smartWalletAddress);
18229
18233
  request.setTrigger(this.trigger.toRequest());
18230
18234
  try {
18235
+ let nodeCount = 0;
18231
18236
  import_lodash3.default.map(this.nodes, (node, index) => {
18232
18237
  try {
18238
+ console.log(`\u{1F527} Serializing node ${index}: ${node.name} (${node.type})`);
18233
18239
  const nodeRequest = node.toRequest();
18234
18240
  request.addNodes(nodeRequest);
18241
+ nodeCount++;
18242
+ console.log(`\u2705 Node ${index} serialized successfully`);
18235
18243
  } catch (nodeError) {
18236
18244
  console.error(`\u{1F6A8} Node ${index} (${node.name}) serialization failed:`, nodeError);
18237
18245
  const errorMessage = nodeError instanceof Error ? nodeError.message : String(nodeError);
18238
18246
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
18239
18247
  }
18240
18248
  });
18249
+ console.log(`\u{1F4CA} Successfully serialized ${nodeCount} nodes`);
18241
18250
  } catch (nodesError) {
18242
18251
  console.error("\u{1F6A8} Nodes serialization failed:", nodesError);
18243
18252
  throw nodesError;
18244
18253
  }
18245
18254
  try {
18255
+ let edgeCount = 0;
18246
18256
  import_lodash3.default.map(this.edges, (edge, index) => {
18247
18257
  try {
18258
+ console.log(`\u{1F517} Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
18248
18259
  const edgeRequest = edge.toRequest();
18249
18260
  request.addEdges(edgeRequest);
18261
+ edgeCount++;
18262
+ console.log(`\u2705 Edge ${index} serialized successfully`);
18250
18263
  } catch (edgeError) {
18251
18264
  console.error(`\u{1F6A8} Edge ${index} serialization failed:`, edgeError);
18252
18265
  const errorMessage = edgeError instanceof Error ? edgeError.message : String(edgeError);
18253
18266
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
18254
18267
  }
18255
18268
  });
18269
+ console.log(`\u{1F4CA} Successfully serialized ${edgeCount} edges`);
18256
18270
  } catch (edgesError) {
18257
18271
  console.error("\u{1F6A8} Edges serialization failed:", edgesError);
18258
18272
  throw edgesError;
@@ -18263,6 +18277,11 @@ var Workflow = class _Workflow {
18263
18277
  if (this.name) {
18264
18278
  request.setName(this.name);
18265
18279
  }
18280
+ console.log("\u{1F4E4} Final protobuf request summary:");
18281
+ console.log(" - nodes in request:", request.getNodesList().length);
18282
+ console.log(" - edges in request:", request.getEdgesList().length);
18283
+ console.log(" - trigger set:", !!request.getTrigger());
18284
+ console.log("\u{1F50D} Workflow.toRequest() - Serialization complete");
18266
18285
  return request;
18267
18286
  }
18268
18287
  /**
package/dist/index.mjs CHANGED
@@ -18212,34 +18212,48 @@ var Workflow = class _Workflow {
18212
18212
  }
18213
18213
  toRequest() {
18214
18214
  const request = new avs_pb19.CreateTaskReq();
18215
+ console.log("\u{1F50D} Workflow.toRequest() - Starting serialization...");
18216
+ console.log("\u{1F4CA} Input data:");
18217
+ console.log(" - nodes count:", this.nodes?.length || 0);
18218
+ console.log(" - edges count:", this.edges?.length || 0);
18215
18219
  request.setSmartWalletAddress(this.smartWalletAddress);
18216
18220
  request.setTrigger(this.trigger.toRequest());
18217
18221
  try {
18222
+ let nodeCount = 0;
18218
18223
  _3.map(this.nodes, (node, index) => {
18219
18224
  try {
18225
+ console.log(`\u{1F527} Serializing node ${index}: ${node.name} (${node.type})`);
18220
18226
  const nodeRequest = node.toRequest();
18221
18227
  request.addNodes(nodeRequest);
18228
+ nodeCount++;
18229
+ console.log(`\u2705 Node ${index} serialized successfully`);
18222
18230
  } catch (nodeError) {
18223
18231
  console.error(`\u{1F6A8} Node ${index} (${node.name}) serialization failed:`, nodeError);
18224
18232
  const errorMessage = nodeError instanceof Error ? nodeError.message : String(nodeError);
18225
18233
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
18226
18234
  }
18227
18235
  });
18236
+ console.log(`\u{1F4CA} Successfully serialized ${nodeCount} nodes`);
18228
18237
  } catch (nodesError) {
18229
18238
  console.error("\u{1F6A8} Nodes serialization failed:", nodesError);
18230
18239
  throw nodesError;
18231
18240
  }
18232
18241
  try {
18242
+ let edgeCount = 0;
18233
18243
  _3.map(this.edges, (edge, index) => {
18234
18244
  try {
18245
+ console.log(`\u{1F517} Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
18235
18246
  const edgeRequest = edge.toRequest();
18236
18247
  request.addEdges(edgeRequest);
18248
+ edgeCount++;
18249
+ console.log(`\u2705 Edge ${index} serialized successfully`);
18237
18250
  } catch (edgeError) {
18238
18251
  console.error(`\u{1F6A8} Edge ${index} serialization failed:`, edgeError);
18239
18252
  const errorMessage = edgeError instanceof Error ? edgeError.message : String(edgeError);
18240
18253
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
18241
18254
  }
18242
18255
  });
18256
+ console.log(`\u{1F4CA} Successfully serialized ${edgeCount} edges`);
18243
18257
  } catch (edgesError) {
18244
18258
  console.error("\u{1F6A8} Edges serialization failed:", edgesError);
18245
18259
  throw edgesError;
@@ -18250,6 +18264,11 @@ var Workflow = class _Workflow {
18250
18264
  if (this.name) {
18251
18265
  request.setName(this.name);
18252
18266
  }
18267
+ console.log("\u{1F4E4} Final protobuf request summary:");
18268
+ console.log(" - nodes in request:", request.getNodesList().length);
18269
+ console.log(" - edges in request:", request.getEdgesList().length);
18270
+ console.log(" - trigger set:", !!request.getTrigger());
18271
+ console.log("\u{1F50D} Workflow.toRequest() - Serialization complete");
18253
18272
  return request;
18254
18273
  }
18255
18274
  /**
@@ -1 +1 @@
1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a;CAkBxB;AAED,eAAe,QAAQ,CAAC"}
@@ -99,15 +99,23 @@ class Workflow {
99
99
  }
100
100
  toRequest() {
101
101
  const request = new avs_pb.CreateTaskReq();
102
+ console.log("🔍 Workflow.toRequest() - Starting serialization...");
103
+ console.log("📊 Input data:");
104
+ console.log(" - nodes count:", this.nodes?.length || 0);
105
+ console.log(" - edges count:", this.edges?.length || 0);
102
106
  // TODO: add client side validation for each field
103
107
  request.setSmartWalletAddress(this.smartWalletAddress);
104
108
  request.setTrigger(this.trigger.toRequest());
105
109
  // Add error handling for node serialization
106
110
  try {
111
+ let nodeCount = 0;
107
112
  _.map(this.nodes, (node, index) => {
108
113
  try {
114
+ console.log(`🔧 Serializing node ${index}: ${node.name} (${node.type})`);
109
115
  const nodeRequest = node.toRequest();
110
116
  request.addNodes(nodeRequest);
117
+ nodeCount++;
118
+ console.log(`✅ Node ${index} serialized successfully`);
111
119
  }
112
120
  catch (nodeError) {
113
121
  console.error(`🚨 Node ${index} (${node.name}) serialization failed:`, nodeError);
@@ -115,6 +123,7 @@ class Workflow {
115
123
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
116
124
  }
117
125
  });
126
+ console.log(`📊 Successfully serialized ${nodeCount} nodes`);
118
127
  }
119
128
  catch (nodesError) {
120
129
  console.error('🚨 Nodes serialization failed:', nodesError);
@@ -122,10 +131,14 @@ class Workflow {
122
131
  }
123
132
  // Add error handling for edge serialization
124
133
  try {
134
+ let edgeCount = 0;
125
135
  _.map(this.edges, (edge, index) => {
126
136
  try {
137
+ console.log(`🔗 Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
127
138
  const edgeRequest = edge.toRequest();
128
139
  request.addEdges(edgeRequest);
140
+ edgeCount++;
141
+ console.log(`✅ Edge ${index} serialized successfully`);
129
142
  }
130
143
  catch (edgeError) {
131
144
  console.error(`🚨 Edge ${index} serialization failed:`, edgeError);
@@ -133,6 +146,7 @@ class Workflow {
133
146
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
134
147
  }
135
148
  });
149
+ console.log(`📊 Successfully serialized ${edgeCount} edges`);
136
150
  }
137
151
  catch (edgesError) {
138
152
  console.error('🚨 Edges serialization failed:', edgesError);
@@ -145,6 +159,11 @@ class Workflow {
145
159
  if (this.name) {
146
160
  request.setName(this.name);
147
161
  }
162
+ console.log("📤 Final protobuf request summary:");
163
+ console.log(" - nodes in request:", request.getNodesList().length);
164
+ console.log(" - edges in request:", request.getEdgesList().length);
165
+ console.log(" - trigger set:", !!request.getTrigger());
166
+ console.log("🔍 Workflow.toRequest() - Serialization complete");
148
167
  return request;
149
168
  }
150
169
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.3.15",
3
+ "version": "2.3.16",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",