diff --git a/.github/workflows/ci-lint-typescript.yml b/.github/workflows/ci-lint-typescript.yml
index b0f4907834b..59a7dc2ce6c 100644
--- a/.github/workflows/ci-lint-typescript.yml
+++ b/.github/workflows/ci-lint-typescript.yml
@@ -6,16 +6,14 @@ on:
paths:
- "ts-packages/**"
- "sdk/typescript/**"
- - "nym-connect/desktop/src/**"
- - "nym-connect/desktop/package.json"
- "nym-wallet/src/**"
- "nym-wallet/package.json"
- - "explorer/**"
+ - "explorer-v2/**"
- ".github/workflows/ci-lint-typescript.yml"
jobs:
build:
- runs-on: ubuntu-22.04
+ runs-on: arc-linux-latest
env:
RUSTUP_PERMIT_COPY_RENAME: 1
steps:
@@ -25,6 +23,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
+
- name: Setup yarn
run: npm install -g yarn
@@ -37,14 +36,12 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install wasm-opt
- uses: ./.github/actions/install-wasm-opt
- with:
- version: '116'
+ run: cargo install wasm-opt
- name: Set up Go
- uses: actions/setup-go@v5
+ uses: actions/setup-go@v6
with:
- go-version: "1.23.7"
+ go-version: "1.24.6"
- name: Install
run: yarn
@@ -52,7 +49,11 @@ jobs:
- name: Build packages
run: yarn build:ci
+ - name: Install again
+ run: yarn
+
- name: Lint
run: yarn lint
+
- name: Typecheck with tsc
run: yarn tsc
diff --git a/.github/workflows/ci-nym-wallet-storybook.yml b/.github/workflows/ci-nym-wallet-storybook.yml
index bfdfd358b6c..cb43bdd91e1 100644
--- a/.github/workflows/ci-nym-wallet-storybook.yml
+++ b/.github/workflows/ci-nym-wallet-storybook.yml
@@ -8,7 +8,7 @@ on:
jobs:
build:
- runs-on: custom-linux
+ runs-on: arc-linux-latest
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/publish-sdk-npm.yml b/.github/workflows/publish-sdk-npm.yml
index 173f94bcff4..642737a6f87 100644
--- a/.github/workflows/publish-sdk-npm.yml
+++ b/.github/workflows/publish-sdk-npm.yml
@@ -4,7 +4,7 @@ on:
jobs:
publish:
- runs-on: arc-ubuntu-22.04
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -17,10 +17,13 @@ jobs:
- name: Setup yarn
run: npm install -g yarn
- - name: Install Rust stable
+ - name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
+ profile: minimal
toolchain: stable
+ override: true
+ components: rustfmt, clippy
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
@@ -29,9 +32,9 @@ jobs:
run: cargo install wasm-opt
- name: Set up Go
- uses: actions/setup-go@v5
+ uses: actions/setup-go@v6
with:
- go-version: "1.23.7"
+ go-version: "1.24.6"
- name: Install dependencies
run: yarn
diff --git a/Cargo.lock b/Cargo.lock
index 04f9da4092b..e3601a0081e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2262,7 +2262,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
- "windows-sys 0.59.0",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -2579,7 +2579,7 @@ dependencies = [
[[package]]
name = "extension-storage"
-version = "1.4.0-rc.0"
+version = "1.4.1"
dependencies = [
"bip39",
"console_error_panic_hook",
@@ -4478,7 +4478,7 @@ dependencies = [
[[package]]
name = "mix-fetch-wasm"
-version = "1.4.0-rc.0"
+version = "1.4.1"
dependencies = [
"async-trait",
"futures",
@@ -4488,6 +4488,7 @@ dependencies = [
"nym-ordered-buffer",
"nym-service-providers-common",
"nym-socks5-requests",
+ "nym-validator-client",
"rand 0.8.5",
"serde",
"serde-wasm-bindgen 0.6.5",
@@ -5283,7 +5284,7 @@ dependencies = [
[[package]]
name = "nym-client-wasm"
-version = "1.4.0-rc.0"
+version = "1.4.1"
dependencies = [
"anyhow",
"futures",
@@ -6642,7 +6643,7 @@ dependencies = [
[[package]]
name = "nym-node-tester-wasm"
-version = "1.3.0-rc.0"
+version = "1.3.1"
dependencies = [
"futures",
"js-sys",
@@ -7823,9 +7824,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "openssl-sys"
-version = "0.9.109"
+version = "0.9.110"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571"
+checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2"
dependencies = [
"cc",
"libc",
diff --git a/Cargo.toml b/Cargo.toml
index 267c5607551..11306ca924a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -150,7 +150,7 @@ members = [
"tools/internal/contract-state-importer/importer-cli",
"tools/internal/contract-state-importer/importer-contract",
"tools/internal/mixnet-connectivity-check",
- # "tools/internal/sdk-version-bump",
+# "tools/internal/sdk-version-bump",
"tools/internal/ssl-inject",
"tools/internal/testnet-manager",
"tools/internal/testnet-manager/dkg-bypass-contract",
diff --git a/Makefile b/Makefile
index a2a7562c547..eb58f2ab5c8 100644
--- a/Makefile
+++ b/Makefile
@@ -107,16 +107,16 @@ sdk-wasm-build:
$(MAKE) -C nym-browser-extension/storage wasm-pack
$(MAKE) -C wasm/client
$(MAKE) -C wasm/node-tester
- # $(MAKE) -C wasm/mix-fetch
+ $(MAKE) -C wasm/mix-fetch
$(MAKE) -C wasm/zknym-lib
# $(MAKE) -C wasm/full-nym-wasm
# run this from npm/yarn to ensure tools are in the path, e.g. yarn build:sdk from root of repo
sdk-typescript-build:
npx lerna run --scope @nymproject/sdk build --stream
- # npx lerna run --scope @nymproject/mix-fetch build --stream
- # npx lerna run --scope @nymproject/node-tester build --stream
- # yarn --cwd sdk/typescript/codegen/contract-clients build
+ npx lerna run --scope @nymproject/mix-fetch build --stream
+ npx lerna run --scope @nymproject/node-tester build --stream
+ yarn --cwd sdk/typescript/codegen/contract-clients build
# NOTE: These targets are part of the main workspace (but not as wasm32-unknown-unknown)
WASM_CRATES = extension-storage nym-client-wasm nym-node-tester-wasm zknym-lib
diff --git a/documentation/docs/code-examples/sdk/typescript/mixfetch-example-code.mdx b/documentation/docs/code-examples/sdk/typescript/mixfetch-example-code.mdx
index c9e9320462b..85eb29277fd 100644
--- a/documentation/docs/code-examples/sdk/typescript/mixfetch-example-code.mdx
+++ b/documentation/docs/code-examples/sdk/typescript/mixfetch-example-code.mdx
@@ -1,27 +1,26 @@
-```ts copy filename="mixFetchExample.tsx"
-import React, { useState } from 'react';
-import CircularProgress from '@mui/material/CircularProgress';
-import Button from '@mui/material/Button';
-import TextField from '@mui/material/TextField';
-import Typography from '@mui/material/Typography';
-import Box from '@mui/material/Box';
-import { mixFetch } from '@nymproject/mix-fetch-full-fat';
-import Stack from '@mui/material/Stack';
-import Paper from '@mui/material/Paper';
-import type { SetupMixFetchOps } from '@nymproject/mix-fetch';
+```tsx copy filename="mixFetchExample.tsx"
+import React, { useState } from "react";
+import CircularProgress from "@mui/material/CircularProgress";
+import Button from "@mui/material/Button";
+import TextField from "@mui/material/TextField";
+import Typography from "@mui/material/Typography";
+import Box from "@mui/material/Box";
+import { mixFetch } from "@nymproject/mix-fetch-full-fat";
+import Stack from "@mui/material/Stack";
+import Paper from "@mui/material/Paper";
+import type { SetupMixFetchOps } from "@nymproject/mix-fetch-full-fat";
-const defaultUrl = 'https://nym.com/favicon.svg';
-const args = { mode: 'unsafe-ignore-cors' };
+const defaultUrl = "https://nymtech.net/.wellknown/network-requester/exit-policy.txt";
+const args = { mode: "unsafe-ignore-cors" };
const mixFetchOptions: SetupMixFetchOps = {
- preferredGateway: '6Gb7ftQdKveMjPyrxDXeAtfYAX7Zg5mVZHtnRC5MmZ1B', // with WSS
- preferredNetworkRequester:
- '8rRGWy54oC8drFL9DepMegBt2DLrsqQwCoHMXt9nsnTo.2XjCPVbb4FpQ9hNRcXwb9mTzEAVVk1zf1tcch3wdtNEA@6Gb7ftQdKveMjPyrxDXeAtfYAX7Zg5mVZHtnRC5MmZ1B',
+ preferredGateway: "2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW", // with WSS
+ // preferredNetworkRequester:
+ // "CTDxrcXgrZHWyCWnuCgjpJPghQUcEVz1HkhUr5mGdFnT.3UAww1YWNyVNYNWFQL1LaHYouQtDiXBGK5GiDZgpXkTK@2RFtU5BwxvJJXagAWAEuaPgb5ZVPRoy2542TT93Edw6v",
mixFetchOverride: {
requestTimeoutMs: 60_000,
},
forceTls: true, // force WSS
- extra: {},
};
export const MixFetch = () => {
@@ -45,7 +44,7 @@ export const MixFetch = () => {
};
return (
-
+
{
defaultValue={defaultUrl}
onChange={(e) => setUrl(e.target.value)}
/>
-
diff --git a/documentation/docs/code-examples/sdk/typescript/traffic-example-code.mdx b/documentation/docs/code-examples/sdk/typescript/traffic-example-code.mdx
index 351e5bdbde4..66317593926 100644
--- a/documentation/docs/code-examples/sdk/typescript/traffic-example-code.mdx
+++ b/documentation/docs/code-examples/sdk/typescript/traffic-example-code.mdx
@@ -1,15 +1,19 @@
```ts copy filename="MixnetWASMClientExample.tsx"
-import React, { useEffect, useState } from 'react';
-import { createNymMixnetClient, NymMixnetClient, Payload } from '@nymproject/sdk-full-fat';
-import Box from '@mui/material/Box';
-import CircularProgress from '@mui/material/CircularProgress';
-import Paper from '@mui/material/Paper';
-import Typography from '@mui/material/Typography';
-import Stack from '@mui/material/Stack';
-import TextField from '@mui/material/TextField';
-import Button from '@mui/material/Button';
+import React, { useEffect, useState } from "react";
+import {
+ createNymMixnetClient,
+ NymMixnetClient,
+ Payload,
+} from "@nymproject/sdk-full-fat";
+import Box from "@mui/material/Box";
+import CircularProgress from "@mui/material/CircularProgress";
+import Paper from "@mui/material/Paper";
+import Typography from "@mui/material/Typography";
+import Stack from "@mui/material/Stack";
+import TextField from "@mui/material/TextField";
+import Button from "@mui/material/Button";
-const nymApiUrl = 'https://validator.nymtech.net/api';
+const nymApiUrl = "https://validator.nymtech.net/api";
export const Traffic = () => {
const [nym, setNym] = useState
();
@@ -17,27 +21,31 @@ export const Traffic = () => {
const [recipient, setRecipient] = useState();
const [payload, setPayload] = useState();
const [receivedMessage, setReceivedMessage] = useState();
+ const [buttonEnabled, setButtonEnabled] = useState(false);
const init = async () => {
const client = await createNymMixnetClient();
setNym(client);
+ // start the client and connect to a gateway
await client?.client.start({
clientId: crypto.randomUUID(),
nymApiUrl,
forceTls: true, // force WSS
});
+ // check when is connected and set the self address
client?.events.subscribeToConnected((e) => {
const { address } = e.args;
setSelfAddress(address);
});
+ // show whether the client is ready or not
client?.events.subscribeToLoaded((e) => {
- console.log('Client ready: ', e.args);
+ console.log("Client ready: ", e.args);
});
-
+ // show message payload content when received
client?.events.subscribeToTextMessageReceivedEvent((e) => {
console.log(e.args.payload);
setReceivedMessage(e.args.payload);
@@ -48,7 +56,8 @@ export const Traffic = () => {
await nym?.client.stop();
};
- const send = () => nym.client.send({ payload, recipient });
+ const send = () =>
+ payload && recipient && nym?.client.send({ payload, recipient });
useEffect(() => {
init();
@@ -57,9 +66,17 @@ export const Traffic = () => {
};
}, []);
+ useEffect(() => {
+ if (recipient && payload) {
+ setButtonEnabled(true);
+ } else {
+ setButtonEnabled(false);
+ }
+ }, [recipient, payload]);
+
if (!nym || !selfAddress) {
return (
-
+
);
@@ -67,10 +84,10 @@ export const Traffic = () => {
return (
-
+
My self address is:
- {selfAddress || 'loading'}
+ {selfAddress || "loading"}
Communication through the Mixnet
{
placeholder="Message to send"
multiline
rows={4}
- onChange={(e) => setPayload({ message: e.target.value, mimeType: 'text/plain' })}
+ onChange={(e) =>
+ setPayload({ message: e.target.value, mimeType: "text/plain" })
+ }
size="small"
/>
- send()} disabled={!payload || !recipient} sx={{width: 'fit-content'}}>
+ send()}
+ disabled={!buttonEnabled}
+ sx={{ width: "fit-content" }}
+ >
Send
{receivedMessage && (
-
+
Message Received!
{receivedMessage}
diff --git a/documentation/docs/components/mix-fetch.tsx b/documentation/docs/components/mix-fetch.tsx
index 252dcc1d1cd..6726b749985 100644
--- a/documentation/docs/components/mix-fetch.tsx
+++ b/documentation/docs/components/mix-fetch.tsx
@@ -9,13 +9,13 @@ import Stack from "@mui/material/Stack";
import Paper from "@mui/material/Paper";
import type { SetupMixFetchOps } from "@nymproject/mix-fetch-full-fat";
-const defaultUrl = "https://nym.com/favicon.svg";
+const defaultUrl = "https://nymtech.net/.wellknown/network-requester/exit-policy.txt";
const args = { mode: "unsafe-ignore-cors" };
const mixFetchOptions: SetupMixFetchOps = {
- preferredGateway: "6Gb7ftQdKveMjPyrxDXeAtfYAX7Zg5mVZHtnRC5MmZ1B", // with WSS
- preferredNetworkRequester:
- "8rRGWy54oC8drFL9DepMegBt2DLrsqQwCoHMXt9nsnTo.2XjCPVbb4FpQ9hNRcXwb9mTzEAVVk1zf1tcch3wdtNEA@6Gb7ftQdKveMjPyrxDXeAtfYAX7Zg5mVZHtnRC5MmZ1B",
+ preferredGateway: "2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW", // with WSS
+ // preferredNetworkRequester:
+ // "CTDxrcXgrZHWyCWnuCgjpJPghQUcEVz1HkhUr5mGdFnT.3UAww1YWNyVNYNWFQL1LaHYouQtDiXBGK5GiDZgpXkTK@2RFtU5BwxvJJXagAWAEuaPgb5ZVPRoy2542TT93Edw6v",
mixFetchOverride: {
requestTimeoutMs: 60_000,
},
diff --git a/documentation/docs/package.json b/documentation/docs/package.json
index 8ff630dad49..c66bed76980 100644
--- a/documentation/docs/package.json
+++ b/documentation/docs/package.json
@@ -38,8 +38,8 @@
"@nextui-org/accordion": "^2.0.40",
"@nextui-org/react": "^2.4.8",
"@nymproject/contract-clients": ">=1.2.4-rc.2 || ^1",
- "@nymproject/mix-fetch-full-fat": ">=1.2.4-rc.2 || ^1",
- "@nymproject/sdk-full-fat": ">=1.2.4-rc.2 || ^1",
+ "@nymproject/mix-fetch-full-fat": ">=1.5.1-rc.0 || ^1.4.1",
+ "@nymproject/sdk-full-fat": ">=1.5.1-rc.0 || ^1.4.1",
"@redocly/cli": "^1.25.15",
"@types/mdx": "^2.0.13",
"chain-registry": "^1.19.0",
diff --git a/documentation/docs/pnpm-lock.yaml b/documentation/docs/pnpm-lock.yaml
index 3fa8337bc49..1ff947d4a02 100644
--- a/documentation/docs/pnpm-lock.yaml
+++ b/documentation/docs/pnpm-lock.yaml
@@ -78,11 +78,11 @@ importers:
specifier: '>=1.2.4-rc.2 || ^1'
version: 1.4.1
'@nymproject/mix-fetch-full-fat':
- specifier: '>=1.2.4-rc.2 || ^1'
- version: 1.2.3
+ specifier: '>=1.5.1-rc.0 || ^1.4.1'
+ version: 1.4.1
'@nymproject/sdk-full-fat':
- specifier: '>=1.2.4-rc.2 || ^1'
- version: 1.2.3
+ specifier: '>=1.5.1-rc.0 || ^1.4.1'
+ version: 1.4.1
'@redocly/cli':
specifier: ^1.25.15
version: 1.34.5(ajv@8.17.1)
@@ -1679,11 +1679,11 @@ packages:
'@nymproject/contract-clients@1.4.1':
resolution: {integrity: sha512-HuJZ4Hv+Rl6ZZEtCHKgurNLJapM+QQRJlGkevFH2a4UdqUqF9omUkUi3AVes4679dPoSFgvA7plyVSDBdbgV6w==}
- '@nymproject/mix-fetch-full-fat@1.2.3':
- resolution: {integrity: sha512-5yAQhw33LC0cNsyV0Rj+LIa2kvJY+8jsfgOSr1aeKNfQ7dG4fngWkKnGUbPGzhUTJjqgXPTwNVeJSd6hwGim+g==}
+ '@nymproject/mix-fetch-full-fat@1.4.1':
+ resolution: {integrity: sha512-AMa21sEd9FELqAJe1lCyHPqxxbc13ApiJ1P/exAslQjiFPb/de/3Ow0FHqKGNPrwyVRS/T2pSzjQ3l8TddiEBA==}
- '@nymproject/sdk-full-fat@1.2.3':
- resolution: {integrity: sha512-lheA1Zk020o2t95FPVZfdUR0aSI52aD0aJQs074fjH16QkoNNEMotzhJGAnsnnczVg3bpddKghNpCLyDOWvg9A==}
+ '@nymproject/sdk-full-fat@1.4.1':
+ resolution: {integrity: sha512-dh5bvMUj3m8nEssvO8Nl66WpcJAjwRZrGNwqfczJWLG4nX3Vt95tPLv4v0/Z1W3DQWQFW6WmEPPYHNjl18V/fA==}
'@opentelemetry/api-logs@0.53.0':
resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==}
@@ -9247,9 +9247,9 @@ snapshots:
'@nymproject/contract-clients@1.4.1': {}
- '@nymproject/mix-fetch-full-fat@1.2.3': {}
+ '@nymproject/mix-fetch-full-fat@1.4.1': {}
- '@nymproject/sdk-full-fat@1.2.3': {}
+ '@nymproject/sdk-full-fat@1.4.1': {}
'@opentelemetry/api-logs@0.53.0':
dependencies:
diff --git a/explorer-v2/next.config.js b/explorer-v2/next.config.js
index ba18864d7e6..86f3fcc2e12 100644
--- a/explorer-v2/next.config.js
+++ b/explorer-v2/next.config.js
@@ -2,23 +2,23 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
- reactStrictMode: true,
+ reactStrictMode: true,
- basePath: "/explorer",
- assetPrefix: "/explorer",
- trailingSlash: false,
+ basePath: "/explorer",
+ assetPrefix: "/explorer",
+ trailingSlash: false,
- async redirects() {
- return [
- // Change the basePath to /explorer
- {
- source: "/",
- destination: "/explorer",
- basePath: false,
- permanent: true,
- },
- ];
- },
+ async redirects() {
+ return [
+ // Change the basePath to /explorer
+ {
+ source: "/",
+ destination: "/explorer",
+ basePath: false,
+ permanent: true,
+ },
+ ];
+ },
};
-module.exports = nextConfig
\ No newline at end of file
+module.exports = nextConfig;
diff --git a/explorer-v2/src/components/search/NodeAndAddressSearch.tsx b/explorer-v2/src/components/search/NodeAndAddressSearch.tsx
index 22eca32f4e2..6f0de3a6da4 100644
--- a/explorer-v2/src/components/search/NodeAndAddressSearch.tsx
+++ b/explorer-v2/src/components/search/NodeAndAddressSearch.tsx
@@ -1,5 +1,6 @@
"use client";
import type { IObservatoryNode } from "@/app/api/types";
+import { NYM_ACCOUNT_ADDRESS } from "@/app/api/urls";
import { Search } from "@mui/icons-material";
import {
Autocomplete,
@@ -13,7 +14,6 @@ import { useQuery } from "@tanstack/react-query";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { fetchObservatoryNodes } from "../../app/api";
-import { NYM_ACCOUNT_ADDRESS } from "@/app/api/urls";
const NodeAndAddressSearch = () => {
const router = useRouter();
@@ -50,7 +50,7 @@ const NodeAndAddressSearch = () => {
}
} catch {
setErrorText(
- "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again."
+ "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again.",
);
setIsLoading(false); // Stop loading
@@ -58,7 +58,7 @@ const NodeAndAddressSearch = () => {
}
} else {
setErrorText(
- "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again."
+ "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again.",
);
setIsLoading(false); // Stop loading
@@ -68,7 +68,7 @@ const NodeAndAddressSearch = () => {
// Check if it's a node identity key
if (nymNodes) {
const matchingNode = nymNodes.find(
- (node) => node.identity_key === inputValue
+ (node) => node.identity_key === inputValue,
);
if (matchingNode) {
@@ -77,13 +77,13 @@ const NodeAndAddressSearch = () => {
}
}
setErrorText(
- "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again."
+ "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again.",
);
setIsLoading(false);
}
} catch (error) {
setErrorText(
- "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again."
+ "No node found with the provided Name, Node ID or Identity Key. Please check your input and try again.",
);
console.error(error);
setIsLoading(false); // Stop loading
@@ -92,7 +92,7 @@ const NodeAndAddressSearch = () => {
// Handle search input change
const handleSearchInputChange = (
- event: React.ChangeEvent
+ event: React.ChangeEvent,
) => {
const value = event.target.value;
setInputValue(value);
@@ -107,7 +107,7 @@ const NodeAndAddressSearch = () => {
const filteredNodes = nymNodes.filter((node) =>
node.self_description?.moniker
?.toLowerCase()
- .includes(value.toLowerCase())
+ .includes(value.toLowerCase()),
);
setSearchOptions(filteredNodes);
} else {
@@ -118,7 +118,7 @@ const NodeAndAddressSearch = () => {
// Handle node selection from dropdown
const handleNodeSelect = (
event: React.SyntheticEvent,
- value: string | IObservatoryNode | null
+ value: string | IObservatoryNode | null,
) => {
if (value && typeof value !== "string") {
setIsLoading(true); // Show loading spinner
diff --git a/nym-browser-extension/storage/Cargo.toml b/nym-browser-extension/storage/Cargo.toml
index ec61e945b8a..61a34e51e77 100644
--- a/nym-browser-extension/storage/Cargo.toml
+++ b/nym-browser-extension/storage/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "extension-storage"
-version = "1.4.0-rc.0"
+version = "1.4.1"
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/nymtech/nym"
diff --git a/nym-wallet/package.json b/nym-wallet/package.json
index 6702636f1c4..190dadbc1ac 100644
--- a/nym-wallet/package.json
+++ b/nym-wallet/package.json
@@ -32,7 +32,7 @@
"@mui/styles": "^5.2.2",
"@mui/utils": "^5.7.0",
"@nymproject/mui-theme": "^1.0.0",
- "@nymproject/node-tester": "^1.2.3",
+ "@nymproject/node-tester": "^1.3.1",
"@nymproject/react": "^1.0.0",
"@nymproject/types": "^1.0.0",
"@storybook/react": "^6.5.15",
@@ -80,6 +80,7 @@
"@types/big.js": "^6.1.6",
"@types/bs58": "^4.0.1",
"@types/jest": "^27.0.1",
+ "@types/minimatch": "5.1.2",
"@types/node": "^16.7.13",
"@types/qrcode.react": "^1.0.2",
"@types/react": "^18.0.26",
@@ -131,5 +132,8 @@
"webpack-favicons": "^1.3.8",
"webpack-merge": "^5.8.0"
},
+ "resolutions": {
+ "@types/minimatch": "5.1.2"
+ },
"private": false
}
\ No newline at end of file
diff --git a/nym-wallet/src/components/Buy/Tutorial.tsx b/nym-wallet/src/components/Buy/Tutorial.tsx
index d3e0a11fceb..4db45f68448 100644
--- a/nym-wallet/src/components/Buy/Tutorial.tsx
+++ b/nym-wallet/src/components/Buy/Tutorial.tsx
@@ -1,32 +1,32 @@
import React from 'react';
import { Box, Typography, Grid, Link, Card, CardContent, Stack } from '@mui/material';
-import { NymCard } from '..';
import BitfinexIcon from 'src/svg-icons/bitfinex.svg';
import KrakenIcon from 'src/svg-icons/kraken.svg';
import BybitIcon from 'src/svg-icons/bybit.svg';
import GateIcon from 'src/svg-icons/gate22.svg';
import HTXIcon from 'src/svg-icons/htx.svg';
+import { NymCard } from '..';
-const ExchangeCard = ({
- name,
- tokenType,
- url,
- IconComponent
+const ExchangeCard = ({
+ name,
+ tokenType,
+ url,
+ IconComponent,
}: {
name: string;
tokenType: string;
url: string;
IconComponent: React.FunctionComponent>;
}) => (
-
@@ -51,17 +51,17 @@ const ExchangeCard = ({
{tokenType}
-
GET NYM
@@ -78,44 +78,40 @@ export const Tutorial = () => {
name: 'Bitfinex',
tokenType: 'Native NYM, ERC-20',
url: 'https://www.bitfinex.com/',
- IconComponent: BitfinexIcon
+ IconComponent: BitfinexIcon,
},
{
name: 'Kraken',
tokenType: 'Native NYM',
url: 'https://www.kraken.com/',
- IconComponent: KrakenIcon
+ IconComponent: KrakenIcon,
},
{
name: 'Bybit',
tokenType: 'ERC-20',
url: 'https://www.bybit.com/en/',
- IconComponent: BybitIcon
+ IconComponent: BybitIcon,
},
{
name: 'Gate.io',
tokenType: 'ERC-20',
url: 'https://www.gate.io/',
- IconComponent: GateIcon
+ IconComponent: GateIcon,
},
{
name: 'HTX',
tokenType: 'ERC-20',
url: 'https://www.htx.com/',
- IconComponent: HTXIcon
+ IconComponent: HTXIcon,
},
];
return (
-
+
You can get NYM tokens from these exchanges
-
+
{exchanges.map((exchange) => (
diff --git a/package.json b/package.json
index 01701583898..febd76c583a 100644
--- a/package.json
+++ b/package.json
@@ -1,66 +1,67 @@
{
"name": "@nymproject/nymsphere",
- "version": "1.0.0",
- "private": true,
+ "version": "1.0.1",
"license": "Apache 2.0",
- "workspaces": [
- "sdk/typescript/packages/**",
- "sdk/typescript/examples/**",
- "ts-packages/*",
- "nym-wallet",
- "explorer-nextjs",
- "explorer-v2",
- "types",
- "clients/validator",
- "sdk/typescript/packages/**",
- "sdk/typescript/examples/**",
- "sdk/typescript/codegen/**"
- ],
"scripts": {
- "nuke": "npx rimraf **/node_modules node_modules",
- "scrub": "npx rimraf **/dist dist",
- "clean": "lerna run clean",
+ "audit:fix": "npm_config_yes=true npx yarn-audit-fix -- --dry-run",
"build": "run-s build:types build:packages",
- "build:wasm": "make sdk-wasm-build",
- "build:types": "lerna run --scope @nymproject/types build --stream",
+ "build:ci": "run-s build:types build:packages build:wasm build:ci:sdk",
+ "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream",
+ "build:ci:storybook": "yarn build && yarn dev:on && run-p build:playground && yarn build:ci:storybook:collect-artifacts ",
+ "build:ci:storybook:collect-artifacts": "mkdir -p ts-packages/dist && mv sdk/typescript/packages/react-components/storybook-static ts-packages/dist/storybook ",
"build:packages": "run-s build:packages:theme build:packages:react",
- "build:packages:theme": "lerna run --scope @nymproject/mui-theme build",
"build:packages:react": "lerna run --scope @nymproject/react build",
+ "build:packages:theme": "lerna run --scope @nymproject/mui-theme build",
"build:playground": "lerna run --scope @nymproject/react storybook:build --stream",
- "build:ci:storybook": "yarn build && yarn dev:on && run-p build:playground && yarn build:ci:storybook:collect-artifacts ",
- "build:ci:storybook:collect-artifacts": "mkdir -p ts-packages/dist && mv sdk/typescript/packages/react-components/storybook-static ts-packages/dist/storybook ",
- "prebuild:ci": "yarn dev:on && yarn",
- "build:ci": "run-s build:types build:packages build:wasm build:ci:sdk",
- "postbuild:ci": "yarn dev:off",
- "build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream",
+ "build:types": "lerna run --scope @nymproject/types build --stream",
+ "build:wasm": "make sdk-wasm-build",
+ "clean": "lerna run clean",
+ "dev:off": "node sdk/typescript/scripts/dev-mode-remove.mjs",
+ "dev:on": "node sdk/typescript/scripts/dev-mode-add.mjs",
"docs:prod:build": "run-s docs:prod:build:ws",
"docs:prod:build:ws": "lerna run docs:prod:build --stream",
- "sdk:build": "./sdk/typescript/scripts/build-prod-sdk.sh",
- "sdk:publish": "./sdk/typescript/scripts/publish.sh",
"lint": "lerna run lint --stream",
"lint:fix": "lerna run lint:fix --stream",
+ "nuke": "npx rimraf **/node_modules node_modules",
+ "postbuild:ci": "yarn dev:off",
+ "prebuild:ci": "yarn dev:on && yarn",
+ "scrub": "npx rimraf **/dist dist",
+ "sdk:build": "./sdk/typescript/scripts/build-prod-sdk.sh",
+ "sdk:publish": "./sdk/typescript/scripts/publish.sh",
+ "sdk:versions:add-rc": "cargo run -p sdk-version-bump --pre-release",
+ "sdk:versions:bump": "cargo run -p sdk-version-bump bump-version",
+ "sdk:versions:remove-rc": "cargo run -p sdk-version-bump remove-suffix",
"tsc": "lerna run tsc --stream",
- "types:lint:fix": "lerna run lint:fix --scope @nymproject/types --scope @nymproject/nym-wallet-app",
- "audit:fix": "npm_config_yes=true npx yarn-audit-fix -- --dry-run",
- "dev:on": "node sdk/typescript/scripts/dev-mode-add.mjs",
- "dev:off": "node sdk/typescript/scripts/dev-mode-remove.mjs"
+ "types:lint:fix": "lerna run lint:fix --scope @nymproject/types --scope @nymproject/nym-wallet-app"
+ },
+ "dependencies": {
+ "lucide-react": "^0.453.0"
},
"devDependencies": {
"@npmcli/node-gyp": "^3.0.0",
- "@types/minimatch": "^6.0.0",
+ "@types/minimatch": "5.1.2",
"lerna": "^7.3.0",
"node-gyp": "^9.3.1",
"npm-run-all": "^4.1.5",
"tslog": "3.3.3"
},
- "dependencies": {
- "lucide-react": "^0.453.0"
- },
+ "private": true,
"resolutions": {
"@cosmjs/amino": "^0.32.4",
+ "@cosmjs/cosmwasm-stargate": "^0.32.4",
"@cosmjs/proto-signing": "^0.32.4",
"@cosmjs/stargate": "^0.32.4",
- "@cosmjs/cosmwasm-stargate": "^0.32.4",
- "cosmjs-types": "^0.9.0"
- }
-}
+ "cosmjs-types": "^0.9.0",
+ "@types/minimatch": "5.1.2"
+ },
+ "workspaces": [
+ "ts-packages/*",
+ "nym-wallet",
+ "explorer-nextjs",
+ "explorer-v2",
+ "types",
+ "sdk/typescript/packages/mix-fetch/internal-dev",
+ "sdk/typescript/packages/react-components",
+ "sdk/typescript/packages/mui-theme"
+ ]
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/build.mjs b/sdk/typescript/codegen/contract-clients/build.mjs
index 5a6b6220f63..ffc5cd40054 100644
--- a/sdk/typescript/codegen/contract-clients/build.mjs
+++ b/sdk/typescript/codegen/contract-clients/build.mjs
@@ -3,13 +3,11 @@ import codegen from '@cosmwasm/ts-codegen';
codegen
.default({
contracts: [
- { name: 'coconut-bandwidth', dir: '../../../../contracts/coconut-bandwidth' },
+ { name: 'ecash', dir: '../../../../contracts/ecash' },
{ name: 'coconut-dkg', dir: '../../../../contracts/coconut-dkg' },
{ name: 'mixnet', dir: '../../../../contracts/mixnet' },
{ name: 'cw3-flex-multisig', dir: '../../../../contracts/multisig/cw3-flex-multisig' },
{ name: 'cw4-group', dir: '../../../../contracts/multisig/cw4-group' },
- { name: 'name-service', dir: '../../../../contracts/name-service' },
- { name: 'service-provider-directory', dir: '../../../../contracts/service-provider-directory' },
{ name: 'vesting', dir: '../../../../contracts/vesting' },
],
outPath: './src',
diff --git a/sdk/typescript/codegen/contract-clients/package.json b/sdk/typescript/codegen/contract-clients/package.json
index f429659cbba..3be66eff663 100644
--- a/sdk/typescript/codegen/contract-clients/package.json
+++ b/sdk/typescript/codegen/contract-clients/package.json
@@ -1,6 +1,6 @@
{
"name": "@nymproject/contract-clients",
- "version": "1.3.0-rc.0",
+ "version": "1.3.1-rc0",
"description": "A client for all Nym smart contracts",
"license": "Apache-2.0",
"author": "Nym Technologies SA",
@@ -18,7 +18,7 @@
"docs:watch": "nodemon --ext ts --watch './src/**/*' --watch './typedoc.json' --exec \"yarn docs:generate\""
},
"devDependencies": {
- "@cosmwasm/ts-codegen": "^0.35.3",
+ "@cosmwasm/ts-codegen": "^1.13.3",
"nodemon": "3.0.1",
"npm-run-all": "^4.1.5",
"reload": "^3.2.1",
@@ -27,4 +27,4 @@
},
"private": false,
"types": "./dist/index.d.ts"
-}
\ No newline at end of file
+}
diff --git a/sdk/typescript/codegen/contract-clients/src/CoconutDkg.client.ts b/sdk/typescript/codegen/contract-clients/src/CoconutDkg.client.ts
index c86b48d22c6..cb960c87c02 100644
--- a/sdk/typescript/codegen/contract-clients/src/CoconutDkg.client.ts
+++ b/sdk/typescript/codegen/contract-clients/src/CoconutDkg.client.ts
@@ -1,46 +1,126 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
-import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
-import { Coin, StdFee } from "@cosmjs/amino";
-import { InstantiateMsg, TimeConfiguration, ExecuteMsg, ContractSafeBytes, Addr, QueryMsg, MigrateMsg, PagedDealerResponse, DealerDetails, Timestamp, Uint64, EpochState, Epoch, DealerType, DealerDetailsResponse, PagedDealingsResponse, ContractDealing, NullableInitialReplacementData, InitialReplacementData, PagedVKSharesResponse, ContractVKShare } from "./CoconutDkg.types";
-
+import { ICosmWasmClient, ISigningCosmWasmClient } from "./baseClient";
+import { Coin, StdFee } from "@interchainjs/types";
+import { InstantiateMsg, TimeConfiguration, ExecuteMsg, ContractSafeBytes, DealingChunkInfo, PartialContractDealing, QueryMsg, MigrateMsg, EpochState, Timestamp, Uint64, StateAdvanceResponse, StateProgress, ContractVersion, Addr, PagedDealerResponse, DealerDetails, Epoch, DealerDealingsStatusResponse, DealerType, DealerDetailsResponse, PagedDealerIndexResponse, DealingChunkResponse, DealingChunkStatusResponse, ChunkSubmissionStatus, DealingStatusResponse, DealingStatus, DealingMetadataResponse, DealingMetadata, PagedDealerAddressesResponse, NullableEpoch, RegisteredDealerDetails, DealerRegistrationDetails, Cw4Contract, State, VkShareResponse, ContractVKShare, PagedVKSharesResponse } from "./CoconutDkg.types";
export interface CoconutDkgReadOnlyInterface {
contractAddress: string;
+ getState: () => Promise;
getCurrentEpochState: () => Promise;
+ getEpochStateAtHeight: ({
+ height
+ }: {
+ height: number;
+ }) => Promise;
getCurrentEpochThreshold: () => Promise;
- getInitialDealers: () => Promise;
+ getEpochThreshold: ({
+ epochId
+ }: {
+ epochId: number;
+ }) => Promise;
+ canAdvanceState: () => Promise;
+ getRegisteredDealer: ({
+ dealerAddress,
+ epochId
+ }: {
+ dealerAddress: string;
+ epochId?: number;
+ }) => Promise;
getDealerDetails: ({
dealerAddress
}: {
dealerAddress: string;
}) => Promise;
- getCurrentDealers: ({
+ getEpochDealersAddresses: ({
+ epochId,
+ limit,
+ startAfter
+ }: {
+ epochId: number;
+ limit?: number;
+ startAfter?: string;
+ }) => Promise;
+ getEpochDealers: ({
+ epochId,
limit,
startAfter
}: {
+ epochId: number;
limit?: number;
startAfter?: string;
}) => Promise;
- getPastDealers: ({
+ getCurrentDealers: ({
limit,
startAfter
}: {
limit?: number;
startAfter?: string;
}) => Promise;
- getDealing: ({
- idx,
+ getDealerIndices: ({
limit,
startAfter
}: {
- idx: number;
limit?: number;
startAfter?: string;
- }) => Promise;
+ }) => Promise;
+ getDealingsMetadata: ({
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }) => Promise;
+ getDealerDealingsStatus: ({
+ dealer,
+ epochId
+ }: {
+ dealer: string;
+ epochId: number;
+ }) => Promise;
+ getDealingStatus: ({
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }) => Promise;
+ getDealingChunkStatus: ({
+ chunkIndex,
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ chunkIndex: number;
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }) => Promise;
+ getDealingChunk: ({
+ chunkIndex,
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ chunkIndex: number;
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }) => Promise;
+ getVerificationKey: ({
+ epochId,
+ owner
+ }: {
+ epochId: number;
+ owner: string;
+ }) => Promise;
getVerificationKeys: ({
epochId,
limit,
@@ -50,37 +130,89 @@ export interface CoconutDkgReadOnlyInterface {
limit?: number;
startAfter?: string;
}) => Promise;
+ getCw2ContractVersion: () => Promise;
}
export class CoconutDkgQueryClient implements CoconutDkgReadOnlyInterface {
- client: CosmWasmClient;
+ client: ICosmWasmClient;
contractAddress: string;
-
- constructor(client: CosmWasmClient, contractAddress: string) {
+ constructor(client: ICosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
+ this.getState = this.getState.bind(this);
this.getCurrentEpochState = this.getCurrentEpochState.bind(this);
+ this.getEpochStateAtHeight = this.getEpochStateAtHeight.bind(this);
this.getCurrentEpochThreshold = this.getCurrentEpochThreshold.bind(this);
- this.getInitialDealers = this.getInitialDealers.bind(this);
+ this.getEpochThreshold = this.getEpochThreshold.bind(this);
+ this.canAdvanceState = this.canAdvanceState.bind(this);
+ this.getRegisteredDealer = this.getRegisteredDealer.bind(this);
this.getDealerDetails = this.getDealerDetails.bind(this);
+ this.getEpochDealersAddresses = this.getEpochDealersAddresses.bind(this);
+ this.getEpochDealers = this.getEpochDealers.bind(this);
this.getCurrentDealers = this.getCurrentDealers.bind(this);
- this.getPastDealers = this.getPastDealers.bind(this);
- this.getDealing = this.getDealing.bind(this);
+ this.getDealerIndices = this.getDealerIndices.bind(this);
+ this.getDealingsMetadata = this.getDealingsMetadata.bind(this);
+ this.getDealerDealingsStatus = this.getDealerDealingsStatus.bind(this);
+ this.getDealingStatus = this.getDealingStatus.bind(this);
+ this.getDealingChunkStatus = this.getDealingChunkStatus.bind(this);
+ this.getDealingChunk = this.getDealingChunk.bind(this);
+ this.getVerificationKey = this.getVerificationKey.bind(this);
this.getVerificationKeys = this.getVerificationKeys.bind(this);
+ this.getCw2ContractVersion = this.getCw2ContractVersion.bind(this);
}
-
+ getState = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_state: {}
+ });
+ };
getCurrentEpochState = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_current_epoch_state: {}
});
};
+ getEpochStateAtHeight = async ({
+ height
+ }: {
+ height: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_epoch_state_at_height: {
+ height
+ }
+ });
+ };
getCurrentEpochThreshold = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_current_epoch_threshold: {}
});
};
- getInitialDealers = async (): Promise => {
+ getEpochThreshold = async ({
+ epochId
+ }: {
+ epochId: number;
+ }): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_initial_dealers: {}
+ get_epoch_threshold: {
+ epoch_id: epochId
+ }
+ });
+ };
+ canAdvanceState = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ can_advance_state: {}
+ });
+ };
+ getRegisteredDealer = async ({
+ dealerAddress,
+ epochId
+ }: {
+ dealerAddress: string;
+ epochId?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_registered_dealer: {
+ dealer_address: dealerAddress,
+ epoch_id: epochId
+ }
});
};
getDealerDetails = async ({
@@ -94,21 +226,41 @@ export class CoconutDkgQueryClient implements CoconutDkgReadOnlyInterface {
}
});
};
- getCurrentDealers = async ({
+ getEpochDealersAddresses = async ({
+ epochId,
limit,
startAfter
}: {
+ epochId: number;
+ limit?: number;
+ startAfter?: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_epoch_dealers_addresses: {
+ epoch_id: epochId,
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getEpochDealers = async ({
+ epochId,
+ limit,
+ startAfter
+ }: {
+ epochId: number;
limit?: number;
startAfter?: string;
}): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_current_dealers: {
+ get_epoch_dealers: {
+ epoch_id: epochId,
limit,
start_after: startAfter
}
});
};
- getPastDealers = async ({
+ getCurrentDealers = async ({
limit,
startAfter
}: {
@@ -116,29 +268,128 @@ export class CoconutDkgQueryClient implements CoconutDkgReadOnlyInterface {
startAfter?: string;
}): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_past_dealers: {
+ get_current_dealers: {
limit,
start_after: startAfter
}
});
};
- getDealing = async ({
- idx,
+ getDealerIndices = async ({
limit,
startAfter
}: {
- idx: number;
limit?: number;
startAfter?: string;
- }): Promise => {
+ }): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_dealing: {
- idx,
+ get_dealer_indices: {
limit,
start_after: startAfter
}
});
};
+ getDealingsMetadata = async ({
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_dealings_metadata: {
+ dealer,
+ dealing_index: dealingIndex,
+ epoch_id: epochId
+ }
+ });
+ };
+ getDealerDealingsStatus = async ({
+ dealer,
+ epochId
+ }: {
+ dealer: string;
+ epochId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_dealer_dealings_status: {
+ dealer,
+ epoch_id: epochId
+ }
+ });
+ };
+ getDealingStatus = async ({
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_dealing_status: {
+ dealer,
+ dealing_index: dealingIndex,
+ epoch_id: epochId
+ }
+ });
+ };
+ getDealingChunkStatus = async ({
+ chunkIndex,
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ chunkIndex: number;
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_dealing_chunk_status: {
+ chunk_index: chunkIndex,
+ dealer,
+ dealing_index: dealingIndex,
+ epoch_id: epochId
+ }
+ });
+ };
+ getDealingChunk = async ({
+ chunkIndex,
+ dealer,
+ dealingIndex,
+ epochId
+ }: {
+ chunkIndex: number;
+ dealer: string;
+ dealingIndex: number;
+ epochId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_dealing_chunk: {
+ chunk_index: chunkIndex,
+ dealer,
+ dealing_index: dealingIndex,
+ epoch_id: epochId
+ }
+ });
+ };
+ getVerificationKey = async ({
+ epochId,
+ owner
+ }: {
+ epochId: number;
+ owner: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_verification_key: {
+ epoch_id: epochId,
+ owner
+ }
+ });
+ };
getVerificationKeys = async ({
epochId,
limit,
@@ -156,91 +407,142 @@ export class CoconutDkgQueryClient implements CoconutDkgReadOnlyInterface {
}
});
};
+ getCw2ContractVersion = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_cw2_contract_version: {}
+ });
+ };
}
export interface CoconutDkgInterface extends CoconutDkgReadOnlyInterface {
contractAddress: string;
sender: string;
+ initiateDkg: (fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
registerDealer: ({
announceAddress,
bteKeyWithProof,
+ identityKey,
resharing
}: {
announceAddress: string;
bteKeyWithProof: string;
+ identityKey: string;
resharing: boolean;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
- commitDealing: ({
- dealingBytes,
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ commitDealingsMetadata: ({
+ chunks,
+ dealingIndex,
resharing
}: {
- dealingBytes: ContractSafeBytes;
+ chunks: DealingChunkInfo[];
+ dealingIndex: number;
resharing: boolean;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ commitDealingsChunk: ({
+ chunk
+ }: {
+ chunk: PartialContractDealing;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
commitVerificationKeyShare: ({
resharing,
share
}: {
resharing: boolean;
share: string;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
verifyVerificationKeyShare: ({
owner,
resharing
}: {
- owner: Addr;
+ owner: string;
resharing: boolean;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
- surpassedThreshold: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
- advanceEpochState: (fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ advanceEpochState: (fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ triggerReset: (fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ triggerResharing: (fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ transferOwnership: ({
+ transferTo
+ }: {
+ transferTo: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ updateAnnounceAddress: ({
+ newAddress
+ }: {
+ newAddress: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
}
export class CoconutDkgClient extends CoconutDkgQueryClient implements CoconutDkgInterface {
- client: SigningCosmWasmClient;
+ client: ISigningCosmWasmClient;
sender: string;
contractAddress: string;
-
- constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
+ constructor(client: ISigningCosmWasmClient, sender: string, contractAddress: string) {
super(client, contractAddress);
this.client = client;
this.sender = sender;
this.contractAddress = contractAddress;
+ this.initiateDkg = this.initiateDkg.bind(this);
this.registerDealer = this.registerDealer.bind(this);
- this.commitDealing = this.commitDealing.bind(this);
+ this.commitDealingsMetadata = this.commitDealingsMetadata.bind(this);
+ this.commitDealingsChunk = this.commitDealingsChunk.bind(this);
this.commitVerificationKeyShare = this.commitVerificationKeyShare.bind(this);
this.verifyVerificationKeyShare = this.verifyVerificationKeyShare.bind(this);
- this.surpassedThreshold = this.surpassedThreshold.bind(this);
this.advanceEpochState = this.advanceEpochState.bind(this);
+ this.triggerReset = this.triggerReset.bind(this);
+ this.triggerResharing = this.triggerResharing.bind(this);
+ this.transferOwnership = this.transferOwnership.bind(this);
+ this.updateAnnounceAddress = this.updateAnnounceAddress.bind(this);
}
-
+ initiateDkg = async (fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ initiate_dkg: {}
+ }, fee_, memo_, funds_);
+ };
registerDealer = async ({
announceAddress,
bteKeyWithProof,
+ identityKey,
resharing
}: {
announceAddress: string;
bteKeyWithProof: string;
+ identityKey: string;
resharing: boolean;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
register_dealer: {
announce_address: announceAddress,
bte_key_with_proof: bteKeyWithProof,
+ identity_key: identityKey,
resharing
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
- commitDealing = async ({
- dealingBytes,
+ commitDealingsMetadata = async ({
+ chunks,
+ dealingIndex,
resharing
}: {
- dealingBytes: ContractSafeBytes;
+ chunks: DealingChunkInfo[];
+ dealingIndex: number;
resharing: boolean;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
- commit_dealing: {
- dealing_bytes: dealingBytes,
+ commit_dealings_metadata: {
+ chunks,
+ dealing_index: dealingIndex,
resharing
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
+ };
+ commitDealingsChunk = async ({
+ chunk
+ }: {
+ chunk: PartialContractDealing;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ commit_dealings_chunk: {
+ chunk
+ }
+ }, fee_, memo_, funds_);
};
commitVerificationKeyShare = async ({
resharing,
@@ -248,36 +550,63 @@ export class CoconutDkgClient extends CoconutDkgQueryClient implements CoconutDk
}: {
resharing: boolean;
share: string;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
commit_verification_key_share: {
resharing,
share
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
verifyVerificationKeyShare = async ({
owner,
resharing
}: {
- owner: Addr;
+ owner: string;
resharing: boolean;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
verify_verification_key_share: {
owner,
resharing
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
- surpassedThreshold = async (fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ advanceEpochState = async (fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
- surpassed_threshold: {}
- }, fee, memo, _funds);
+ advance_epoch_state: {}
+ }, fee_, memo_, funds_);
};
- advanceEpochState = async (fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ triggerReset = async (fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
- advance_epoch_state: {}
- }, fee, memo, _funds);
+ trigger_reset: {}
+ }, fee_, memo_, funds_);
};
-}
+ triggerResharing = async (fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ trigger_resharing: {}
+ }, fee_, memo_, funds_);
+ };
+ transferOwnership = async ({
+ transferTo
+ }: {
+ transferTo: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ transfer_ownership: {
+ transfer_to: transferTo
+ }
+ }, fee_, memo_, funds_);
+ };
+ updateAnnounceAddress = async ({
+ newAddress
+ }: {
+ newAddress: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ update_announce_address: {
+ new_address: newAddress
+ }
+ }, fee_, memo_, funds_);
+ };
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/CoconutDkg.types.ts b/sdk/typescript/codegen/contract-clients/src/CoconutDkg.types.ts
index 1f90bc5ed38..36483df717f 100644
--- a/sdk/typescript/codegen/contract-clients/src/CoconutDkg.types.ts
+++ b/sdk/typescript/codegen/contract-clients/src/CoconutDkg.types.ts
@@ -1,11 +1,12 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
export interface InstantiateMsg {
group_addr: string;
+ key_size: number;
mix_denom: string;
multisig_addr: string;
time_configuration?: TimeConfiguration | null;
@@ -19,16 +20,24 @@ export interface TimeConfiguration {
verification_key_validation_time_secs: number;
}
export type ExecuteMsg = {
+ initiate_dkg: {};
+} | {
register_dealer: {
announce_address: string;
bte_key_with_proof: string;
+ identity_key: string;
resharing: boolean;
};
} | {
- commit_dealing: {
- dealing_bytes: ContractSafeBytes;
+ commit_dealings_metadata: {
+ chunks: DealingChunkInfo[];
+ dealing_index: number;
resharing: boolean;
};
+} | {
+ commit_dealings_chunk: {
+ chunk: PartialContractDealing;
+ };
} | {
commit_verification_key_share: {
resharing: boolean;
@@ -36,64 +45,127 @@ export type ExecuteMsg = {
};
} | {
verify_verification_key_share: {
- owner: Addr;
+ owner: string;
resharing: boolean;
};
-} | {
- surpassed_threshold: {};
} | {
advance_epoch_state: {};
+} | {
+ trigger_reset: {};
+} | {
+ trigger_resharing: {};
+} | {
+ transfer_ownership: {
+ transfer_to: string;
+ };
+} | {
+ update_announce_address: {
+ new_address: string;
+ };
};
export type ContractSafeBytes = number[];
-export type Addr = string;
+export interface DealingChunkInfo {
+ size: number;
+}
+export interface PartialContractDealing {
+ chunk_index: number;
+ data: ContractSafeBytes;
+ dealing_index: number;
+}
export type QueryMsg = {
+ get_state: {};
+} | {
get_current_epoch_state: {};
+} | {
+ get_epoch_state_at_height: {
+ height: number;
+ };
} | {
get_current_epoch_threshold: {};
} | {
- get_initial_dealers: {};
+ get_epoch_threshold: {
+ epoch_id: number;
+ };
+} | {
+ can_advance_state: {};
+} | {
+ get_registered_dealer: {
+ dealer_address: string;
+ epoch_id?: number | null;
+ };
} | {
get_dealer_details: {
dealer_address: string;
};
} | {
- get_current_dealers: {
+ get_epoch_dealers_addresses: {
+ epoch_id: number;
+ limit?: number | null;
+ start_after?: string | null;
+ };
+} | {
+ get_epoch_dealers: {
+ epoch_id: number;
limit?: number | null;
start_after?: string | null;
};
} | {
- get_past_dealers: {
+ get_current_dealers: {
limit?: number | null;
start_after?: string | null;
};
} | {
- get_dealing: {
- idx: number;
+ get_dealer_indices: {
limit?: number | null;
start_after?: string | null;
};
+} | {
+ get_dealings_metadata: {
+ dealer: string;
+ dealing_index: number;
+ epoch_id: number;
+ };
+} | {
+ get_dealer_dealings_status: {
+ dealer: string;
+ epoch_id: number;
+ };
+} | {
+ get_dealing_status: {
+ dealer: string;
+ dealing_index: number;
+ epoch_id: number;
+ };
+} | {
+ get_dealing_chunk_status: {
+ chunk_index: number;
+ dealer: string;
+ dealing_index: number;
+ epoch_id: number;
+ };
+} | {
+ get_dealing_chunk: {
+ chunk_index: number;
+ dealer: string;
+ dealing_index: number;
+ epoch_id: number;
+ };
+} | {
+ get_verification_key: {
+ epoch_id: number;
+ owner: string;
+ };
} | {
get_verification_keys: {
epoch_id: number;
limit?: number | null;
start_after?: string | null;
};
+} | {
+ get_cw2_contract_version: {};
};
export interface MigrateMsg {}
-export interface PagedDealerResponse {
- dealers: DealerDetails[];
- per_page: number;
- start_next_after?: Addr | null;
-}
-export interface DealerDetails {
- address: Addr;
- announce_address: string;
- assigned_index: number;
- bte_public_key_with_proof: string;
-}
-export type Timestamp = Uint64;
-export type Uint64 = number;
-export type EpochState = "in_progress" | {
+export type EpochState = ("waiting_initialisation" | "in_progress") | {
public_key_submission: {
resharing: boolean;
};
@@ -114,36 +186,132 @@ export type EpochState = "in_progress" | {
resharing: boolean;
};
};
+export type Timestamp = Uint64;
+export type Uint64 = number;
+export interface StateAdvanceResponse {
+ current_state: EpochState;
+ deadline?: Timestamp | null;
+ is_complete: boolean;
+ progress: StateProgress;
+ reached_deadline: boolean;
+}
+export interface StateProgress {
+ registered_dealers: number;
+ registered_resharing_dealers: number;
+ submitted_dealings: number;
+ submitted_key_shares: number;
+ verified_keys: number;
+}
+export interface ContractVersion {
+ contract: string;
+ version: string;
+}
+export type Addr = string;
+export interface PagedDealerResponse {
+ dealers: DealerDetails[];
+ per_page: number;
+ start_next_after?: Addr | null;
+}
+export interface DealerDetails {
+ address: Addr;
+ announce_address: string;
+ assigned_index: number;
+ bte_public_key_with_proof: string;
+ ed25519_identity: string;
+}
export interface Epoch {
+ deadline?: Timestamp | null;
epoch_id: number;
- finish_timestamp: Timestamp;
state: EpochState;
+ state_progress: StateProgress;
time_configuration: TimeConfiguration;
}
-export type DealerType = "current" | "past" | "unknown";
+export interface DealerDealingsStatusResponse {
+ all_dealings_fully_submitted: boolean;
+ dealer: Addr;
+ dealing_submission_status: {};
+ epoch_id: number;
+}
+export type DealerType = "unknown" | {
+ current: {
+ assigned_index: number;
+ };
+} | {
+ past: {
+ assigned_index: number;
+ };
+};
export interface DealerDetailsResponse {
dealer_type: DealerType;
details?: DealerDetails | null;
}
-export interface PagedDealingsResponse {
- dealings: ContractDealing[];
- per_page: number;
+export interface PagedDealerIndexResponse {
+ indices: [Addr, number][];
start_next_after?: Addr | null;
}
-export interface ContractDealing {
+export interface DealingChunkResponse {
+ chunk?: ContractSafeBytes | null;
+ chunk_index: number;
dealer: Addr;
- dealing: ContractSafeBytes;
+ dealing_index: number;
+ epoch_id: number;
}
-export type NullableInitialReplacementData = InitialReplacementData | null;
-export interface InitialReplacementData {
- initial_dealers: Addr[];
- initial_height: number;
+export interface DealingChunkStatusResponse {
+ chunk_index: number;
+ dealer: Addr;
+ dealing_index: number;
+ epoch_id: number;
+ status: ChunkSubmissionStatus;
}
-export interface PagedVKSharesResponse {
- per_page: number;
- shares: ContractVKShare[];
+export interface ChunkSubmissionStatus {
+ submission_height?: number | null;
+}
+export interface DealingStatusResponse {
+ dealer: Addr;
+ dealing_index: number;
+ epoch_id: number;
+ status: DealingStatus;
+}
+export interface DealingStatus {
+ chunk_submission_status: {};
+ fully_submitted: boolean;
+ has_metadata: boolean;
+}
+export interface DealingMetadataResponse {
+ dealer: Addr;
+ dealing_index: number;
+ epoch_id: number;
+ metadata?: DealingMetadata | null;
+}
+export interface DealingMetadata {
+ dealing_index: number;
+ submitted_chunks: {};
+}
+export interface PagedDealerAddressesResponse {
+ dealers: Addr[];
start_next_after?: Addr | null;
}
+export type NullableEpoch = Epoch | null;
+export interface RegisteredDealerDetails {
+ details?: DealerRegistrationDetails | null;
+}
+export interface DealerRegistrationDetails {
+ announce_address: string;
+ bte_public_key_with_proof: string;
+ ed25519_identity: string;
+}
+export type Cw4Contract = Addr;
+export interface State {
+ group_addr: Cw4Contract;
+ key_size: number;
+ mix_denom: string;
+ multisig_addr: Addr;
+}
+export interface VkShareResponse {
+ epoch_id: number;
+ owner: Addr;
+ share?: ContractVKShare | null;
+}
export interface ContractVKShare {
announce_address: string;
epoch_id: number;
@@ -151,4 +319,9 @@ export interface ContractVKShare {
owner: Addr;
share: string;
verified: boolean;
+}
+export interface PagedVKSharesResponse {
+ per_page: number;
+ shares: ContractVKShare[];
+ start_next_after?: Addr | null;
}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.client.ts b/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.client.ts
index cfe3b9f76f3..cae76780ea5 100644
--- a/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.client.ts
+++ b/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.client.ts
@@ -1,13 +1,12 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
-import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
-import { StdFee } from "@cosmjs/amino";
-import { Executor, Addr, Duration, Uint128, UncheckedDenom, Threshold, Decimal, InstantiateMsg, UncheckedDepositInfo, ExecuteMsg, Expiration, Timestamp, Uint64, CosmosMsgForEmpty, BankMsg, StakingMsg, DistributionMsg, Binary, IbcMsg, WasmMsg, GovMsg, VoteOption, Vote, Coin, Empty, IbcTimeout, IbcTimeoutBlock, MemberChangedHookMsg, MemberDiff, QueryMsg, MigrateMsg, Cw4Contract, Denom, Config, DepositInfo, Status, ThresholdResponse, ProposalListResponseForEmpty, ProposalResponseForEmpty, VoterListResponse, VoterDetail, VoteListResponse, VoteInfo, VoteResponse, VoterResponse } from "./Cw3FlexMultisig.types";
-
+import { ICosmWasmClient, ISigningCosmWasmClient } from "./baseClient";
+import { StdFee } from "@interchainjs/types";
+import { Executor, Addr, Duration, Uint128, UncheckedDenom, Threshold, Decimal, InstantiateMsg, UncheckedDepositInfo, ExecuteMsg, Expiration, Timestamp, Uint64, CosmosMsgForEmpty, BankMsg, WasmMsg, Binary, Vote, Coin, Empty, MemberChangedHookMsg, MemberDiff, QueryMsg, MigrateMsg, Cw4Contract, Denom, Config, DepositInfo, Status, ThresholdResponse, ProposalListResponseForEmpty, ProposalResponseForEmpty, VoterListResponse, VoterDetail, VoteListResponse, VoteInfo, VoteResponse, VoterResponse } from "./Cw3FlexMultisig.types";
export interface Cw3FlexMultisigReadOnlyInterface {
contractAddress: string;
threshold: () => Promise;
@@ -61,10 +60,9 @@ export interface Cw3FlexMultisigReadOnlyInterface {
config: () => Promise;
}
export class Cw3FlexMultisigQueryClient implements Cw3FlexMultisigReadOnlyInterface {
- client: CosmWasmClient;
+ client: ICosmWasmClient;
contractAddress: string;
-
- constructor(client: CosmWasmClient, contractAddress: string) {
+ constructor(client: ICosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
this.threshold = this.threshold.bind(this);
@@ -77,7 +75,6 @@ export class Cw3FlexMultisigQueryClient implements Cw3FlexMultisigReadOnlyInterf
this.listVoters = this.listVoters.bind(this);
this.config = this.config.bind(this);
}
-
threshold = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
threshold: {}
@@ -197,36 +194,35 @@ export interface Cw3FlexMultisigInterface extends Cw3FlexMultisigReadOnlyInterfa
latest?: Expiration;
msgs: CosmosMsgForEmpty[];
title: string;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
- // vote: ({
- // proposalId,
- // vote
- // }: {
- // proposalId: number;
- // vote: Vote;
- // }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ vote: ({
+ proposalId,
+ vote
+ }: {
+ proposalId: number;
+ vote: Vote;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
execute: ({
proposalId
}: {
proposalId: number;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
close: ({
proposalId
}: {
proposalId: number;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
memberChangedHook: ({
diffs
}: {
diffs: MemberDiff[];
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
}
export class Cw3FlexMultisigClient extends Cw3FlexMultisigQueryClient implements Cw3FlexMultisigInterface {
- client: SigningCosmWasmClient;
+ client: ISigningCosmWasmClient;
sender: string;
contractAddress: string;
-
- constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
+ constructor(client: ISigningCosmWasmClient, sender: string, contractAddress: string) {
super(client, contractAddress);
this.client = client;
this.sender = sender;
@@ -237,7 +233,6 @@ export class Cw3FlexMultisigClient extends Cw3FlexMultisigQueryClient implements
this.close = this.close.bind(this);
this.memberChangedHook = this.memberChangedHook.bind(this);
}
-
propose = async ({
description,
latest,
@@ -248,7 +243,7 @@ export class Cw3FlexMultisigClient extends Cw3FlexMultisigQueryClient implements
latest?: Expiration;
msgs: CosmosMsgForEmpty[];
title: string;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
propose: {
description,
@@ -256,53 +251,53 @@ export class Cw3FlexMultisigClient extends Cw3FlexMultisigQueryClient implements
msgs,
title
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
+ };
+ vote = async ({
+ proposalId,
+ vote
+ }: {
+ proposalId: number;
+ vote: Vote;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ vote: {
+ proposal_id: proposalId,
+ vote
+ }
+ }, fee_, memo_, funds_);
};
- // vote = async ({
- // proposalId,
- // vote
- // }: {
- // proposalId: number;
- // vote: Vote;
- // }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
- // return await this.client.execute(this.sender, this.contractAddress, {
- // vote: {
- // proposal_id: proposalId,
- // vote
- // }
- // }, fee, memo, _funds);
- // };
execute = async ({
proposalId
}: {
proposalId: number;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
execute: {
proposal_id: proposalId
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
close = async ({
proposalId
}: {
proposalId: number;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
close: {
proposal_id: proposalId
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
memberChangedHook = async ({
diffs
}: {
diffs: MemberDiff[];
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
member_changed_hook: {
diffs
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
-}
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.types.ts b/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.types.ts
index 570e09b83db..d5fd3376cf4 100644
--- a/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.types.ts
+++ b/sdk/typescript/codegen/contract-clients/src/Cw3FlexMultisig.types.ts
@@ -1,5 +1,5 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
@@ -84,86 +84,17 @@ export type CosmosMsgForEmpty = {
bank: BankMsg;
} | {
custom: Empty;
-} | {
- staking: StakingMsg;
-} | {
- distribution: DistributionMsg;
-} | {
- stargate: {
- type_url: string;
- value: Binary;
- [k: string]: unknown;
- };
-} | {
- ibc: IbcMsg;
} | {
wasm: WasmMsg;
-} | {
- gov: GovMsg;
};
export type BankMsg = {
send: {
amount: Coin[];
to_address: string;
- [k: string]: unknown;
};
} | {
burn: {
amount: Coin[];
- [k: string]: unknown;
- };
-};
-export type StakingMsg = {
- delegate: {
- amount: Coin;
- validator: string;
- [k: string]: unknown;
- };
-} | {
- undelegate: {
- amount: Coin;
- validator: string;
- [k: string]: unknown;
- };
-} | {
- redelegate: {
- amount: Coin;
- dst_validator: string;
- src_validator: string;
- [k: string]: unknown;
- };
-};
-export type DistributionMsg = {
- set_withdraw_address: {
- address: string;
- [k: string]: unknown;
- };
-} | {
- withdraw_delegator_reward: {
- validator: string;
- [k: string]: unknown;
- };
-};
-export type Binary = string;
-export type IbcMsg = {
- transfer: {
- amount: Coin;
- channel_id: string;
- timeout: IbcTimeout;
- to_address: string;
- [k: string]: unknown;
- };
-} | {
- send_packet: {
- channel_id: string;
- data: Binary;
- timeout: IbcTimeout;
- [k: string]: unknown;
- };
-} | {
- close_channel: {
- channel_id: string;
- [k: string]: unknown;
};
};
export type WasmMsg = {
@@ -171,7 +102,6 @@ export type WasmMsg = {
contract_addr: string;
funds: Coin[];
msg: Binary;
- [k: string]: unknown;
};
} | {
instantiate: {
@@ -180,54 +110,30 @@ export type WasmMsg = {
funds: Coin[];
label: string;
msg: Binary;
- [k: string]: unknown;
};
} | {
migrate: {
contract_addr: string;
msg: Binary;
new_code_id: number;
- [k: string]: unknown;
};
} | {
update_admin: {
admin: string;
contract_addr: string;
- [k: string]: unknown;
};
} | {
clear_admin: {
contract_addr: string;
- [k: string]: unknown;
};
};
-export type GovMsg = {
- vote: {
- proposal_id: number;
- vote: VoteOption;
- [k: string]: unknown;
- };
-};
-export type VoteOption = "yes" | "no" | "abstain" | "no_with_veto";
+export type Binary = string;
export type Vote = "yes" | "no" | "abstain" | "veto";
export interface Coin {
amount: Uint128;
denom: string;
- [k: string]: unknown;
-}
-export interface Empty {
- [k: string]: unknown;
-}
-export interface IbcTimeout {
- block?: IbcTimeoutBlock | null;
- timestamp?: Timestamp | null;
- [k: string]: unknown;
-}
-export interface IbcTimeoutBlock {
- height: number;
- revision: number;
- [k: string]: unknown;
}
+export interface Empty {}
export interface MemberChangedHookMsg {
diffs: MemberDiff[];
}
diff --git a/sdk/typescript/codegen/contract-clients/src/Cw4Group.client.ts b/sdk/typescript/codegen/contract-clients/src/Cw4Group.client.ts
index 42482b9aba6..2e1bfb2c01e 100644
--- a/sdk/typescript/codegen/contract-clients/src/Cw4Group.client.ts
+++ b/sdk/typescript/codegen/contract-clients/src/Cw4Group.client.ts
@@ -1,13 +1,12 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
-import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
-import { Coin, StdFee } from "@cosmjs/amino";
+import { ICosmWasmClient, ISigningCosmWasmClient } from "./baseClient";
+import { Coin, StdFee } from "@interchainjs/types";
import { InstantiateMsg, Member, ExecuteMsg, QueryMsg, MigrateMsg, AdminResponse, HooksResponse, MemberListResponse, MemberResponse, TotalWeightResponse } from "./Cw4Group.types";
-
export interface Cw4GroupReadOnlyInterface {
contractAddress: string;
admin: () => Promise;
@@ -33,10 +32,9 @@ export interface Cw4GroupReadOnlyInterface {
hooks: () => Promise;
}
export class Cw4GroupQueryClient implements Cw4GroupReadOnlyInterface {
- client: CosmWasmClient;
+ client: ICosmWasmClient;
contractAddress: string;
-
- constructor(client: CosmWasmClient, contractAddress: string) {
+ constructor(client: ICosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
this.admin = this.admin.bind(this);
@@ -45,7 +43,6 @@ export class Cw4GroupQueryClient implements Cw4GroupReadOnlyInterface {
this.member = this.member.bind(this);
this.hooks = this.hooks.bind(this);
}
-
admin = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
admin: {}
@@ -103,31 +100,30 @@ export interface Cw4GroupInterface extends Cw4GroupReadOnlyInterface {
admin
}: {
admin?: string;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
updateMembers: ({
add,
remove
}: {
add: Member[];
remove: string[];
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
addHook: ({
addr
}: {
addr: string;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
removeHook: ({
addr
}: {
addr: string;
- }, fee?: number | StdFee | "auto", memo?: string, _funds?: Coin[]) => Promise;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
}
export class Cw4GroupClient extends Cw4GroupQueryClient implements Cw4GroupInterface {
- client: SigningCosmWasmClient;
+ client: ISigningCosmWasmClient;
sender: string;
contractAddress: string;
-
- constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
+ constructor(client: ISigningCosmWasmClient, sender: string, contractAddress: string) {
super(client, contractAddress);
this.client = client;
this.sender = sender;
@@ -137,17 +133,16 @@ export class Cw4GroupClient extends Cw4GroupQueryClient implements Cw4GroupInter
this.addHook = this.addHook.bind(this);
this.removeHook = this.removeHook.bind(this);
}
-
updateAdmin = async ({
admin
}: {
admin?: string;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
update_admin: {
admin
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
updateMembers = async ({
add,
@@ -155,34 +150,34 @@ export class Cw4GroupClient extends Cw4GroupQueryClient implements Cw4GroupInter
}: {
add: Member[];
remove: string[];
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
update_members: {
add,
remove
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
addHook = async ({
addr
}: {
addr: string;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
add_hook: {
addr
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
removeHook = async ({
addr
}: {
addr: string;
- }, fee: number | StdFee | "auto" = "auto", memo?: string, _funds?: Coin[]): Promise => {
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
return await this.client.execute(this.sender, this.contractAddress, {
remove_hook: {
addr
}
- }, fee, memo, _funds);
+ }, fee_, memo_, funds_);
};
-}
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/Cw4Group.types.ts b/sdk/typescript/codegen/contract-clients/src/Cw4Group.types.ts
index 6fe03352a24..836a46846ce 100644
--- a/sdk/typescript/codegen/contract-clients/src/Cw4Group.types.ts
+++ b/sdk/typescript/codegen/contract-clients/src/Cw4Group.types.ts
@@ -1,5 +1,5 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
diff --git a/sdk/typescript/codegen/contract-clients/src/Ecash.client.ts b/sdk/typescript/codegen/contract-clients/src/Ecash.client.ts
new file mode 100644
index 00000000000..e2dd496d3b0
--- /dev/null
+++ b/sdk/typescript/codegen/contract-clients/src/Ecash.client.ts
@@ -0,0 +1,256 @@
+/**
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
+* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
+* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
+*/
+
+import { ICosmWasmClient, ISigningCosmWasmClient } from "./baseClient";
+import { StdFee } from "@interchainjs/types";
+import { Uint128, InstantiateMsg, Coin, ExecuteMsg, QueryMsg, MigrateMsg, PagedBlacklistedAccountResponse, BlacklistedAccount, Blacklisting, BlacklistedAccountResponse, DepositResponse, Deposit, PagedDepositsResponse, DepositData, LatestDepositResponse } from "./Ecash.types";
+export interface EcashReadOnlyInterface {
+ contractAddress: string;
+ getBlacklistedAccount: ({
+ publicKey
+ }: {
+ publicKey: string;
+ }) => Promise;
+ getBlacklistPaged: ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: string;
+ }) => Promise;
+ getRequiredDepositAmount: () => Promise;
+ getDeposit: ({
+ depositId
+ }: {
+ depositId: number;
+ }) => Promise;
+ getLatestDeposit: () => Promise;
+ getDepositsPaged: ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }) => Promise;
+}
+export class EcashQueryClient implements EcashReadOnlyInterface {
+ client: ICosmWasmClient;
+ contractAddress: string;
+ constructor(client: ICosmWasmClient, contractAddress: string) {
+ this.client = client;
+ this.contractAddress = contractAddress;
+ this.getBlacklistedAccount = this.getBlacklistedAccount.bind(this);
+ this.getBlacklistPaged = this.getBlacklistPaged.bind(this);
+ this.getRequiredDepositAmount = this.getRequiredDepositAmount.bind(this);
+ this.getDeposit = this.getDeposit.bind(this);
+ this.getLatestDeposit = this.getLatestDeposit.bind(this);
+ this.getDepositsPaged = this.getDepositsPaged.bind(this);
+ }
+ getBlacklistedAccount = async ({
+ publicKey
+ }: {
+ publicKey: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_blacklisted_account: {
+ public_key: publicKey
+ }
+ });
+ };
+ getBlacklistPaged = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_blacklist_paged: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getRequiredDepositAmount = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_required_deposit_amount: {}
+ });
+ };
+ getDeposit = async ({
+ depositId
+ }: {
+ depositId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_deposit: {
+ deposit_id: depositId
+ }
+ });
+ };
+ getLatestDeposit = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_latest_deposit: {}
+ });
+ };
+ getDepositsPaged = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_deposits_paged: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+}
+export interface EcashInterface extends EcashReadOnlyInterface {
+ contractAddress: string;
+ sender: string;
+ depositTicketBookFunds: ({
+ identityKey
+ }: {
+ identityKey: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ requestRedemption: ({
+ commitmentBs58,
+ numberOfTickets
+ }: {
+ commitmentBs58: string;
+ numberOfTickets: number;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ redeemTickets: ({
+ gw,
+ n
+ }: {
+ gw: string;
+ n: number;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ updateAdmin: ({
+ admin
+ }: {
+ admin: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ updateDepositValue: ({
+ newDeposit
+ }: {
+ newDeposit: Coin;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ proposeToBlacklist: ({
+ publicKey
+ }: {
+ publicKey: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+ addToBlacklist: ({
+ publicKey
+ }: {
+ publicKey: string;
+ }, fee_?: number | StdFee | "auto", memo_?: string, funds_?: Coin[]) => Promise;
+}
+export class EcashClient extends EcashQueryClient implements EcashInterface {
+ client: ISigningCosmWasmClient;
+ sender: string;
+ contractAddress: string;
+ constructor(client: ISigningCosmWasmClient, sender: string, contractAddress: string) {
+ super(client, contractAddress);
+ this.client = client;
+ this.sender = sender;
+ this.contractAddress = contractAddress;
+ this.depositTicketBookFunds = this.depositTicketBookFunds.bind(this);
+ this.requestRedemption = this.requestRedemption.bind(this);
+ this.redeemTickets = this.redeemTickets.bind(this);
+ this.updateAdmin = this.updateAdmin.bind(this);
+ this.updateDepositValue = this.updateDepositValue.bind(this);
+ this.proposeToBlacklist = this.proposeToBlacklist.bind(this);
+ this.addToBlacklist = this.addToBlacklist.bind(this);
+ }
+ depositTicketBookFunds = async ({
+ identityKey
+ }: {
+ identityKey: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ deposit_ticket_book_funds: {
+ identity_key: identityKey
+ }
+ }, fee_, memo_, funds_);
+ };
+ requestRedemption = async ({
+ commitmentBs58,
+ numberOfTickets
+ }: {
+ commitmentBs58: string;
+ numberOfTickets: number;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ request_redemption: {
+ commitment_bs58: commitmentBs58,
+ number_of_tickets: numberOfTickets
+ }
+ }, fee_, memo_, funds_);
+ };
+ redeemTickets = async ({
+ gw,
+ n
+ }: {
+ gw: string;
+ n: number;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ redeem_tickets: {
+ gw,
+ n
+ }
+ }, fee_, memo_, funds_);
+ };
+ updateAdmin = async ({
+ admin
+ }: {
+ admin: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ update_admin: {
+ admin
+ }
+ }, fee_, memo_, funds_);
+ };
+ updateDepositValue = async ({
+ newDeposit
+ }: {
+ newDeposit: Coin;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ update_deposit_value: {
+ new_deposit: newDeposit
+ }
+ }, fee_, memo_, funds_);
+ };
+ proposeToBlacklist = async ({
+ publicKey
+ }: {
+ publicKey: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ propose_to_blacklist: {
+ public_key: publicKey
+ }
+ }, fee_, memo_, funds_);
+ };
+ addToBlacklist = async ({
+ publicKey
+ }: {
+ publicKey: string;
+ }, fee_: number | StdFee | "auto" = "auto", memo_?: string, funds_?: Coin[]): Promise => {
+ return await this.client.execute(this.sender, this.contractAddress, {
+ add_to_blacklist: {
+ public_key: publicKey
+ }
+ }, fee_, memo_, funds_);
+ };
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/Ecash.types.ts b/sdk/typescript/codegen/contract-clients/src/Ecash.types.ts
new file mode 100644
index 00000000000..e7deb4ee282
--- /dev/null
+++ b/sdk/typescript/codegen/contract-clients/src/Ecash.types.ts
@@ -0,0 +1,106 @@
+/**
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
+* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
+* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
+*/
+
+export type Uint128 = string;
+export interface InstantiateMsg {
+ deposit_amount: Coin;
+ group_addr: string;
+ holding_account: string;
+ multisig_addr: string;
+}
+export interface Coin {
+ amount: Uint128;
+ denom: string;
+}
+export type ExecuteMsg = {
+ deposit_ticket_book_funds: {
+ identity_key: string;
+ };
+} | {
+ request_redemption: {
+ commitment_bs58: string;
+ number_of_tickets: number;
+ };
+} | {
+ redeem_tickets: {
+ gw: string;
+ n: number;
+ };
+} | {
+ update_admin: {
+ admin: string;
+ };
+} | {
+ update_deposit_value: {
+ new_deposit: Coin;
+ };
+} | {
+ propose_to_blacklist: {
+ public_key: string;
+ };
+} | {
+ add_to_blacklist: {
+ public_key: string;
+ };
+};
+export type QueryMsg = {
+ get_blacklisted_account: {
+ public_key: string;
+ };
+} | {
+ get_blacklist_paged: {
+ limit?: number | null;
+ start_after?: string | null;
+ };
+} | {
+ get_required_deposit_amount: {};
+} | {
+ get_deposit: {
+ deposit_id: number;
+ };
+} | {
+ get_latest_deposit: {};
+} | {
+ get_deposits_paged: {
+ limit?: number | null;
+ start_after?: number | null;
+ };
+};
+export interface MigrateMsg {}
+export interface PagedBlacklistedAccountResponse {
+ accounts: BlacklistedAccount[];
+ per_page: number;
+ start_next_after?: string | null;
+}
+export interface BlacklistedAccount {
+ info: Blacklisting;
+ public_key: string;
+}
+export interface Blacklisting {
+ finalized_at_height?: number | null;
+ proposal_id: number;
+}
+export interface BlacklistedAccountResponse {
+ account?: Blacklisting | null;
+}
+export interface DepositResponse {
+ deposit?: Deposit | null;
+ id: number;
+}
+export interface Deposit {
+ bs58_encoded_ed25519_pubkey: string;
+}
+export interface PagedDepositsResponse {
+ deposits: DepositData[];
+ start_next_after?: number | null;
+}
+export interface DepositData {
+ deposit: Deposit;
+ id: number;
+}
+export interface LatestDepositResponse {
+ deposit?: DepositData | null;
+}
\ No newline at end of file
diff --git a/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts b/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts
index c775e31a3d1..7d068a8a71f 100644
--- a/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts
+++ b/sdk/typescript/codegen/contract-clients/src/Mixnet.client.ts
@@ -1,64 +1,31 @@
/**
-* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
+* This file was automatically generated by @cosmwasm/ts-codegen@1.13.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
-import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate";
-import { StdFee } from "@cosmjs/amino";
-import { Decimal, Percent, InstantiateMsg, Duration, InitialRewardingParams, ExecuteMsg, Layer, FamilyHead, MessageSignature, Uint128, ContractStateParams, Coin, IntervalRewardingParamsUpdate, LayerAssignment, MixNodeCostParams, MixNode, MixNodeConfigUpdate, Gateway, GatewayConfigUpdate, QueryMsg, MigrateMsg, Addr, PagedAllDelegationsResponse, Delegation, PagedFamiliesResponse, Family, PagedMembersResponse, MixnodeDetailsByIdentityResponse, MixNodeDetails, MixNodeBond, PendingMixNodeChanges, MixNodeRewarding, ContractVersion, ContractBuildInformation, CurrentIntervalResponse, Interval, MixNodeDelegationResponse, PagedDelegatorDelegationsResponse, EpochState, EpochStatus, EstimatedCurrentEpochRewardResponse, FamilyByHeadResponse, FamilyByLabelResponse, FamilyMembersByHeadResponse, FamilyMembersByLabelResponse, GatewayBondResponse, GatewayBond, PagedGatewayResponse, LayerDistribution, PagedMixnodeBondsResponse, PagedMixnodesDetailsResponse, PagedMixNodeDelegationsResponse, MixnodeDetailsResponse, MixnodeRewardingDetailsResponse, NumberOfPendingEventsResponse, GatewayOwnershipResponse, MixOwnershipResponse, PendingRewardResponse, PendingEpochEventKind, PendingEpochEventResponse, PendingEpochEventData, PendingEpochEventsResponse, PendingEpochEvent, PendingIntervalEventKind, PendingIntervalEventResponse, PendingIntervalEventData, PendingIntervalEventsResponse, PendingIntervalEvent, RewardedSetNodeStatus, PagedRewardedSetResponse, RewardingParams, IntervalRewardParams, String, Uint32, StakeSaturationResponse, ContractState, UnbondedMixnodeResponse, UnbondedMixnode, PagedUnbondedMixnodesResponse } from "./Mixnet.types";
-import { GetCw2ContractVersionResponse } from './types';
+import { ICosmWasmClient, ISigningCosmWasmClient } from "./baseClient";
+import { StdFee } from "@interchainjs/types";
+import { Decimal, Percent, Uint128, InstantiateMsg, Duration, InitialRewardingParams, RewardedSetParams, RangedValueForUint128, RangedValueForPercent, VersionScoreFormulaParams, OutdatedVersionWeights, ExecuteMsg, Role, MessageSignature, ContractStateParamsUpdate, ConfigScoreParamsUpdate, DelegationsParams, Coin, OperatorsParamsUpdate, ActiveSetUpdate, IntervalRewardingParamsUpdate, RoleAssignment, NodeCostParams, MixNode, MixNodeConfigUpdate, Gateway, GatewayConfigUpdate, NymNode, NodeConfigUpdate, NodeRewardingParameters, QueryMsg, MigrateMsg, AdminResponse, Addr, PagedAllDelegationsResponse, Delegation, MixnodeDetailsByIdentityResponse, MixNodeDetails, MixNodeBond, PendingMixNodeChanges, NodeRewarding, ContractVersion, ContractBuildInformation, CurrentIntervalResponse, Interval, CurrentNymNodeVersionResponse, HistoricalNymNodeVersionEntry, HistoricalNymNodeVersion, TotalVersionDifference, NodeDelegationResponse, PagedDelegatorDelegationsResponse, EpochState, EpochStatus, EstimatedCurrentEpochRewardResponse, GatewayBondResponse, GatewayBond, PagedGatewayResponse, KeyRotationIdResponse, KeyRotationState, PagedMixnodeBondsResponse, PagedMixnodesDetailsResponse, MixnodeDetailsResponse, MixnodeRewardingDetailsResponse, PagedNodeDelegationsResponse, NodeRewardingDetailsResponse, StakeSaturationResponse, NumberOfPendingEventsResponse, PagedNymNodeBondsResponse, NymNodeBond, NodeDetailsResponse, NymNodeDetails, PendingNodeChanges, NodeDetailsByIdentityResponse, NymNodeVersionHistoryResponse, PagedNymNodeDetailsResponse, GatewayOwnershipResponse, MixOwnershipResponse, NodeOwnershipResponse, PendingRewardResponse, PendingEpochEventKind, PendingEpochEventResponse, PendingEpochEventData, PendingEpochEventsResponse, PendingEpochEvent, PendingIntervalEventKind, PendingIntervalEventResponse, PendingIntervalEventData, PendingIntervalEventsResponse, PendingIntervalEvent, PreassignedGatewayIdsResponse, PreassignedId, RolesMetadataResponse, RewardedSetMetadata, RoleMetadata, RewardingParams, IntervalRewardParams, String, EpochAssignmentResponse, Uint32, MixStakeSaturationResponse, ContractState, ContractStateParams, ConfigScoreParams, OperatorsParams, UnbondedMixnodeResponse, UnbondedMixnode, PagedUnbondedMixnodesResponse, UnbondedNodeResponse, UnbondedNymNode, PagedUnbondedNymNodesResponse } from "./Mixnet.types";
export interface MixnetReadOnlyInterface {
contractAddress: string;
- getAllFamiliesPaged: ({
- limit,
- startAfter
- }: {
- limit?: number;
- startAfter?: string;
- }) => Promise;
- getAllMembersPaged: ({
- limit,
- startAfter
- }: {
- limit?: number;
- startAfter?: string;
- }) => Promise;
- getFamilyByHead: ({
- head
- }: {
- head: string;
- }) => Promise;
- getFamilyByLabel: ({
- label
- }: {
- label: string;
- }) => Promise;
- getFamilyMembersByHead: ({
- head
- }: {
- head: string;
- }) => Promise;
- getFamilyMembersByLabel: ({
- label
- }: {
- label: string;
- }) => Promise;
+ admin: () => Promise;
getContractVersion: () => Promise;
getCw2ContractVersion: () => Promise;
getRewardingValidatorAddress: () => Promise;
getStateParams: () => Promise;
getState: () => Promise;
- getRewardingParams: () => Promise;
- getEpochStatus: () => Promise;
- getCurrentIntervalDetails: () => Promise;
- getRewardedSet: ({
+ getCurrentNymNodeVersion: () => Promise;
+ getNymNodeVersionHistory: ({
limit,
startAfter
}: {
limit?: number;
startAfter?: number;
- }) => Promise;
+ }) => Promise;
+ getRewardingParams: () => Promise;
+ getEpochStatus: () => Promise;
+ getCurrentIntervalDetails: () => Promise;
getMixNodeBonds: ({
limit,
startAfter
@@ -117,7 +84,7 @@ export interface MixnetReadOnlyInterface {
mixId
}: {
mixId: number;
- }) => Promise;
+ }) => Promise;
getUnbondedMixNodeInformation: ({
mixId
}: {
@@ -128,7 +95,6 @@ export interface MixnetReadOnlyInterface {
}: {
mixIdentity: string;
}) => Promise;
- getLayerDistribution: () => Promise;
getGateways: ({
limit,
startAfter
@@ -146,15 +112,97 @@ export interface MixnetReadOnlyInterface {
}: {
address: string;
}) => Promise;
- getMixnodeDelegations: ({
+ getPreassignedGatewayIds: ({
limit,
- mixId,
startAfter
}: {
limit?: number;
- mixId: number;
startAfter?: string;
- }) => Promise;
+ }) => Promise;
+ getNymNodeBondsPaged: ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }) => Promise;
+ getNymNodesDetailedPaged: ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }) => Promise;
+ getUnbondedNymNode: ({
+ nodeId
+ }: {
+ nodeId: number;
+ }) => Promise;
+ getUnbondedNymNodesPaged: ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }) => Promise;
+ getUnbondedNymNodesByOwnerPaged: ({
+ limit,
+ owner,
+ startAfter
+ }: {
+ limit?: number;
+ owner: string;
+ startAfter?: number;
+ }) => Promise;
+ getUnbondedNymNodesByIdentityKeyPaged: ({
+ identityKey,
+ limit,
+ startAfter
+ }: {
+ identityKey: string;
+ limit?: number;
+ startAfter?: number;
+ }) => Promise;
+ getOwnedNymNode: ({
+ address
+ }: {
+ address: string;
+ }) => Promise;
+ getNymNodeDetails: ({
+ nodeId
+ }: {
+ nodeId: number;
+ }) => Promise;
+ getNymNodeDetailsByIdentityKey: ({
+ nodeIdentity
+ }: {
+ nodeIdentity: string;
+ }) => Promise;
+ getNodeRewardingDetails: ({
+ nodeId
+ }: {
+ nodeId: number;
+ }) => Promise;
+ getNodeStakeSaturation: ({
+ nodeId
+ }: {
+ nodeId: number;
+ }) => Promise;
+ getRoleAssignment: ({
+ role
+ }: {
+ role: Role;
+ }) => Promise;
+ getRewardedSetMetadata: () => Promise;
+ getNodeDelegations: ({
+ limit,
+ nodeId,
+ startAfter
+ }: {
+ limit?: number;
+ nodeId: number;
+ startAfter?: string;
+ }) => Promise;
getDelegatorDelegations: ({
delegator,
limit,
@@ -166,13 +214,13 @@ export interface MixnetReadOnlyInterface {
}) => Promise;
getDelegationDetails: ({
delegator,
- mixId,
+ nodeId,
proxy
}: {
delegator: string;
- mixId: number;
+ nodeId: number;
proxy?: string;
- }) => Promise;
+ }) => Promise;
getAllDelegations: ({
limit,
startAfter
@@ -185,37 +233,39 @@ export interface MixnetReadOnlyInterface {
}: {
address: string;
}) => Promise;
- getPendingMixNodeOperatorReward: ({
- mixId
+ getPendingNodeOperatorReward: ({
+ nodeId
}: {
- mixId: number;
+ nodeId: number;
}) => Promise;
getPendingDelegatorReward: ({
address,
- mixId,
+ nodeId,
proxy
}: {
address: string;
- mixId: number;
+ nodeId: number;
proxy?: string;
}) => Promise;
getEstimatedCurrentEpochOperatorReward: ({
estimatedPerformance,
- mixId
+ estimatedWork,
+ nodeId
}: {
estimatedPerformance: Percent;
- mixId: number;
+ estimatedWork?: Decimal;
+ nodeId: number;
}) => Promise;
getEstimatedCurrentEpochDelegatorReward: ({
address,
estimatedPerformance,
- mixId,
- proxy
+ estimatedWork,
+ nodeId
}: {
address: string;
estimatedPerformance: Percent;
- mixId: number;
- proxy?: string;
+ estimatedWork?: Decimal;
+ nodeId: number;
}) => Promise;
getPendingEpochEvents: ({
limit,
@@ -247,29 +297,26 @@ export interface MixnetReadOnlyInterface {
}: {
address: string;
}) => Promise;
+ getKeyRotationState: () => Promise;
+ getKeyRotationId: () => Promise;
}
export class MixnetQueryClient implements MixnetReadOnlyInterface {
- client: CosmWasmClient;
+ client: ICosmWasmClient;
contractAddress: string;
-
- constructor(client: CosmWasmClient, contractAddress: string) {
+ constructor(client: ICosmWasmClient, contractAddress: string) {
this.client = client;
this.contractAddress = contractAddress;
- this.getAllFamiliesPaged = this.getAllFamiliesPaged.bind(this);
- this.getAllMembersPaged = this.getAllMembersPaged.bind(this);
- this.getFamilyByHead = this.getFamilyByHead.bind(this);
- this.getFamilyByLabel = this.getFamilyByLabel.bind(this);
- this.getFamilyMembersByHead = this.getFamilyMembersByHead.bind(this);
- this.getFamilyMembersByLabel = this.getFamilyMembersByLabel.bind(this);
+ this.admin = this.admin.bind(this);
this.getContractVersion = this.getContractVersion.bind(this);
this.getCw2ContractVersion = this.getCw2ContractVersion.bind(this);
this.getRewardingValidatorAddress = this.getRewardingValidatorAddress.bind(this);
this.getStateParams = this.getStateParams.bind(this);
this.getState = this.getState.bind(this);
+ this.getCurrentNymNodeVersion = this.getCurrentNymNodeVersion.bind(this);
+ this.getNymNodeVersionHistory = this.getNymNodeVersionHistory.bind(this);
this.getRewardingParams = this.getRewardingParams.bind(this);
this.getEpochStatus = this.getEpochStatus.bind(this);
this.getCurrentIntervalDetails = this.getCurrentIntervalDetails.bind(this);
- this.getRewardedSet = this.getRewardedSet.bind(this);
this.getMixNodeBonds = this.getMixNodeBonds.bind(this);
this.getMixNodesDetailed = this.getMixNodesDetailed.bind(this);
this.getUnbondedMixNodes = this.getUnbondedMixNodes.bind(this);
@@ -281,16 +328,29 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
this.getStakeSaturation = this.getStakeSaturation.bind(this);
this.getUnbondedMixNodeInformation = this.getUnbondedMixNodeInformation.bind(this);
this.getBondedMixnodeDetailsByIdentity = this.getBondedMixnodeDetailsByIdentity.bind(this);
- this.getLayerDistribution = this.getLayerDistribution.bind(this);
this.getGateways = this.getGateways.bind(this);
this.getGatewayBond = this.getGatewayBond.bind(this);
this.getOwnedGateway = this.getOwnedGateway.bind(this);
- this.getMixnodeDelegations = this.getMixnodeDelegations.bind(this);
+ this.getPreassignedGatewayIds = this.getPreassignedGatewayIds.bind(this);
+ this.getNymNodeBondsPaged = this.getNymNodeBondsPaged.bind(this);
+ this.getNymNodesDetailedPaged = this.getNymNodesDetailedPaged.bind(this);
+ this.getUnbondedNymNode = this.getUnbondedNymNode.bind(this);
+ this.getUnbondedNymNodesPaged = this.getUnbondedNymNodesPaged.bind(this);
+ this.getUnbondedNymNodesByOwnerPaged = this.getUnbondedNymNodesByOwnerPaged.bind(this);
+ this.getUnbondedNymNodesByIdentityKeyPaged = this.getUnbondedNymNodesByIdentityKeyPaged.bind(this);
+ this.getOwnedNymNode = this.getOwnedNymNode.bind(this);
+ this.getNymNodeDetails = this.getNymNodeDetails.bind(this);
+ this.getNymNodeDetailsByIdentityKey = this.getNymNodeDetailsByIdentityKey.bind(this);
+ this.getNodeRewardingDetails = this.getNodeRewardingDetails.bind(this);
+ this.getNodeStakeSaturation = this.getNodeStakeSaturation.bind(this);
+ this.getRoleAssignment = this.getRoleAssignment.bind(this);
+ this.getRewardedSetMetadata = this.getRewardedSetMetadata.bind(this);
+ this.getNodeDelegations = this.getNodeDelegations.bind(this);
this.getDelegatorDelegations = this.getDelegatorDelegations.bind(this);
this.getDelegationDetails = this.getDelegationDetails.bind(this);
this.getAllDelegations = this.getAllDelegations.bind(this);
this.getPendingOperatorReward = this.getPendingOperatorReward.bind(this);
- this.getPendingMixNodeOperatorReward = this.getPendingMixNodeOperatorReward.bind(this);
+ this.getPendingNodeOperatorReward = this.getPendingNodeOperatorReward.bind(this);
this.getPendingDelegatorReward = this.getPendingDelegatorReward.bind(this);
this.getEstimatedCurrentEpochOperatorReward = this.getEstimatedCurrentEpochOperatorReward.bind(this);
this.getEstimatedCurrentEpochDelegatorReward = this.getEstimatedCurrentEpochDelegatorReward.bind(this);
@@ -300,78 +360,12 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
this.getPendingIntervalEvent = this.getPendingIntervalEvent.bind(this);
this.getNumberOfPendingEvents = this.getNumberOfPendingEvents.bind(this);
this.getSigningNonce = this.getSigningNonce.bind(this);
+ this.getKeyRotationState = this.getKeyRotationState.bind(this);
+ this.getKeyRotationId = this.getKeyRotationId.bind(this);
}
-
- getAllFamiliesPaged = async ({
- limit,
- startAfter
- }: {
- limit?: number;
- startAfter?: string;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_all_families_paged: {
- limit,
- start_after: startAfter
- }
- });
- };
- getAllMembersPaged = async ({
- limit,
- startAfter
- }: {
- limit?: number;
- startAfter?: string;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_all_members_paged: {
- limit,
- start_after: startAfter
- }
- });
- };
- getFamilyByHead = async ({
- head
- }: {
- head: string;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_family_by_head: {
- head
- }
- });
- };
- getFamilyByLabel = async ({
- label
- }: {
- label: string;
- }): Promise => {
+ admin = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_family_by_label: {
- label
- }
- });
- };
- getFamilyMembersByHead = async ({
- head
- }: {
- head: string;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_family_members_by_head: {
- head
- }
- });
- };
- getFamilyMembersByLabel = async ({
- label
- }: {
- label: string;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_family_members_by_label: {
- label
- }
+ admin: {}
});
};
getContractVersion = async (): Promise => {
@@ -399,6 +393,25 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
get_state: {}
});
};
+ getCurrentNymNodeVersion = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_current_nym_node_version: {}
+ });
+ };
+ getNymNodeVersionHistory = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_nym_node_version_history: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
getRewardingParams = async (): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_rewarding_params: {}
@@ -414,20 +427,6 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
get_current_interval_details: {}
});
};
- getRewardedSet = async ({
- limit,
- startAfter
- }: {
- limit?: number;
- startAfter?: number;
- }): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_rewarded_set: {
- limit,
- start_after: startAfter
- }
- });
- };
getMixNodeBonds = async ({
limit,
startAfter
@@ -541,7 +540,7 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
mixId
}: {
mixId: number;
- }): Promise => {
+ }): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_stake_saturation: {
mix_id: mixId
@@ -570,11 +569,6 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
}
});
};
- getLayerDistribution = async (): Promise => {
- return this.client.queryContractSmart(this.contractAddress, {
- get_layer_distribution: {}
- });
- };
getGateways = async ({
limit,
startAfter
@@ -611,19 +605,191 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
}
});
};
- getMixnodeDelegations = async ({
+ getPreassignedGatewayIds = async ({
limit,
- mixId,
startAfter
}: {
limit?: number;
- mixId: number;
startAfter?: string;
- }): Promise => {
+ }): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_mixnode_delegations: {
+ get_preassigned_gateway_ids: {
limit,
- mix_id: mixId,
+ start_after: startAfter
+ }
+ });
+ };
+ getNymNodeBondsPaged = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_nym_node_bonds_paged: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getNymNodesDetailedPaged = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_nym_nodes_detailed_paged: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getUnbondedNymNode = async ({
+ nodeId
+ }: {
+ nodeId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_unbonded_nym_node: {
+ node_id: nodeId
+ }
+ });
+ };
+ getUnbondedNymNodesPaged = async ({
+ limit,
+ startAfter
+ }: {
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_unbonded_nym_nodes_paged: {
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getUnbondedNymNodesByOwnerPaged = async ({
+ limit,
+ owner,
+ startAfter
+ }: {
+ limit?: number;
+ owner: string;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_unbonded_nym_nodes_by_owner_paged: {
+ limit,
+ owner,
+ start_after: startAfter
+ }
+ });
+ };
+ getUnbondedNymNodesByIdentityKeyPaged = async ({
+ identityKey,
+ limit,
+ startAfter
+ }: {
+ identityKey: string;
+ limit?: number;
+ startAfter?: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_unbonded_nym_nodes_by_identity_key_paged: {
+ identity_key: identityKey,
+ limit,
+ start_after: startAfter
+ }
+ });
+ };
+ getOwnedNymNode = async ({
+ address
+ }: {
+ address: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_owned_nym_node: {
+ address
+ }
+ });
+ };
+ getNymNodeDetails = async ({
+ nodeId
+ }: {
+ nodeId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_nym_node_details: {
+ node_id: nodeId
+ }
+ });
+ };
+ getNymNodeDetailsByIdentityKey = async ({
+ nodeIdentity
+ }: {
+ nodeIdentity: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_nym_node_details_by_identity_key: {
+ node_identity: nodeIdentity
+ }
+ });
+ };
+ getNodeRewardingDetails = async ({
+ nodeId
+ }: {
+ nodeId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_node_rewarding_details: {
+ node_id: nodeId
+ }
+ });
+ };
+ getNodeStakeSaturation = async ({
+ nodeId
+ }: {
+ nodeId: number;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_node_stake_saturation: {
+ node_id: nodeId
+ }
+ });
+ };
+ getRoleAssignment = async ({
+ role
+ }: {
+ role: Role;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_role_assignment: {
+ role
+ }
+ });
+ };
+ getRewardedSetMetadata = async (): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_rewarded_set_metadata: {}
+ });
+ };
+ getNodeDelegations = async ({
+ limit,
+ nodeId,
+ startAfter
+ }: {
+ limit?: number;
+ nodeId: number;
+ startAfter?: string;
+ }): Promise => {
+ return this.client.queryContractSmart(this.contractAddress, {
+ get_node_delegations: {
+ limit,
+ node_id: nodeId,
start_after: startAfter
}
});
@@ -647,17 +813,17 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
};
getDelegationDetails = async ({
delegator,
- mixId,
+ nodeId,
proxy
}: {
delegator: string;
- mixId: number;
+ nodeId: number;
proxy?: string;
- }): Promise => {
+ }): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_delegation_details: {
delegator,
- mix_id: mixId,
+ node_id: nodeId,
proxy
}
});
@@ -687,65 +853,68 @@ export class MixnetQueryClient implements MixnetReadOnlyInterface {
}
});
};
- getPendingMixNodeOperatorReward = async ({
- mixId
+ getPendingNodeOperatorReward = async ({
+ nodeId
}: {
- mixId: number;
+ nodeId: number;
}): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
- get_pending_mix_node_operator_reward: {
- mix_id: mixId
+ get_pending_node_operator_reward: {
+ node_id: nodeId
}
});
};
getPendingDelegatorReward = async ({
address,
- mixId,
+ nodeId,
proxy
}: {
address: string;
- mixId: number;
+ nodeId: number;
proxy?: string;
}): Promise => {
return this.client.queryContractSmart(this.contractAddress, {
get_pending_delegator_reward: {
address,
- mix_id: mixId,
+ node_id: nodeId,
proxy
}
});
};
getEstimatedCurrentEpochOperatorReward = async ({
estimatedPerformance,
- mixId
+ estimatedWork,
+ nodeId
}: {
estimatedPerformance: Percent;
- mixId: number;
+ estimatedWork?: Decimal;
+ nodeId: number;
}): Promise