@flashbacktech/flashbackclient 0.1.58 → 0.1.60

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.
@@ -32,7 +32,7 @@ export declare class DealOps {
32
32
  * @param amount_usd - Amount to fund in USD (scaled by 10^7)
33
33
  * @returns Promise resolving to the funding result
34
34
  */
35
- setDealFunded: (consumer_id: string, provider_id: string, deal_id: number, amount_usd: bigint) => Promise<void>;
35
+ setDealFunded: (consumer_id: string, provider_id: string, deal_id: number, amount_usd: bigint, fb_repo_id: string) => Promise<void>;
36
36
  /**
37
37
  * Sets a deal as completed
38
38
  * @param consumer_id - Address of the consumer
@@ -18,18 +18,14 @@ class DealOps {
18
18
  * @returns Promise resolving to the created deal ID
19
19
  */
20
20
  this.createDeal = (0, decorator_1.withSignature)(async (consumer_id, provider_id, bucket_id, params) => {
21
- const response = await (0, transaction_1.prepareTransaction)(this.context, consumer_id, {
22
- method: 'create_deal',
23
- args: [
24
- { value: provider_id, type: 'address' },
25
- { value: bucket_id, type: 'u32' },
26
- { value: params.duration_secs, type: 'u64' },
27
- { value: params.agreed_storage_gb, type: 'u32' },
28
- { value: params.agreed_egress_gb, type: 'u32' },
29
- { value: params.fb_repo_id, type: 'string' },
30
- { value: params.api_compatibility, type: 'string' }
31
- ]
32
- });
21
+ const response = await (0, transaction_1.executeWalletTransaction)(this.context, consumer_id, "create_deal", [
22
+ { value: provider_id, type: 'address' },
23
+ { value: bucket_id, type: 'u32' },
24
+ { value: params.duration_secs, type: 'u64' },
25
+ { value: params.agreed_storage_gb, type: 'u32' },
26
+ { value: params.agreed_egress_gb, type: 'u32' },
27
+ { value: params.api_compatibility, type: 'string' }
28
+ ]);
33
29
  if (!response.isSuccess) {
34
30
  throw new Error('Failed to create deal');
35
31
  }
@@ -60,11 +56,12 @@ class DealOps {
60
56
  * @param amount_usd - Amount to fund in USD (scaled by 10^7)
61
57
  * @returns Promise resolving to the funding result
62
58
  */
63
- this.setDealFunded = (0, decorator_1.withSignature)(async (consumer_id, provider_id, deal_id, amount_usd) => {
59
+ this.setDealFunded = (0, decorator_1.withSignature)(async (consumer_id, provider_id, deal_id, amount_usd, fb_repo_id) => {
64
60
  await (0, transaction_1.executeWalletTransaction)(this.context, consumer_id, "set_deal_funded", [
65
61
  { value: provider_id, type: 'address' },
66
62
  { value: deal_id, type: 'u32' },
67
- { value: amount_usd, type: 'u128' }
63
+ { value: amount_usd, type: 'u128' },
64
+ { value: fb_repo_id, type: 'string' },
68
65
  ]);
69
66
  });
70
67
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"