diff --git a/css/kinode.css b/css/kinode.css index 9c61482d..c1911dd4 100644 --- a/css/kinode.css +++ b/css/kinode.css @@ -170,7 +170,7 @@ button:disabled { } button.secondary { - background-color: white; + background-color: light-dark(var(--off-white), var(--off-black)); color: var(--orange); border: 2px solid var(--orange); } diff --git a/kinode/packages/app_store/ui/src/abis/helpers.ts b/kinode/packages/app_store/ui/src/abis/helpers.ts index 099227f2..9917108e 100644 --- a/kinode/packages/app_store/ui/src/abis/helpers.ts +++ b/kinode/packages/app_store/ui/src/abis/helpers.ts @@ -1,9 +1,9 @@ -import { multicallAbi, kinomapAbi, mechAbi, KINOMAP, MULTICALL, KINO_ACCOUNT_IMPL } from "./"; +import { multicallAbi, kimapAbi, mechAbi, KIMAP, MULTICALL, KINO_ACCOUNT_IMPL } from "./"; import { encodeFunctionData, encodePacked, stringToHex } from "viem"; export function encodeMulticalls(metadataUri: string, metadataHash: string) { const metadataHashCall = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~metadata-hash")]), @@ -12,7 +12,7 @@ export function encodeMulticalls(metadataUri: string, metadataHash: string) { }) const metadataUriCall = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~metadata-uri")]), @@ -21,8 +21,8 @@ export function encodeMulticalls(metadataUri: string, metadataHash: string) { }) const calls = [ - { target: KINOMAP, callData: metadataHashCall }, - { target: KINOMAP, callData: metadataUriCall }, + { target: KIMAP, callData: metadataHashCall }, + { target: KIMAP, callData: metadataUriCall }, ]; const multicall = encodeFunctionData({ @@ -46,7 +46,7 @@ export function encodeIntoMintCall(multicalls: `0x${string}`, our_address: `0x${ }); const mintCall = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'mint', args: [ our_address, diff --git a/kinode/packages/app_store/ui/src/abis/index.ts b/kinode/packages/app_store/ui/src/abis/index.ts index 9bab299d..d54a900f 100644 --- a/kinode/packages/app_store/ui/src/abis/index.ts +++ b/kinode/packages/app_store/ui/src/abis/index.ts @@ -2,7 +2,7 @@ import { parseAbi } from "viem"; export { encodeMulticalls, encodeIntoMintCall } from "./helpers"; -export const KINOMAP: `0x${string}` = "0xAfA2e57D3cBA08169b416457C14eBA2D6021c4b5"; +export const KIMAP: `0x${string}` = "0xAfA2e57D3cBA08169b416457C14eBA2D6021c4b5"; export const MULTICALL: `0x${string}` = "0xcA11bde05977b3631167028862bE2a173976CA11"; export const KINO_ACCOUNT_IMPL: `0x${string}` = "0xd30217e86A4910f4D7cB3E73fC3CfD28a2C33e4e"; @@ -12,7 +12,7 @@ export const multicallAbi = parseAbi([ `struct Call { address target; bytes callData; }`, ]); -export const kinomapAbi = parseAbi([ +export const kimapAbi = parseAbi([ "function mint(address, bytes calldata, bytes calldata, bytes calldata, address) external returns (address tba)", "function note(bytes calldata,bytes calldata) external returns (bytes32)", "function get(bytes32 node) external view returns (address tokenBoundAccount, address tokenOwner, bytes memory note)", diff --git a/kinode/packages/app_store/ui/src/pages/PublishPage.tsx b/kinode/packages/app_store/ui/src/pages/PublishPage.tsx index 16bf642e..57fa0a05 100644 --- a/kinode/packages/app_store/ui/src/pages/PublishPage.tsx +++ b/kinode/packages/app_store/ui/src/pages/PublishPage.tsx @@ -3,7 +3,7 @@ import { useLocation } from "react-router-dom"; import { useAccount, useWriteContract, useWaitForTransactionReceipt, usePublicClient } from 'wagmi' import { ConnectButton, useConnectModal } from '@rainbow-me/rainbowkit'; import { keccak256, toBytes } from 'viem'; -import { mechAbi, KINOMAP, encodeIntoMintCall, encodeMulticalls, kinomapAbi, MULTICALL } from "../abis"; +import { mechAbi, KIMAP, encodeIntoMintCall, encodeMulticalls, kimapAbi, MULTICALL } from "../abis"; import { kinohash } from '../utils/kinohash'; import useAppsStore from "../store"; import { AppInfo } from "../types/Apps"; @@ -71,8 +71,8 @@ export default function PublishPage() { try { // Check if the package already exists and get its TBA let data = await publicClient.readContract({ - abi: kinomapAbi, - address: KINOMAP, + abi: kimapAbi, + address: KIMAP, functionName: 'get', args: [kinohash(`${packageName}.${publisherId}`)] }); @@ -84,8 +84,8 @@ export default function PublishPage() { // If the package doesn't exist, check for the publisher's TBA if (!currentTBA) { data = await publicClient.readContract({ - abi: kinomapAbi, - address: KINOMAP, + abi: kimapAbi, + address: KIMAP, functionName: 'get', args: [kinohash(publisherId)] }); @@ -108,10 +108,10 @@ export default function PublishPage() { writeContract({ abi: mechAbi, - address: currentTBA || KINOMAP, + address: currentTBA || KIMAP, functionName: 'execute', args: [ - isUpdate ? MULTICALL : KINOMAP, + isUpdate ? MULTICALL : KIMAP, BigInt(0), args, isUpdate ? 1 : 0 @@ -141,8 +141,8 @@ export default function PublishPage() { } const data = await publicClient.readContract({ - abi: kinomapAbi, - address: KINOMAP, + abi: kimapAbi, + address: KIMAP, functionName: 'get', args: [kinohash(`${packageName}.${publisherName}`)] }); @@ -161,7 +161,7 @@ export default function PublishPage() { address: tba as `0x${string}`, functionName: 'execute', args: [ - KINOMAP, + KIMAP, BigInt(0), multicall, 1 diff --git a/kinode/src/register-ui/src/abis/helpers.ts b/kinode/src/register-ui/src/abis/helpers.ts index 7846b29b..f96fdc96 100644 --- a/kinode/src/register-ui/src/abis/helpers.ts +++ b/kinode/src/register-ui/src/abis/helpers.ts @@ -2,7 +2,7 @@ import { NetworkingInfo } from "../lib/types"; import { kinohash } from "../utils/kinohash"; import { ipToBytes, portToBytes } from "../utils/kns_encoding"; -import { multicallAbi, kinomapAbi, mechAbi, KINOMAP, MULTICALL } from "./"; +import { multicallAbi, kimapAbi, mechAbi, KIMAP, MULTICALL } from "./"; import { encodeFunctionData, encodePacked, stringToHex, bytesToHex } from "viem"; // Function to encode router names into keccak256 hashes @@ -58,7 +58,7 @@ export const generateNetworkingKeys = async ({ console.log("networking_key: ", networking_key); const netkeycall = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~net-key")]), @@ -68,7 +68,7 @@ export const generateNetworkingKeys = async ({ const ws_port_call = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~ws-port")]), @@ -78,7 +78,7 @@ export const generateNetworkingKeys = async ({ const tcp_port_call = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~tcp-port")]), @@ -88,7 +88,7 @@ export const generateNetworkingKeys = async ({ const ip_address_call = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~ip")]), @@ -100,7 +100,7 @@ export const generateNetworkingKeys = async ({ const router_call = encodeFunctionData({ - abi: kinomapAbi, + abi: kimapAbi, functionName: 'note', args: [ encodePacked(["bytes"], [stringToHex("~routers")]), @@ -111,13 +111,13 @@ export const generateNetworkingKeys = async ({ }); const calls = direct ? [ - { target: KINOMAP, callData: netkeycall }, - { target: KINOMAP, callData: ws_port_call }, - { target: KINOMAP, callData: tcp_port_call }, - { target: KINOMAP, callData: ip_address_call }, + { target: KIMAP, callData: netkeycall }, + { target: KIMAP, callData: ws_port_call }, + { target: KIMAP, callData: tcp_port_call }, + { target: KIMAP, callData: ip_address_call }, ] : [ - { target: KINOMAP, callData: netkeycall }, - { target: KINOMAP, callData: router_call }, + { target: KIMAP, callData: netkeycall }, + { target: KIMAP, callData: router_call }, ]; const multicalls = encodeFunctionData({ @@ -143,7 +143,7 @@ export const generateNetworkingKeys = async ({ // to mint a subname of your own, you would do something like this. // const mintCall = encodeFunctionData({ - // abi: kinomapAbi, + // abi: kimapAbi, // functionName: 'mint', // args: [ // our_address, diff --git a/kinode/src/register-ui/src/abis/index.ts b/kinode/src/register-ui/src/abis/index.ts index 2a7430f3..bffab248 100644 --- a/kinode/src/register-ui/src/abis/index.ts +++ b/kinode/src/register-ui/src/abis/index.ts @@ -3,7 +3,7 @@ import { parseAbi } from "viem"; export { generateNetworkingKeys } from "./helpers"; // move to constants? // also for anvil/optimism -export const KINOMAP: `0x${string}` = "0xcA92476B2483aBD5D82AEBF0b56701Bb2e9be658"; +export const KIMAP: `0x${string}` = "0xcA92476B2483aBD5D82AEBF0b56701Bb2e9be658"; export const MULTICALL: `0x${string}` = "0xcA11bde05977b3631167028862bE2a173976CA11"; export const KINO_ACCOUNT_IMPL: `0x${string}` = "0x38766C70a4FB2f23137D9251a1aA12b1143fC716"; export const DOTOS: `0x${string}` = "0x9BD054E4c7753791FA0C138b9713319F62ed235D"; @@ -13,7 +13,7 @@ export const multicallAbi = parseAbi([ `struct Call { address target; bytes callData; }`, ]); -export const kinomapAbi = parseAbi([ +export const kimapAbi = parseAbi([ "function mint(address, bytes calldata, bytes calldata, bytes calldata, address) external returns (address tba)", "function note(bytes calldata,bytes calldata) external returns (bytes32)", "function get(bytes32 node) external view returns (address tokenBoundAccount, address tokenOwner, bytes memory note)", diff --git a/kinode/src/register-ui/src/components/EnterKnsName.tsx b/kinode/src/register-ui/src/components/EnterKnsName.tsx index 952e2614..61bcd07d 100644 --- a/kinode/src/register-ui/src/components/EnterKnsName.tsx +++ b/kinode/src/register-ui/src/components/EnterKnsName.tsx @@ -3,7 +3,7 @@ import isValidDomain from "is-valid-domain"; import { toAscii } from "idna-uts46-hx"; import { usePublicClient } from 'wagmi' -import { KINOMAP, kinomapAbi } from '../abis' +import { KIMAP, kimapAbi } from '../abis' import { kinohash } from "../utils/kinohash"; export const NAME_URL = "Name must contain only valid characters (a-z, 0-9, and -)"; @@ -80,8 +80,8 @@ function EnterKnsName({ // maybe separate into helper function for readability? // also note picking the right chain ID & address! const data = await client?.readContract({ - address: KINOMAP, - abi: kinomapAbi, + address: KIMAP, + abi: kimapAbi, functionName: "get", args: [namehash] }) diff --git a/kinode/src/register-ui/src/pages/CommitDotOsName.tsx b/kinode/src/register-ui/src/pages/CommitDotOsName.tsx index 836aca21..f6c8ee24 100644 --- a/kinode/src/register-ui/src/pages/CommitDotOsName.tsx +++ b/kinode/src/register-ui/src/pages/CommitDotOsName.tsx @@ -102,7 +102,7 @@ function CommitDotOsName({ <>

- Choose a name for your computer + Choose a name for your node

diff --git a/kinode/src/register-ui/src/pages/ImportKeyfile.tsx b/kinode/src/register-ui/src/pages/ImportKeyfile.tsx index 79b2491f..4021e954 100644 --- a/kinode/src/register-ui/src/pages/ImportKeyfile.tsx +++ b/kinode/src/register-ui/src/pages/ImportKeyfile.tsx @@ -118,13 +118,13 @@ function ImportKeyfile({ required minLength={6} name="password" - placeholder="Min 6 characters" + placeholder="" value={pw} onChange={(e) => setPw(e.target.value)} /> {pwErr &&

{pwErr}

} {pwDebounced && !pwVet && 6 <= pw.length && ( -

Password is incorrect

+

Password is incorrect!

)} @@ -132,7 +132,7 @@ function ImportKeyfile({ {keyErrs.map((x, i) => (

{x}

))} - +

Please note: if the original node was booted as a direct node diff --git a/kinode/src/register-ui/src/pages/KinodeHome.tsx b/kinode/src/register-ui/src/pages/KinodeHome.tsx index 172909f7..621cef20 100644 --- a/kinode/src/register-ui/src/pages/KinodeHome.tsx +++ b/kinode/src/register-ui/src/pages/KinodeHome.tsx @@ -27,12 +27,12 @@ function KinodeHome({ knsName }: OsHomeProps) { {previouslyBooted ? (

Welcome back!

- +
) : ( <>

Welcome to Kinode

-

New here? Register a username to get started

+

New here? Register a name to get started

Other options

- +
diff --git a/kinode/src/register-ui/src/pages/Login.tsx b/kinode/src/register-ui/src/pages/Login.tsx index 719b0514..f8a22c8d 100644 --- a/kinode/src/register-ui/src/pages/Login.tsx +++ b/kinode/src/register-ui/src/pages/Login.tsx @@ -115,14 +115,14 @@ function Login({ )} - +
diff --git a/kinode/src/register-ui/src/pages/MintCustom.tsx b/kinode/src/register-ui/src/pages/MintCustom.tsx index b2580f62..6ab4b9f4 100644 --- a/kinode/src/register-ui/src/pages/MintCustom.tsx +++ b/kinode/src/register-ui/src/pages/MintCustom.tsx @@ -125,6 +125,9 @@ function MintCustom({ ) : ( <> +

+ Register a name on a different top-level zone -- this will likely fail if that zone's requirements are not met +

diff --git a/kinode/src/register-ui/src/pages/MintDotOsName.tsx b/kinode/src/register-ui/src/pages/MintDotOsName.tsx index c95c8362..24652172 100644 --- a/kinode/src/register-ui/src/pages/MintDotOsName.tsx +++ b/kinode/src/register-ui/src/pages/MintDotOsName.tsx @@ -116,19 +116,19 @@ function MintDotOsName({ {
{isPending || isConfirming ? ( - + ) : ( <>
)} {isError && (

- Error: {error?.message || 'There was an error minting your dot-os-name, please try again.'} + Error: {error?.message || 'There was an error minting your name, please try again.'}

)} diff --git a/kinode/src/register-ui/src/pages/SetPassword.tsx b/kinode/src/register-ui/src/pages/SetPassword.tsx index 285e3536..279a1732 100644 --- a/kinode/src/register-ui/src/pages/SetPassword.tsx +++ b/kinode/src/register-ui/src/pages/SetPassword.tsx @@ -4,7 +4,7 @@ import { downloadKeyfile } from "../utils/download-keyfile"; import { Tooltip } from "../components/Tooltip"; import { sha256, toBytes } from "viem"; import { useSignTypedData, useAccount, useChainId } from 'wagmi' -import { KINOMAP } from "../abis"; +import { KIMAP } from "../abis"; type SetPasswordProps = { direct: boolean; @@ -61,7 +61,7 @@ function SetPassword({ name: "Kimap", version: "1", chainId: chainId, - verifyingContract: KINOMAP, + verifyingContract: KIMAP, }, types: { Boot: [ @@ -131,8 +131,8 @@ function SetPassword({ ) : (
- - + + setPw(e.target.value)} autoFocus @@ -154,7 +154,7 @@ function SetPassword({ required minLength={6} name="confirm-password" - placeholder="Min 6 characters" + placeholder="6 characters minimum" value={pw2} onChange={(e) => setPw2(e.target.value)} />