@blocklet/meta 1.16.11-next-ca5f18b5 → 1.16.11-next-3e55bc95
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/lib/payment/index.d.ts +2 -2
- package/lib/payment/v2.d.ts +4 -4
- package/lib/payment/v2.js +3 -3
- package/package.json +6 -6
package/lib/payment/index.d.ts
CHANGED
|
@@ -240,14 +240,14 @@ declare const _default: {
|
|
|
240
240
|
decimal: number;
|
|
241
241
|
}[];
|
|
242
242
|
components: any;
|
|
243
|
-
}) =>
|
|
243
|
+
}) => {
|
|
244
244
|
code: string;
|
|
245
245
|
shares: {
|
|
246
246
|
amount: string;
|
|
247
247
|
tokenAddress: string;
|
|
248
248
|
accountAddress: string;
|
|
249
249
|
}[];
|
|
250
|
-
}
|
|
250
|
+
};
|
|
251
251
|
};
|
|
252
252
|
};
|
|
253
253
|
};
|
package/lib/payment/v2.d.ts
CHANGED
|
@@ -140,14 +140,14 @@ export declare const _test: {
|
|
|
140
140
|
decimal: number;
|
|
141
141
|
}>;
|
|
142
142
|
components: any;
|
|
143
|
-
}) =>
|
|
143
|
+
}) => {
|
|
144
144
|
code: string;
|
|
145
145
|
shares: {
|
|
146
146
|
amount: string;
|
|
147
147
|
tokenAddress: string;
|
|
148
148
|
accountAddress: string;
|
|
149
149
|
}[];
|
|
150
|
-
}
|
|
150
|
+
};
|
|
151
151
|
};
|
|
152
152
|
export { createNftFactoryItx };
|
|
153
153
|
export { verifyPaymentIntegrity };
|
|
@@ -229,14 +229,14 @@ declare const _default: {
|
|
|
229
229
|
decimal: number;
|
|
230
230
|
}[];
|
|
231
231
|
components: any;
|
|
232
|
-
}) =>
|
|
232
|
+
}) => {
|
|
233
233
|
code: string;
|
|
234
234
|
shares: {
|
|
235
235
|
amount: string;
|
|
236
236
|
tokenAddress: string;
|
|
237
237
|
accountAddress: string;
|
|
238
238
|
}[];
|
|
239
|
-
}
|
|
239
|
+
};
|
|
240
240
|
};
|
|
241
241
|
};
|
|
242
242
|
export default _default;
|
package/lib/payment/v2.js
CHANGED
|
@@ -270,7 +270,7 @@ const getTokenTransfers = ({ priceToken, shares = [], components = [], }) => {
|
|
|
270
270
|
});
|
|
271
271
|
return mergedContracts;
|
|
272
272
|
};
|
|
273
|
-
const getContract =
|
|
273
|
+
const getContract = ({ meta, priceTokens, components, }) => {
|
|
274
274
|
const shares = meta.payment.share || [];
|
|
275
275
|
const [priceToken] = priceTokens;
|
|
276
276
|
const contracts = getTokenTransfers({ priceToken, shares, components });
|
|
@@ -375,7 +375,7 @@ const getPaymentIntegrity = async ({ contract, factoryInput, storeComponents, me
|
|
|
375
375
|
const { components, stores } = await getComponents(meta);
|
|
376
376
|
const store = stores.find((x) => x.id === storeId);
|
|
377
377
|
// eslint-disable-next-line no-param-reassign
|
|
378
|
-
contract =
|
|
378
|
+
contract = getContract({ meta, components, priceTokens }).code;
|
|
379
379
|
// eslint-disable-next-line no-param-reassign
|
|
380
380
|
factoryInput = await getFactoryInput(priceTokens);
|
|
381
381
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -455,7 +455,7 @@ const createNftFactoryItx = async ({ blockletMeta, ocapClient, issuers, storeUrl
|
|
|
455
455
|
const priceTokens = await getPriceTokens(blockletMeta, ocapClient);
|
|
456
456
|
const { components, stores } = await getComponents(blockletMeta);
|
|
457
457
|
const factoryInput = getFactoryInput(priceTokens);
|
|
458
|
-
const { code: contract, shares } =
|
|
458
|
+
const { code: contract, shares } = getContract({
|
|
459
459
|
meta: blockletMeta,
|
|
460
460
|
priceTokens,
|
|
461
461
|
components,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.11-next-
|
|
6
|
+
"version": "1.16.11-next-3e55bc95",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@abtnode/constant": "1.16.11-next-
|
|
28
|
-
"@abtnode/util": "1.16.11-next-
|
|
27
|
+
"@abtnode/constant": "1.16.11-next-3e55bc95",
|
|
28
|
+
"@abtnode/util": "1.16.11-next-3e55bc95",
|
|
29
29
|
"@arcblock/did": "1.18.80",
|
|
30
30
|
"@arcblock/did-ext": "1.18.80",
|
|
31
31
|
"@arcblock/did-util": "1.18.80",
|
|
32
32
|
"@arcblock/jwt": "1.18.80",
|
|
33
|
-
"@blocklet/constant": "1.16.11-next-
|
|
33
|
+
"@blocklet/constant": "1.16.11-next-3e55bc95",
|
|
34
34
|
"@ocap/asset": "1.18.80",
|
|
35
35
|
"@ocap/mcrypto": "1.18.80",
|
|
36
36
|
"@ocap/types": "1.18.80",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"validate-npm-package-name": "^3.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@arcblock/eslint-config-ts": "^0.2.
|
|
61
|
+
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
62
62
|
"@types/express": "^4.17.14",
|
|
63
63
|
"@types/jest": "^29.2.2",
|
|
64
64
|
"@types/joi": "^17.2.3",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.0.4"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "cf0251c2d85c617b03151495b5944061ceb373e5"
|
|
83
83
|
}
|