@settlemint/sdk-js 2.2.3-prf8d0b522 → 2.3.0-main35204696
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/README.md +19 -19
- package/dist/settlemint.cjs +24 -2
- package/dist/settlemint.cjs.map +1 -1
- package/dist/settlemint.d.cts +132 -11
- package/dist/settlemint.d.ts +132 -11
- package/dist/settlemint.mjs +25 -3
- package/dist/settlemint.mjs.map +1 -1
- package/package.json +3 -3
package/dist/settlemint.mjs
CHANGED
|
@@ -1546,7 +1546,12 @@ var getPlatformConfigQuery = graphql(
|
|
|
1546
1546
|
disabled
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
|
|
1549
|
+
preDeployedAbis {
|
|
1550
|
+
id
|
|
1551
|
+
featureflagged
|
|
1552
|
+
abis
|
|
1553
|
+
label
|
|
1554
|
+
}
|
|
1550
1555
|
sdkVersion
|
|
1551
1556
|
kits {
|
|
1552
1557
|
id
|
|
@@ -1579,6 +1584,15 @@ var PrivateKeyFragment = graphql(`
|
|
|
1579
1584
|
provider
|
|
1580
1585
|
region
|
|
1581
1586
|
address
|
|
1587
|
+
trustedForwarderName
|
|
1588
|
+
trustedForwarderAddress
|
|
1589
|
+
relayerKey {
|
|
1590
|
+
... on PrivateKey {
|
|
1591
|
+
id
|
|
1592
|
+
name
|
|
1593
|
+
uniqueName
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1582
1596
|
blockchainNodes {
|
|
1583
1597
|
... on BlockchainNode {
|
|
1584
1598
|
id
|
|
@@ -1621,6 +1635,9 @@ var createPrivateKey = graphql(
|
|
|
1621
1635
|
$size: ClusterServiceSize
|
|
1622
1636
|
$type: ClusterServiceType
|
|
1623
1637
|
$blockchainNodes: [ID!]
|
|
1638
|
+
$trustedForwarderName: String
|
|
1639
|
+
$trustedForwarderAddress: String
|
|
1640
|
+
$relayerKey: ID
|
|
1624
1641
|
) {
|
|
1625
1642
|
createPrivateKey(
|
|
1626
1643
|
applicationId: $applicationId
|
|
@@ -1631,6 +1648,9 @@ var createPrivateKey = graphql(
|
|
|
1631
1648
|
size: $size
|
|
1632
1649
|
type: $type
|
|
1633
1650
|
blockchainNodes: $blockchainNodes
|
|
1651
|
+
trustedForwarderName: $trustedForwarderName
|
|
1652
|
+
trustedForwarderAddress: $trustedForwarderAddress
|
|
1653
|
+
relayerKey: $relayerKey
|
|
1634
1654
|
) {
|
|
1635
1655
|
...PrivateKey
|
|
1636
1656
|
}
|
|
@@ -1666,9 +1686,10 @@ var privatekeyRead = (gqlClient) => {
|
|
|
1666
1686
|
};
|
|
1667
1687
|
var privateKeyCreate = (gqlClient) => {
|
|
1668
1688
|
return async (args) => {
|
|
1669
|
-
const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
|
|
1689
|
+
const { applicationUniqueName, blockchainNodeUniqueNames, relayerKeyUniqueName, ...otherArgs } = args;
|
|
1670
1690
|
const application = await applicationRead(gqlClient)(applicationUniqueName);
|
|
1671
1691
|
const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient)(uniqueName))) : [];
|
|
1692
|
+
const relayerKey = relayerKeyUniqueName ? await privatekeyRead(gqlClient)(relayerKeyUniqueName) : void 0;
|
|
1672
1693
|
const platformConfig = await getPlatformConfig(gqlClient)();
|
|
1673
1694
|
const defaultProvider = platformConfig.deploymentEngineTargets.find(
|
|
1674
1695
|
(target) => !target.disabled && target.clusters.some((cluster) => !cluster.disabled)
|
|
@@ -1678,6 +1699,7 @@ var privateKeyCreate = (gqlClient) => {
|
|
|
1678
1699
|
...otherArgs,
|
|
1679
1700
|
applicationId: application.id,
|
|
1680
1701
|
blockchainNodes: blockchainNodes.map((node) => node?.id),
|
|
1702
|
+
relayerKey: relayerKey?.id,
|
|
1681
1703
|
provider: defaultProvider?.id ?? "gke",
|
|
1682
1704
|
region: defaultRegion?.id?.split("-")[1] ?? "europe",
|
|
1683
1705
|
size: "SMALL",
|
|
@@ -1704,7 +1726,7 @@ var ClientOptionsSchema = z.object({
|
|
|
1704
1726
|
});
|
|
1705
1727
|
|
|
1706
1728
|
// src/pincode-verification.ts
|
|
1707
|
-
import { createHash } from "
|
|
1729
|
+
import { createHash } from "crypto";
|
|
1708
1730
|
function hashPincode(pincode, salt) {
|
|
1709
1731
|
return createHash("sha256").update(`${salt}${pincode}`).digest("hex");
|
|
1710
1732
|
}
|