@nevermined-io/core-kit 0.0.15 → 0.0.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.
@@ -23,7 +23,7 @@ export async function getWeb3ViemClients(config = {}) {
23
23
  : http();
24
24
  const publicClient = createPublicClient({
25
25
  chain,
26
- transport: http(),
26
+ transport: config.web3ProviderUri ? http(config.web3ProviderUri) : http(),
27
27
  });
28
28
  const walletClient = createWalletClient({
29
29
  // cacheTime: 0 as number,
@@ -2538,9 +2538,9 @@ export declare const agreementsStoreAbi: readonly [{
2538
2538
  }];
2539
2539
  readonly name: "UUPSUnsupportedProxiableUUID";
2540
2540
  }];
2541
- export declare const agreementsStoreAddress: "0x0B76E477D0a2b47D94c05d484D2dD85c963E4a7D";
2541
+ export declare const agreementsStoreAddress: "0xc28DB5d91fF3555C64F81f214825Dd365b1befE3";
2542
2542
  export declare const agreementsStoreConfig: {
2543
- readonly address: "0x0B76E477D0a2b47D94c05d484D2dD85c963E4a7D";
2543
+ readonly address: "0xc28DB5d91fF3555C64F81f214825Dd365b1befE3";
2544
2544
  readonly abi: readonly [{
2545
2545
  readonly type: "function";
2546
2546
  readonly inputs: readonly [];
@@ -11435,9 +11435,9 @@ export declare const distributePaymentsConditionAbi: readonly [{
11435
11435
  }];
11436
11436
  readonly name: "UUPSUnsupportedProxiableUUID";
11437
11437
  }];
11438
- export declare const distributePaymentsConditionAddress: "0xEA628498e035b7163ee1ad73EC045469C4C35D87";
11438
+ export declare const distributePaymentsConditionAddress: "0x26282273357f4bAF9322356f08c30C25230A7250";
11439
11439
  export declare const distributePaymentsConditionConfig: {
11440
- readonly address: "0xEA628498e035b7163ee1ad73EC045469C4C35D87";
11440
+ readonly address: "0x26282273357f4bAF9322356f08c30C25230A7250";
11441
11441
  readonly abi: readonly [{
11442
11442
  readonly type: "function";
11443
11443
  readonly inputs: readonly [];
@@ -12948,9 +12948,9 @@ export declare const fiatPaymentTemplateAbi: readonly [{
12948
12948
  }];
12949
12949
  readonly name: "UUPSUnsupportedProxiableUUID";
12950
12950
  }];
12951
- export declare const fiatPaymentTemplateAddress: "0xC0d5bde8a1a711cCa5C785D695bd9d0a28Eb400c";
12951
+ export declare const fiatPaymentTemplateAddress: "0x942818c280f8620c54Fb4d5e90e193521243BA8E";
12952
12952
  export declare const fiatPaymentTemplateConfig: {
12953
- readonly address: "0xC0d5bde8a1a711cCa5C785D695bd9d0a28Eb400c";
12953
+ readonly address: "0x942818c280f8620c54Fb4d5e90e193521243BA8E";
12954
12954
  readonly abi: readonly [{
12955
12955
  readonly type: "function";
12956
12956
  readonly inputs: readonly [];
@@ -13590,9 +13590,9 @@ export declare const fiatSettlementConditionAbi: readonly [{
13590
13590
  }];
13591
13591
  readonly name: "UUPSUnsupportedProxiableUUID";
13592
13592
  }];
13593
- export declare const fiatSettlementConditionAddress: "0x267b0b59562C693EDDc642d27888a508188f32e6";
13593
+ export declare const fiatSettlementConditionAddress: "0x8F5c7f1D065EDA3c2a2D9f268b6BcfB7b4C3Cb4a";
13594
13594
  export declare const fiatSettlementConditionConfig: {
13595
- readonly address: "0x267b0b59562C693EDDc642d27888a508188f32e6";
13595
+ readonly address: "0x8F5c7f1D065EDA3c2a2D9f268b6BcfB7b4C3Cb4a";
13596
13596
  readonly abi: readonly [{
13597
13597
  readonly type: "function";
13598
13598
  readonly inputs: readonly [];
@@ -14232,9 +14232,9 @@ export declare const fixedPaymentTemplateAbi: readonly [{
14232
14232
  }];
14233
14233
  readonly name: "UUPSUnsupportedProxiableUUID";
14234
14234
  }];
14235
- export declare const fixedPaymentTemplateAddress: "0xe7ce42ec0EE3f0C9e27f9dC70476774edC8B8445";
14235
+ export declare const fixedPaymentTemplateAddress: "0x6FDCf70AD484D9a75bCdd076D737BC1D6a961162";
14236
14236
  export declare const fixedPaymentTemplateConfig: {
14237
- readonly address: "0xe7ce42ec0EE3f0C9e27f9dC70476774edC8B8445";
14237
+ readonly address: "0x6FDCf70AD484D9a75bCdd076D737BC1D6a961162";
14238
14238
  readonly abi: readonly [{
14239
14239
  readonly type: "function";
14240
14240
  readonly inputs: readonly [];
@@ -19159,9 +19159,9 @@ export declare const lockPaymentConditionAbi: readonly [{
19159
19159
  }];
19160
19160
  readonly name: "UnsupportedPriceTypeOption";
19161
19161
  }];
19162
- export declare const lockPaymentConditionAddress: "0xfdD6acE802daECF39387d80061BA136925d28eBA";
19162
+ export declare const lockPaymentConditionAddress: "0x42B568C6E14450449087dA3Bbaf7c04471C8e937";
19163
19163
  export declare const lockPaymentConditionConfig: {
19164
- readonly address: "0xfdD6acE802daECF39387d80061BA136925d28eBA";
19164
+ readonly address: "0x42B568C6E14450449087dA3Bbaf7c04471C8e937";
19165
19165
  readonly abi: readonly [{
19166
19166
  readonly type: "function";
19167
19167
  readonly inputs: readonly [];
@@ -21272,9 +21272,9 @@ export declare const nft1155CreditsAbi: readonly [{
21272
21272
  }];
21273
21273
  readonly name: "UUPSUnsupportedProxiableUUID";
21274
21274
  }];
21275
- export declare const nft1155CreditsAddress: "0x26B954793675ded6fA585f76F5BBBE0eD95252B5";
21275
+ export declare const nft1155CreditsAddress: "0x0A9e1534AF94d91141bDCB11b402b8486Ba07642";
21276
21276
  export declare const nft1155CreditsConfig: {
21277
- readonly address: "0x26B954793675ded6fA585f76F5BBBE0eD95252B5";
21277
+ readonly address: "0x0A9e1534AF94d91141bDCB11b402b8486Ba07642";
21278
21278
  readonly abi: readonly [{
21279
21279
  readonly type: "function";
21280
21280
  readonly inputs: readonly [];
@@ -23862,9 +23862,9 @@ export declare const nft1155ExpirableCreditsAbi: readonly [{
23862
23862
  }];
23863
23863
  readonly name: "UUPSUnsupportedProxiableUUID";
23864
23864
  }];
23865
- export declare const nft1155ExpirableCreditsAddress: "0x72A077CF4A496B57D865e7Fc6208660163348fFb";
23865
+ export declare const nft1155ExpirableCreditsAddress: "0xe2A6C8C603e626DaF3C3227bf5CEe7EF30A5C736";
23866
23866
  export declare const nft1155ExpirableCreditsConfig: {
23867
- readonly address: "0x72A077CF4A496B57D865e7Fc6208660163348fFb";
23867
+ readonly address: "0xe2A6C8C603e626DaF3C3227bf5CEe7EF30A5C736";
23868
23868
  readonly abi: readonly [{
23869
23869
  readonly type: "function";
23870
23870
  readonly inputs: readonly [];
@@ -27971,9 +27971,9 @@ export declare const paymentsVaultAbi: readonly [{
27971
27971
  }];
27972
27972
  readonly name: "UUPSUnsupportedProxiableUUID";
27973
27973
  }];
27974
- export declare const paymentsVaultAddress: "0xeED34f7c35C8D0cd9056e8DC52191CeEd774dc99";
27974
+ export declare const paymentsVaultAddress: "0xFB52cd03CD945aFA4cc109Bc31243549ec82c618";
27975
27975
  export declare const paymentsVaultConfig: {
27976
- readonly address: "0xeED34f7c35C8D0cd9056e8DC52191CeEd774dc99";
27976
+ readonly address: "0xFB52cd03CD945aFA4cc109Bc31243549ec82c618";
27977
27977
  readonly abi: readonly [{
27978
27978
  readonly type: "receive";
27979
27979
  readonly stateMutability: "payable";
@@ -30180,9 +30180,9 @@ export declare const transferCreditsConditionAbi: readonly [{
30180
30180
  }];
30181
30181
  readonly name: "UUPSUnsupportedProxiableUUID";
30182
30182
  }];
30183
- export declare const transferCreditsConditionAddress: "0xbfbdF6f4EbEA89e2dCcFfC590aD32e3D3949eD14";
30183
+ export declare const transferCreditsConditionAddress: "0x532ab516bCc050018E294Cc9CfC12613b600df34";
30184
30184
  export declare const transferCreditsConditionConfig: {
30185
- readonly address: "0xbfbdF6f4EbEA89e2dCcFfC590aD32e3D3949eD14";
30185
+ readonly address: "0x532ab516bCc050018E294Cc9CfC12613b600df34";
30186
30186
  readonly abi: readonly [{
30187
30187
  readonly type: "function";
30188
30188
  readonly inputs: readonly [];
@@ -1195,7 +1195,7 @@ export const agreementsStoreAbi = [
1195
1195
  name: 'UUPSUnsupportedProxiableUUID',
1196
1196
  },
1197
1197
  ];
1198
- export const agreementsStoreAddress = '0x0B76E477D0a2b47D94c05d484D2dD85c963E4a7D';
1198
+ export const agreementsStoreAddress = '0xc28DB5d91fF3555C64F81f214825Dd365b1befE3';
1199
1199
  export const agreementsStoreConfig = {
1200
1200
  address: agreementsStoreAddress,
1201
1201
  abi: agreementsStoreAbi,
@@ -6750,7 +6750,7 @@ export const distributePaymentsConditionAbi = [
6750
6750
  name: 'UUPSUnsupportedProxiableUUID',
6751
6751
  },
6752
6752
  ];
6753
- export const distributePaymentsConditionAddress = '0xEA628498e035b7163ee1ad73EC045469C4C35D87';
6753
+ export const distributePaymentsConditionAddress = '0x26282273357f4bAF9322356f08c30C25230A7250';
6754
6754
  export const distributePaymentsConditionConfig = {
6755
6755
  address: distributePaymentsConditionAddress,
6756
6756
  abi: distributePaymentsConditionAbi,
@@ -7594,7 +7594,7 @@ export const fiatPaymentTemplateAbi = [
7594
7594
  name: 'UUPSUnsupportedProxiableUUID',
7595
7595
  },
7596
7596
  ];
7597
- export const fiatPaymentTemplateAddress = '0xC0d5bde8a1a711cCa5C785D695bd9d0a28Eb400c';
7597
+ export const fiatPaymentTemplateAddress = '0x942818c280f8620c54Fb4d5e90e193521243BA8E';
7598
7598
  export const fiatPaymentTemplateConfig = {
7599
7599
  address: fiatPaymentTemplateAddress,
7600
7600
  abi: fiatPaymentTemplateAbi,
@@ -7844,7 +7844,7 @@ export const fiatSettlementConditionAbi = [
7844
7844
  name: 'UUPSUnsupportedProxiableUUID',
7845
7845
  },
7846
7846
  ];
7847
- export const fiatSettlementConditionAddress = '0x267b0b59562C693EDDc642d27888a508188f32e6';
7847
+ export const fiatSettlementConditionAddress = '0x8F5c7f1D065EDA3c2a2D9f268b6BcfB7b4C3Cb4a';
7848
7848
  export const fiatSettlementConditionConfig = {
7849
7849
  address: fiatSettlementConditionAddress,
7850
7850
  abi: fiatSettlementConditionAbi,
@@ -8096,7 +8096,7 @@ export const fixedPaymentTemplateAbi = [
8096
8096
  name: 'UUPSUnsupportedProxiableUUID',
8097
8097
  },
8098
8098
  ];
8099
- export const fixedPaymentTemplateAddress = '0xe7ce42ec0EE3f0C9e27f9dC70476774edC8B8445';
8099
+ export const fixedPaymentTemplateAddress = '0x6FDCf70AD484D9a75bCdd076D737BC1D6a961162';
8100
8100
  export const fixedPaymentTemplateConfig = {
8101
8101
  address: fixedPaymentTemplateAddress,
8102
8102
  abi: fixedPaymentTemplateAbi,
@@ -11450,7 +11450,7 @@ export const lockPaymentConditionAbi = [
11450
11450
  name: 'UnsupportedPriceTypeOption',
11451
11451
  },
11452
11452
  ];
11453
- export const lockPaymentConditionAddress = '0xfdD6acE802daECF39387d80061BA136925d28eBA';
11453
+ export const lockPaymentConditionAddress = '0x42B568C6E14450449087dA3Bbaf7c04471C8e937';
11454
11454
  export const lockPaymentConditionConfig = {
11455
11455
  address: lockPaymentConditionAddress,
11456
11456
  abi: lockPaymentConditionAbi,
@@ -12669,7 +12669,7 @@ export const nft1155CreditsAbi = [
12669
12669
  name: 'UUPSUnsupportedProxiableUUID',
12670
12670
  },
12671
12671
  ];
12672
- export const nft1155CreditsAddress = '0x26B954793675ded6fA585f76F5BBBE0eD95252B5';
12672
+ export const nft1155CreditsAddress = '0x0A9e1534AF94d91141bDCB11b402b8486Ba07642';
12673
12673
  export const nft1155CreditsConfig = {
12674
12674
  address: nft1155CreditsAddress,
12675
12675
  abi: nft1155CreditsAbi,
@@ -13831,7 +13831,7 @@ export const nft1155ExpirableCreditsAbi = [
13831
13831
  name: 'UUPSUnsupportedProxiableUUID',
13832
13832
  },
13833
13833
  ];
13834
- export const nft1155ExpirableCreditsAddress = '0x72A077CF4A496B57D865e7Fc6208660163348fFb';
13834
+ export const nft1155ExpirableCreditsAddress = '0xe2A6C8C603e626DaF3C3227bf5CEe7EF30A5C736';
13835
13835
  export const nft1155ExpirableCreditsConfig = {
13836
13836
  address: nft1155ExpirableCreditsAddress,
13837
13837
  abi: nft1155ExpirableCreditsAbi,
@@ -15682,7 +15682,7 @@ export const paymentsVaultAbi = [
15682
15682
  name: 'UUPSUnsupportedProxiableUUID',
15683
15683
  },
15684
15684
  ];
15685
- export const paymentsVaultAddress = '0xeED34f7c35C8D0cd9056e8DC52191CeEd774dc99';
15685
+ export const paymentsVaultAddress = '0xFB52cd03CD945aFA4cc109Bc31243549ec82c618';
15686
15686
  export const paymentsVaultConfig = {
15687
15687
  address: paymentsVaultAddress,
15688
15688
  abi: paymentsVaultAbi,
@@ -16852,7 +16852,7 @@ export const transferCreditsConditionAbi = [
16852
16852
  name: 'UUPSUnsupportedProxiableUUID',
16853
16853
  },
16854
16854
  ];
16855
- export const transferCreditsConditionAddress = '0xbfbdF6f4EbEA89e2dCcFfC590aD32e3D3949eD14';
16855
+ export const transferCreditsConditionAddress = '0x532ab516bCc050018E294Cc9CfC12613b600df34';
16856
16856
  export const transferCreditsConditionConfig = {
16857
16857
  address: transferCreditsConditionAddress,
16858
16858
  abi: transferCreditsConditionAbi,
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentsApi.d.ts","sourceRoot":"","sources":["../../../src/nevermined/api/PaymentsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAoC,MAAM,MAAM,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,IAAI,EAA8B,MAAM,uBAAuB,CAAA;AAQrF,qBAAa,WAAY,SAAQ,YAAY;IAC3C;;;;OAIG;gBACS,MAAM,EAAE,kBAAkB;IAKzB,eAAe,CAAC,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB7E,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAChD,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,cAAc,EAAE,MAAM,CAAA;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC;IAkCW,gBAAgB,CAC3B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,OAAO,EACrB,IAAI,EAAE,OAAO,GAAG,YAAY,GAC3B,OAAO,CAAC,WAAW,CAAC;IA0BV,kBAAkB,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,OAAO,GAAG,YAAY,GAC3B,OAAO,CAAC,WAAW,CAAC;CAmFxB"}
1
+ {"version":3,"file":"PaymentsApi.d.ts","sourceRoot":"","sources":["../../../src/nevermined/api/PaymentsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAoC,MAAM,MAAM,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,IAAI,EAA8B,MAAM,uBAAuB,CAAA;AAQrF,qBAAa,WAAY,SAAQ,YAAY;IAC3C;;;;OAIG;gBACS,MAAM,EAAE,kBAAkB;IAKzB,eAAe,CAAC,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAgB7E,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAChD,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,cAAc,EAAE,MAAM,CAAA;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC;IAkCW,gBAAgB,CAC3B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,OAAO,EACrB,IAAI,EAAE,OAAO,GAAG,YAAY,GAC3B,OAAO,CAAC,WAAW,CAAC;IA0BV,kBAAkB,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,OAAO,GAAG,YAAY,GAC3B,OAAO,CAAC,WAAW,CAAC;CAsFxB"}
@@ -101,6 +101,10 @@ export class PaymentsApi extends Instantiable {
101
101
  else {
102
102
  txHash = await this.nevermined.contracts.fixedPaymentTemplate.createAgreement(planId, from);
103
103
  }
104
+ if (!txHash) {
105
+ this.logger.error('Error in PaymentsApi order method: txHash not defined');
106
+ throw new Error('txHash not defined');
107
+ }
104
108
  const txReceipt = await this.nevermined.contracts.assetRegistry.getTransactionReceipt(txHash);
105
109
  return {
106
110
  txHash: txReceipt.transactionHash,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevermined-io/core-kit",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -26,6 +26,22 @@
26
26
  ],
27
27
  "nx": {
28
28
  "targets": {
29
+ "e2e": {
30
+ "executor": "nx:run-commands",
31
+ "options": {
32
+ "command": "NODE_OPTIONS='--loader ts-node/esm' mocha --config ./tests/integration/.mocharc.json",
33
+ "cwd": "packages/core-kit"
34
+ },
35
+ "dependsOn": [
36
+ "^build",
37
+ {
38
+ "target": "build",
39
+ "projects": [
40
+ "@nvm-monorepo/commons"
41
+ ]
42
+ }
43
+ ]
44
+ },
29
45
  "e2e:external": {
30
46
  "executor": "nx:run-commands",
31
47
  "options": {