From 2cff82a53c4b83482c37e14e01f3818ce119d331 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Mon, 17 Apr 2023 21:13:14 +0700 Subject: [PATCH] feat(docs): remove ibc domain api --- docs/docs/hooks/useAddressToIbcDomain.md | 64 ----------------- docs/docs/hooks/useIbcDomainDetails.md | 69 ------------------- docs/docs/hooks/useIbcDomainToAddresses.md | 54 --------------- docs/docs/hooks/useIbcDomainToChainAddress.md | 56 --------------- docs/docs/hooks/useResolveToChainAddress.md | 58 ---------------- docs/docs/utilities/isIbcDomainPostfix.md | 15 ---- 6 files changed, 316 deletions(-) delete mode 100644 docs/docs/hooks/useAddressToIbcDomain.md delete mode 100644 docs/docs/hooks/useIbcDomainDetails.md delete mode 100644 docs/docs/hooks/useIbcDomainToAddresses.md delete mode 100644 docs/docs/hooks/useIbcDomainToChainAddress.md delete mode 100644 docs/docs/hooks/useResolveToChainAddress.md delete mode 100644 docs/docs/utilities/isIbcDomainPostfix.md diff --git a/docs/docs/hooks/useAddressToIbcDomain.md b/docs/docs/hooks/useAddressToIbcDomain.md deleted file mode 100644 index fb2b1b7c..00000000 --- a/docs/docs/hooks/useAddressToIbcDomain.md +++ /dev/null @@ -1,64 +0,0 @@ -# useAddressToIbcDomain - -Hook to retrieve an IBC domain from given address. - -#### Usage - -```tsx - import { useAddressToIbcDomain } from "graz"; - - // basic example - const { data, isFetching, refetch, ... } = useAddressToIbcDomain({ - address: "cosmos1g3jjhgkyf36pjhe7u5cw8j9u6cgl8x929ej430", - }); - -``` - -#### Params - -Object params - -- address?: `string` - Optional, if `address` undefined this hook won't run -- isTestnet?: `boolean` - Optional for pointing to testnet - -Note: it will initiate if `address` is there - -#### Types - -- `AddressToIbcDomainReturnValue` - ```ts - { - domain: string; - domainFull: string; - } - ``` - -#### Return Value - -```tsx -{ - data: AddressToIbcDomainReturnValue | undefined | null; - dataUpdatedAt: number; - error: TError | null; - errorUpdatedAt: number; - failureCount: number; - errorUpdateCount: number; - isError: boolean; - isFetched: boolean; - isFetchedAfterMount: boolean; - isFetching: boolean; - isLoading: boolean; - isLoadingError: boolean; - isPaused: boolean; - isPlaceholderData: boolean; - isPreviousData: boolean; - isRefetchError: boolean; - isRefetching: boolean; - isStale: boolean; - isSuccess: boolean; - refetch:(options?: RefetchOptions & RefetchQueryFilters) => Promise>; - remove: () => void; - status: 'loading' | 'error' | 'success'; - fetchStatus: 'fetching' | 'paused' | 'idle'; -} -``` diff --git a/docs/docs/hooks/useIbcDomainDetails.md b/docs/docs/hooks/useIbcDomainDetails.md deleted file mode 100644 index a6d8bf24..00000000 --- a/docs/docs/hooks/useIbcDomainDetails.md +++ /dev/null @@ -1,69 +0,0 @@ -# useIbcDomainDetails - -Hook to retrieve a ibc domain details from given ibc domain. - -#### Usage - -```tsx -import { useIbcDomainDetails } from "graz"; - -// basic example -const { data, isFetching, refetch, ... } = useIbcDomainDetails({ - ibcDomain: "kikiding.cosmos", -}); - -``` - -#### Params - -Object params - -- ibcDomain?: `string` - Optional ibc domain, if `ibcDomain` undefined this hook won't run -- isTestnet?: `boolean` - Optional for pointing to testnet - -Note: it will initiate if `ibcDomain` is there - -#### Types - -- `DomainDetails` - ```ts - { - expiration: string | null; - imageData: string | null; - twitterId: string | null; - discordId: string | null; - telegramId: string | null; - keybaseId: string | null; - pgpPublicKey: string | null; - } - ``` - -#### Return Value - -```tsx -{ - data: DomainDetails | undefined | null; - dataUpdatedAt: number; - error: TError | null; - errorUpdatedAt: number; - failureCount: number; - errorUpdateCount: number; - isError: boolean; - isFetched: boolean; - isFetchedAfterMount: boolean; - isFetching: boolean; - isLoading: boolean; - isLoadingError: boolean; - isPaused: boolean; - isPlaceholderData: boolean; - isPreviousData: boolean; - isRefetchError: boolean; - isRefetching: boolean; - isStale: boolean; - isSuccess: boolean; - refetch:(options?: RefetchOptions & RefetchQueryFilters) => Promise>; - remove: () => void; - status: 'loading' | 'error' | 'success'; - fetchStatus: 'fetching' | 'paused' | 'idle'; -} -``` diff --git a/docs/docs/hooks/useIbcDomainToAddresses.md b/docs/docs/hooks/useIbcDomainToAddresses.md deleted file mode 100644 index 24647906..00000000 --- a/docs/docs/hooks/useIbcDomainToAddresses.md +++ /dev/null @@ -1,54 +0,0 @@ -# useIbcDomainToAddresses - -Hook to retrieve an addresses from given IBC domain. - -#### Usage - -```tsx -import { useIbcDomainToAddresses } from "graz"; - -// basic example -const { data, isFetching, refetch, ... } = useIbcDomainToAddresses({ - ibcDomain: "kikiding.cosmos", -}); - -``` - -#### Params - -Object params - -- ibcDomain?: `string` - Optional ibc domain, if `ibcDomain` undefined this hook won't run -- isTestnet?: `boolean` - Optional for pointing to testnet - -Note: it will initiate if `ibcDomain` is there - -#### Return Value - -```tsx -{ - data: string[] | undefined | null; - dataUpdatedAt: number; - error: TError | null; - errorUpdatedAt: number; - failureCount: number; - errorUpdateCount: number; - isError: boolean; - isFetched: boolean; - isFetchedAfterMount: boolean; - isFetching: boolean; - isLoading: boolean; - isLoadingError: boolean; - isPaused: boolean; - isPlaceholderData: boolean; - isPreviousData: boolean; - isRefetchError: boolean; - isRefetching: boolean; - isStale: boolean; - isSuccess: boolean; - refetch:(options?: RefetchOptions & RefetchQueryFilters) => Promise>; - remove: () => void; - status: 'loading' | 'error' | 'success'; - fetchStatus: 'fetching' | 'paused' | 'idle'; -} -``` diff --git a/docs/docs/hooks/useIbcDomainToChainAddress.md b/docs/docs/hooks/useIbcDomainToChainAddress.md deleted file mode 100644 index ee42691a..00000000 --- a/docs/docs/hooks/useIbcDomainToChainAddress.md +++ /dev/null @@ -1,56 +0,0 @@ -# useIbcDomainToChainAddress - -Hook to retrieve an address from given IBC domain and prefix. - -#### Usage - -```tsx -import { useIbcDomainToAddresses } from "graz"; - -// basic example -const { data, isFetching, refetch, ... } = useIbcDomainToAddresses({ - ibcDomain: "kikiding.cosmos", - prefix: "osmo" -}); - -``` - -#### Params - -Object params - -- ibcDomain?: `string` - Optional ibc domain -- prefix? - `string` Optional string or bech32 prefix of the destination chain, for instance "cosmos", "somm", etc -- isTestnet?: `boolean` - Optional for pointing to testnet - -Note: it will initiate if `ibcDomain` and `prefix` are there - -#### Return Value - -```tsx -{ - data: string | undefined | null; - dataUpdatedAt: number; - error: TError | null; - errorUpdatedAt: number; - failureCount: number; - errorUpdateCount: number; - isError: boolean; - isFetched: boolean; - isFetchedAfterMount: boolean; - isFetching: boolean; - isLoading: boolean; - isLoadingError: boolean; - isPaused: boolean; - isPlaceholderData: boolean; - isPreviousData: boolean; - isRefetchError: boolean; - isRefetching: boolean; - isStale: boolean; - isSuccess: boolean; - refetch:(options?: RefetchOptions & RefetchQueryFilters) => Promise>; - remove: () => void; - status: 'loading' | 'error' | 'success'; - fetchStatus: 'fetching' | 'paused' | 'idle'; -} -``` diff --git a/docs/docs/hooks/useResolveToChainAddress.md b/docs/docs/hooks/useResolveToChainAddress.md deleted file mode 100644 index 1e16770d..00000000 --- a/docs/docs/hooks/useResolveToChainAddress.md +++ /dev/null @@ -1,58 +0,0 @@ -# useSendIbcTokens - -Mutation hook to resolve an Ibc domain or an address to bech32 address from given string - -#### Usage - -```tsx - import { useResolveToChainAddress } from "graz"; - - // basic example - const { resolveToChainAddress } = useResolveToChainAddress(); - - // with event arguments - useResolveToChainAddress({ - onError: (err, args) => { ... }, - onLoading: () => { ... }, - onSuccess: ({ account, address }) => { ... }, - }); - - // resolveToChainAddress usage - resolveToChainAddress({ - value: "kikiding.cosmos", - prefix: "osmo" - ... - }); -``` - -#### Types - -- `ResolveToChainAddressArgs` - ```ts - { - value: string; - prefix: ChainPrefix; - isTestnet?: boolean; - } - ``` - -#### Params - -Object params - -- onError?: `(error: unknown, args: ResolveToChainAddressArgs) => void` -- onMutate?: `(data: ResolveToChainAddressArgs) => void` -- onSuccess?: `(data: string) => void` - -#### Return Value - -```tsx -{ - error: unknown; - isLoading: boolean; - isSuccess: boolean; - resolveToChainAddress: (args: ResolveToChainAddressArgs) => void; - resolveToChainAddressAsync: (args: ResolveToChainAddressArgs) => Promise; - status: "error" | "idle" | "loading" | "success"; -} -``` diff --git a/docs/docs/utilities/isIbcDomainPostfix.md b/docs/docs/utilities/isIbcDomainPostfix.md deleted file mode 100644 index 762c695b..00000000 --- a/docs/docs/utilities/isIbcDomainPostfix.md +++ /dev/null @@ -1,15 +0,0 @@ -# isIbcDomainPostfix - -Function to return a `boolean` that check given string is have ".cosmos' post fix. - -#### Params - -- value: `string` - -#### Usage - -```tsx -import { isIbcDomainPostfix } from "graz"; - -isIbcDomainPostfix(input); -```