@ecency/wallets 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/index.cjs +3396 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +1627 -0
  4. package/dist/index.d.ts +1627 -2
  5. package/dist/index.mjs +3283 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +28 -15
  8. package/dist/ecency-sdk.es.js +0 -23215
  9. package/dist/internal/scrypt-guard.d.ts +0 -1
  10. package/dist/modules/assets/external/apt/get-apt-asset-balance-query-options.d.ts +0 -8
  11. package/dist/modules/assets/external/apt/get-apt-asset-general-info-query-options.d.ts +0 -28
  12. package/dist/modules/assets/external/apt/index.d.ts +0 -2
  13. package/dist/modules/assets/external/bnb/get-bnb-asset-balance-query-options.d.ts +0 -8
  14. package/dist/modules/assets/external/bnb/get-bnb-asset-general-info-query-options.d.ts +0 -28
  15. package/dist/modules/assets/external/bnb/index.d.ts +0 -2
  16. package/dist/modules/assets/external/btc/get-btc-asset-balance-query-options.d.ts +0 -8
  17. package/dist/modules/assets/external/btc/get-btc-asset-general-info-query-options.d.ts +0 -28
  18. package/dist/modules/assets/external/btc/index.d.ts +0 -2
  19. package/dist/modules/assets/external/common/index.d.ts +0 -1
  20. package/dist/modules/assets/external/common/parse-private-api-balance.d.ts +0 -23
  21. package/dist/modules/assets/external/eth/get-eth-asset-balance-query-options.d.ts +0 -8
  22. package/dist/modules/assets/external/eth/get-eth-asset-general-info-query-options.d.ts +0 -28
  23. package/dist/modules/assets/external/eth/index.d.ts +0 -2
  24. package/dist/modules/assets/external/index.d.ts +0 -7
  25. package/dist/modules/assets/external/sol/get-sol-asset-balance-query-options.d.ts +0 -8
  26. package/dist/modules/assets/external/sol/get-sol-asset-general-info-query-options.d.ts +0 -28
  27. package/dist/modules/assets/external/sol/index.d.ts +0 -2
  28. package/dist/modules/assets/external/ton/get-ton-asset-balance-query-options.d.ts +0 -8
  29. package/dist/modules/assets/external/ton/get-ton-asset-general-info-query-options.d.ts +0 -28
  30. package/dist/modules/assets/external/ton/index.d.ts +0 -2
  31. package/dist/modules/assets/external/tron/get-tron-asset-balance-query-options.d.ts +0 -8
  32. package/dist/modules/assets/external/tron/get-tron-asset-general-info-query-options.d.ts +0 -28
  33. package/dist/modules/assets/external/tron/index.d.ts +0 -2
  34. package/dist/modules/assets/hive/consts/hive-account-operation-groups.d.ts +0 -2
  35. package/dist/modules/assets/hive/consts/index.d.ts +0 -1
  36. package/dist/modules/assets/hive/index.d.ts +0 -2
  37. package/dist/modules/assets/hive/mutations/claim-rewards.d.ts +0 -1
  38. package/dist/modules/assets/hive/mutations/delegate.d.ts +0 -13
  39. package/dist/modules/assets/hive/mutations/index.d.ts +0 -7
  40. package/dist/modules/assets/hive/mutations/power-down.d.ts +0 -11
  41. package/dist/modules/assets/hive/mutations/power-up.d.ts +0 -13
  42. package/dist/modules/assets/hive/mutations/transfer-to-savings.d.ts +0 -13
  43. package/dist/modules/assets/hive/mutations/transfer.d.ts +0 -12
  44. package/dist/modules/assets/hive/mutations/withdraw-route.d.ts +0 -13
  45. package/dist/modules/assets/hive/queries/get-hbd-asset-general-info-query-options.d.ts +0 -76
  46. package/dist/modules/assets/hive/queries/get-hbd-asset-transactions-query-options.d.ts +0 -9
  47. package/dist/modules/assets/hive/queries/get-hive-asset-general-info-query-options.d.ts +0 -28
  48. package/dist/modules/assets/hive/queries/get-hive-asset-metric-query-options.d.ts +0 -43
  49. package/dist/modules/assets/hive/queries/get-hive-asset-transactions-query-options.d.ts +0 -9
  50. package/dist/modules/assets/hive/queries/get-hive-asset-withdrawal-routes-query-options.d.ts +0 -9
  51. package/dist/modules/assets/hive/queries/get-hive-power-asset-general-info-query-options.d.ts +0 -76
  52. package/dist/modules/assets/hive/queries/get-hive-power-asset-transactions-query-options.d.ts +0 -9
  53. package/dist/modules/assets/hive/queries/get-hive-power-delegates-query-options.d.ts +0 -9
  54. package/dist/modules/assets/hive/queries/get-hive-power-delegatings-query-options.d.ts +0 -9
  55. package/dist/modules/assets/hive/queries/index.d.ts +0 -10
  56. package/dist/modules/assets/hive/types/delegated-vesting-share.d.ts +0 -7
  57. package/dist/modules/assets/hive/types/hive-market-metric.d.ts +0 -19
  58. package/dist/modules/assets/hive/types/hive-operation-group.d.ts +0 -1
  59. package/dist/modules/assets/hive/types/hive-transaction.d.ts +0 -198
  60. package/dist/modules/assets/hive/types/hive-withdraw-route.d.ts +0 -7
  61. package/dist/modules/assets/hive/types/index.d.ts +0 -6
  62. package/dist/modules/assets/hive/types/received-vesting-share.d.ts +0 -6
  63. package/dist/modules/assets/hive-engine/index.d.ts +0 -3
  64. package/dist/modules/assets/hive-engine/mutations/delegate.d.ts +0 -12
  65. package/dist/modules/assets/hive-engine/mutations/index.d.ts +0 -5
  66. package/dist/modules/assets/hive-engine/mutations/stake.d.ts +0 -12
  67. package/dist/modules/assets/hive-engine/mutations/transfer.d.ts +0 -13
  68. package/dist/modules/assets/hive-engine/mutations/undelegate.d.ts +0 -12
  69. package/dist/modules/assets/hive-engine/mutations/unstake.d.ts +0 -12
  70. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-general-info-query-options.d.ts +0 -32
  71. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-metrics-query-options.d.ts +0 -9
  72. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-transactions-query-options.d.ts +0 -9
  73. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-balances-query-options.d.ts +0 -9
  74. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-market-query-options.d.ts +0 -9
  75. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-metadata-query-options.d.ts +0 -9
  76. package/dist/modules/assets/hive-engine/queries/index.d.ts +0 -6
  77. package/dist/modules/assets/hive-engine/types/hive-engine-list-response.d.ts +0 -13
  78. package/dist/modules/assets/hive-engine/types/hive-engine-metric.d.ts +0 -9
  79. package/dist/modules/assets/hive-engine/types/hive-engine-token-balance.d.ts +0 -10
  80. package/dist/modules/assets/hive-engine/types/hive-engine-token-metadata-response.d.ts +0 -16
  81. package/dist/modules/assets/hive-engine/types/hive-engine-transaction.d.ts +0 -14
  82. package/dist/modules/assets/hive-engine/types/index.d.ts +0 -6
  83. package/dist/modules/assets/index.d.ts +0 -6
  84. package/dist/modules/assets/points/index.d.ts +0 -3
  85. package/dist/modules/assets/points/mutations/claim-points.d.ts +0 -2
  86. package/dist/modules/assets/points/mutations/gift.d.ts +0 -14
  87. package/dist/modules/assets/points/mutations/index.d.ts +0 -2
  88. package/dist/modules/assets/points/queries/get-points-asset-general-info-query-options.d.ts +0 -28
  89. package/dist/modules/assets/points/queries/get-points-asset-transactions-query-options.d.ts +0 -41
  90. package/dist/modules/assets/points/queries/get-points-query-options.d.ts +0 -20
  91. package/dist/modules/assets/points/queries/index.d.ts +0 -3
  92. package/dist/modules/assets/points/types/index.d.ts +0 -4
  93. package/dist/modules/assets/points/types/point-transaction-type.d.ts +0 -15
  94. package/dist/modules/assets/points/types/point-transaction.d.ts +0 -10
  95. package/dist/modules/assets/points/types/points-response.d.ts +0 -4
  96. package/dist/modules/assets/points/types/points.d.ts +0 -4
  97. package/dist/modules/assets/spk/index.d.ts +0 -2
  98. package/dist/modules/assets/spk/mutations/index.d.ts +0 -4
  99. package/dist/modules/assets/spk/mutations/lock.d.ts +0 -12
  100. package/dist/modules/assets/spk/mutations/power-up.d.ts +0 -12
  101. package/dist/modules/assets/spk/mutations/transfer.d.ts +0 -14
  102. package/dist/modules/assets/spk/queries/get-larynx-asset-general-info-query-options.d.ts +0 -56
  103. package/dist/modules/assets/spk/queries/get-larynx-power-asset-general-info-query-options.d.ts +0 -76
  104. package/dist/modules/assets/spk/queries/get-spk-asset-general-info-query-options.d.ts +0 -28
  105. package/dist/modules/assets/spk/queries/get-spk-markets-query-options.d.ts +0 -33
  106. package/dist/modules/assets/spk/queries/get-spk-wallet-query-options.d.ts +0 -9
  107. package/dist/modules/assets/spk/queries/index.d.ts +0 -4
  108. package/dist/modules/assets/types/asset-operation.d.ts +0 -17
  109. package/dist/modules/assets/types/general-asset-info.d.ts +0 -12
  110. package/dist/modules/assets/types/general-asset-transaction.d.ts +0 -13
  111. package/dist/modules/assets/types/hive-based-asset-sign-type.d.ts +0 -1
  112. package/dist/modules/assets/types/index.d.ts +0 -5
  113. package/dist/modules/assets/types/spk-wallet.d.ts +0 -60
  114. package/dist/modules/assets/utils/index.d.ts +0 -4
  115. package/dist/modules/assets/utils/is-empty-date.d.ts +0 -1
  116. package/dist/modules/assets/utils/parse-asset.d.ts +0 -17
  117. package/dist/modules/assets/utils/reward-spk.d.ts +0 -2
  118. package/dist/modules/assets/utils/vests-to-hp.d.ts +0 -1
  119. package/dist/modules/wallets/consts/hive-engine-tokens.d.ts +0 -1
  120. package/dist/modules/wallets/consts/index.d.ts +0 -1
  121. package/dist/modules/wallets/enums/ecency-wallet-basic-tokens.d.ts +0 -7
  122. package/dist/modules/wallets/enums/ecency-wallet-currency.d.ts +0 -9
  123. package/dist/modules/wallets/enums/index.d.ts +0 -2
  124. package/dist/modules/wallets/functions/get-keys-from-seed.d.ts +0 -3
  125. package/dist/modules/wallets/functions/index.d.ts +0 -1
  126. package/dist/modules/wallets/index.d.ts +0 -5
  127. package/dist/modules/wallets/mutations/index.d.ts +0 -5
  128. package/dist/modules/wallets/mutations/private-api/check-wallet-existence.d.ts +0 -7
  129. package/dist/modules/wallets/mutations/private-api/create-account-with-wallets.d.ts +0 -6
  130. package/dist/modules/wallets/mutations/private-api/index.d.ts +0 -2
  131. package/dist/modules/wallets/mutations/private-api-namespace.d.ts +0 -2
  132. package/dist/modules/wallets/mutations/save-wallet-information-to-metadata.d.ts +0 -9
  133. package/dist/modules/wallets/mutations/use-import-wallet.d.ts +0 -15
  134. package/dist/modules/wallets/mutations/use-wallet-create.d.ts +0 -11
  135. package/dist/modules/wallets/mutations/wallet-operation.d.ts +0 -2
  136. package/dist/modules/wallets/queries/get-account-wallet-asset-info-query-options.d.ts +0 -13
  137. package/dist/modules/wallets/queries/get-all-tokens-list-query-options.d.ts +0 -30
  138. package/dist/modules/wallets/queries/get-coingecko-price-query-options.d.ts +0 -8
  139. package/dist/modules/wallets/queries/get-tokens-operations-query-options.d.ts +0 -9
  140. package/dist/modules/wallets/queries/index.d.ts +0 -8
  141. package/dist/modules/wallets/queries/use-get-account-wallet-list-query.d.ts +0 -8
  142. package/dist/modules/wallets/queries/use-get-external-wallet-query.d.ts +0 -17
  143. package/dist/modules/wallets/queries/use-hive-keys-query.d.ts +0 -2
  144. package/dist/modules/wallets/queries/use-seed-phrase.d.ts +0 -1
  145. package/dist/modules/wallets/types/account-points-response.d.ts +0 -4
  146. package/dist/modules/wallets/types/ecency-create-wallet-information.d.ts +0 -13
  147. package/dist/modules/wallets/types/ecency-hive-keys.d.ts +0 -12
  148. package/dist/modules/wallets/types/index.d.ts +0 -3
  149. package/dist/modules/wallets/utils/build-external-transaction.d.ts +0 -48
  150. package/dist/modules/wallets/utils/decrypt-memo.d.ts +0 -12
  151. package/dist/modules/wallets/utils/delay.d.ts +0 -1
  152. package/dist/modules/wallets/utils/derive-hive-bip44-keys.d.ts +0 -15
  153. package/dist/modules/wallets/utils/derive-hive-master-password-keys.d.ts +0 -15
  154. package/dist/modules/wallets/utils/detect-hive-key-derivation.d.ts +0 -2
  155. package/dist/modules/wallets/utils/encrypt-memo.d.ts +0 -16
  156. package/dist/modules/wallets/utils/get-wallet.d.ts +0 -3
  157. package/dist/modules/wallets/utils/index.d.ts +0 -12
  158. package/dist/modules/wallets/utils/mnemonic-to-seed-bip-39.d.ts +0 -1
  159. package/dist/modules/wallets/utils/sign-digest.d.ts +0 -7
  160. package/dist/modules/wallets/utils/sign-external-transaction.d.ts +0 -18
  161. package/dist/modules/wallets/utils/sign-transaction.d.ts +0 -23
  162. package/dist/vite.config.d.ts +0 -2
@@ -1,9 +0,0 @@
1
- import { useMutation } from '@tanstack/react-query';
2
- import { EcencyTokenMetadata } from '../types';
3
- /**
4
- * Saving of token(s) metadata to Hive profile
5
- * It may contain: external wallets(see EcencyWalletCurrency), Hive tokens arrangement
6
- *
7
- * Basically, this mutation is a convenient wrapper for update profile operation
8
- */
9
- export declare function useSaveWalletInformationToMetadata(username: string, options?: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<unknown, unknown, EcencyTokenMetadata[], unknown>;
@@ -1,15 +0,0 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- interface Payload {
3
- privateKeyOrSeed: string;
4
- }
5
- /**
6
- * This mutation uses for importing an existing wallet, validation and saving logically in application
7
- *
8
- * Keep attention: this mutation doesn't save wallet to somewhere in a server
9
- */
10
- export declare function useImportWallet(username: string, currency: EcencyWalletCurrency): import('@tanstack/react-query').UseMutationResult<{
11
- privateKey: string;
12
- address: any;
13
- publicKey: string;
14
- }, Error, Payload, unknown>;
15
- export {};
@@ -1,11 +0,0 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- import { EcencyTokenMetadata } from '../types';
3
- /**
4
- * Uses for creating wallet logically in the application
5
- *
6
- * Keep attention: this mutation doesn't save wallet to somewhere in a server
7
- */
8
- export declare function useWalletCreate(username: string, currency: EcencyWalletCurrency): {
9
- createWallet: import('@tanstack/react-query').UseMutationResult<EcencyTokenMetadata, Error, void, unknown>;
10
- importWallet: () => void;
11
- };
@@ -1,2 +0,0 @@
1
- import { AssetOperation } from '../../assets';
2
- export declare function useWalletOperation(username: string, asset: string, operation: AssetOperation): import('@tanstack/react-query').UseMutationResult<any, Error, Record<string, unknown>, unknown>;
@@ -1,13 +0,0 @@
1
- import { GeneralAssetInfo } from '../../assets';
2
- interface Options {
3
- refetch: boolean;
4
- }
5
- export declare function getAccountWalletAssetInfoQueryOptions(username: string, asset: string, options?: Options): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<GeneralAssetInfo | undefined, Error, GeneralAssetInfo | undefined, string[]>, "queryFn"> & {
6
- queryFn?: import('@tanstack/query-core').QueryFunction<GeneralAssetInfo | undefined, string[], never> | undefined;
7
- } & {
8
- queryKey: string[] & {
9
- [dataTagSymbol]: GeneralAssetInfo | undefined;
10
- [dataTagErrorSymbol]: Error;
11
- };
12
- };
13
- export {};
@@ -1,30 +0,0 @@
1
- import { HiveEngineTokenMetadataResponse } from '../../assets/hive-engine/types';
2
- import { EcencyWalletBasicTokens, EcencyWalletCurrency } from '../enums';
3
- export declare function getAllTokensListQueryOptions(query: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
4
- basic: EcencyWalletBasicTokens[];
5
- external: EcencyWalletCurrency[];
6
- spk: string[];
7
- layer2: HiveEngineTokenMetadataResponse[] | undefined;
8
- }, Error, {
9
- basic: EcencyWalletBasicTokens[];
10
- external: EcencyWalletCurrency[];
11
- spk: string[];
12
- layer2: HiveEngineTokenMetadataResponse[] | undefined;
13
- }, string[]>, "queryFn"> & {
14
- queryFn?: import('@tanstack/query-core').QueryFunction<{
15
- basic: EcencyWalletBasicTokens[];
16
- external: EcencyWalletCurrency[];
17
- spk: string[];
18
- layer2: HiveEngineTokenMetadataResponse[] | undefined;
19
- }, string[], never> | undefined;
20
- } & {
21
- queryKey: string[] & {
22
- [dataTagSymbol]: {
23
- basic: EcencyWalletBasicTokens[];
24
- external: EcencyWalletCurrency[];
25
- spk: string[];
26
- layer2: HiveEngineTokenMetadataResponse[] | undefined;
27
- };
28
- [dataTagErrorSymbol]: Error;
29
- };
30
- };
@@ -1,8 +0,0 @@
1
- export declare function getCoinGeckoPriceQueryOptions(currency?: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<number, Error, number, (string | undefined)[]>, "queryFn"> & {
2
- queryFn?: import('@tanstack/query-core').QueryFunction<number, (string | undefined)[], never> | undefined;
3
- } & {
4
- queryKey: (string | undefined)[] & {
5
- [dataTagSymbol]: number;
6
- [dataTagErrorSymbol]: Error;
7
- };
8
- };
@@ -1,9 +0,0 @@
1
- import { AssetOperation } from '../../assets';
2
- export declare function getTokenOperationsQueryOptions(token: string, username: string, isForOwner?: boolean): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<AssetOperation[], Error, AssetOperation[], (string | boolean)[]>, "queryFn"> & {
3
- queryFn?: import('@tanstack/query-core').QueryFunction<AssetOperation[], (string | boolean)[], never> | undefined;
4
- } & {
5
- queryKey: (string | boolean)[] & {
6
- [dataTagSymbol]: AssetOperation[];
7
- [dataTagErrorSymbol]: Error;
8
- };
9
- };
@@ -1,8 +0,0 @@
1
- export * from './use-get-external-wallet-query';
2
- export * from './use-seed-phrase';
3
- export * from './get-coingecko-price-query-options';
4
- export * from './use-hive-keys-query';
5
- export * from './get-all-tokens-list-query-options';
6
- export * from './use-get-account-wallet-list-query';
7
- export * from './get-account-wallet-asset-info-query-options';
8
- export * from './get-tokens-operations-query-options';
@@ -1,8 +0,0 @@
1
- export declare function getAccountWalletListQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<string[], Error, string[], string[]>, "queryFn"> & {
2
- queryFn?: import('@tanstack/query-core').QueryFunction<string[], string[], never> | undefined;
3
- } & {
4
- queryKey: string[] & {
5
- [dataTagSymbol]: string[];
6
- [dataTagErrorSymbol]: Error;
7
- };
8
- };
@@ -1,17 +0,0 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- export interface ExternalWalletBalance {
3
- chain: string;
4
- unit: string;
5
- raw?: unknown;
6
- nodeId?: string;
7
- /**
8
- * Balance represented as a BigInt for convenience.
9
- */
10
- balanceBigInt: bigint;
11
- /**
12
- * Balance returned as a string to preserve precision for UIs that cannot
13
- * handle bigint values directly.
14
- */
15
- balanceString: string;
16
- }
17
- export declare function useGetExternalWalletBalanceQuery(currency: EcencyWalletCurrency, address: string): import('@tanstack/react-query').UseQueryResult<ExternalWalletBalance, Error>;
@@ -1,2 +0,0 @@
1
- import { EcencyHiveKeys } from '../types';
2
- export declare function useHiveKeysQuery(username: string): import('@tanstack/react-query').UseQueryResult<EcencyHiveKeys, Error>;
@@ -1 +0,0 @@
1
- export declare function useSeedPhrase(username: string): import('@tanstack/react-query').UseQueryResult<string, Error>;
@@ -1,4 +0,0 @@
1
- export interface AccountPointsResponse {
2
- points: string;
3
- unclaimed_points: string;
4
- }
@@ -1,13 +0,0 @@
1
- export interface EcencyTokenMetadata {
2
- address?: string;
3
- privateKey?: string;
4
- publicKey?: string;
5
- username?: string;
6
- currency?: string;
7
- custom?: boolean;
8
- type: string;
9
- /**
10
- * Represents showing of the token in the Ecency wallet
11
- */
12
- show?: boolean;
13
- }
@@ -1,12 +0,0 @@
1
- export interface EcencyHiveKeys {
2
- username: string;
3
- owner: string;
4
- active: string;
5
- posting: string;
6
- memo: string;
7
- masterPassword: string;
8
- ownerPubkey: string;
9
- activePubkey: string;
10
- postingPubkey: string;
11
- memoPubkey: string;
12
- }
@@ -1,3 +0,0 @@
1
- export * from './ecency-create-wallet-information';
2
- export * from './ecency-hive-keys';
3
- export * from './account-points-response';
@@ -1,48 +0,0 @@
1
- import { utxoTx } from '@okxweb3/coin-bitcoin/dist/type';
2
- import { Network as BtcNetwork } from '@okxweb3/coin-bitcoin/dist/bitcoinjs-lib';
3
- import { EthTxParams } from '@okxweb3/coin-ethereum/dist/EthWallet';
4
- import { SolSignParam } from '@okxweb3/coin-solana/dist/SolWallet';
5
- import { TrxSignParam } from '@okxweb3/coin-tron/dist/TrxWallet';
6
- import { TxData as TonTxData } from '@okxweb3/coin-ton/dist/api/types';
7
- import { AptosParam } from '@okxweb3/coin-aptos/dist/AptosWallet';
8
- import { EcencyWalletCurrency } from '../enums';
9
- /**
10
- * Union type covering all chain-specific build parameters.
11
- */
12
- export type ExternalTxParams = utxoTx | EthTxParams | SolSignParam | TrxSignParam | TonTxData | AptosParam;
13
- /**
14
- * Build a Bitcoin PSBT from UTXO inputs and desired outputs.
15
- *
16
- * @param tx Transaction description accepted by @okxweb3/coin-bitcoin.
17
- * @returns Hex encoded PSBT ready for signing.
18
- */
19
- export declare function buildPsbt(tx: utxoTx, network?: BtcNetwork, maximumFeeRate?: number): string;
20
- /**
21
- * Helper returning raw Ethereum transaction data ready for signing.
22
- *
23
- * The returned object can be passed directly to signExternalTx.
24
- */
25
- export declare function buildEthTx(data: EthTxParams): EthTxParams;
26
- /**
27
- * Helper returning Solana transaction params used by signExternalTx.
28
- */
29
- export declare function buildSolTx(data: SolSignParam): SolSignParam;
30
- /**
31
- * Helper returning Tron transaction params used by signExternalTx.
32
- */
33
- export declare function buildTronTx(data: TrxSignParam): TrxSignParam;
34
- /**
35
- * Helper returning TON transaction params used by signExternalTx.
36
- */
37
- export declare function buildTonTx(data: TonTxData): TonTxData;
38
- /**
39
- * Helper returning Aptos transaction params used by signExternalTx.
40
- */
41
- export declare function buildAptTx(data: AptosParam): AptosParam;
42
- /**
43
- * Build a transaction for an external chain supported by okxweb3 wallets.
44
- *
45
- * @param currency Chain identifier.
46
- * @param tx Chain specific transaction description.
47
- */
48
- export declare function buildExternalTx(currency: EcencyWalletCurrency, tx: ExternalTxParams): string | EthTxParams | SolSignParam | TrxSignParam | TonTxData | AptosParam;
@@ -1,12 +0,0 @@
1
- /**
2
- * Decrypt an encrypted memo using the recipient's private key.
3
- * @param privateKey Private memo key in WIF format.
4
- * @param memo Encrypted memo string.
5
- */
6
- export declare function decryptMemoWithKeys(privateKey: string, memo: string): string;
7
- /**
8
- * Decrypt a memo using account information.
9
- * This is an alias of {@link decryptMemoWithKeys} and provided for
10
- * API symmetry with {@link encryptMemoWithAccounts}.
11
- */
12
- export declare const decryptMemoWithAccounts: typeof decryptMemoWithKeys;
@@ -1 +0,0 @@
1
- export declare function delay(ms: number): Promise<unknown>;
@@ -1,15 +0,0 @@
1
- export type HiveRole = "owner" | "active" | "posting" | "memo";
2
- export declare function deriveHiveKey(mnemonic: string, role: HiveRole, accountIndex?: number): {
3
- readonly privateKey: string;
4
- readonly publicKey: string;
5
- };
6
- export declare function deriveHiveKeys(mnemonic: string, accountIndex?: number): {
7
- readonly owner: string;
8
- readonly active: string;
9
- readonly posting: string;
10
- readonly memo: string;
11
- readonly ownerPubkey: string;
12
- readonly activePubkey: string;
13
- readonly postingPubkey: string;
14
- readonly memoPubkey: string;
15
- };
@@ -1,15 +0,0 @@
1
- import { HiveRole } from './derive-hive-bip44-keys';
2
- export declare function deriveHiveMasterPasswordKey(username: string, masterPassword: string, role: HiveRole): {
3
- readonly privateKey: string;
4
- readonly publicKey: string;
5
- };
6
- export declare function deriveHiveMasterPasswordKeys(username: string, masterPassword: string): {
7
- readonly owner: string;
8
- readonly active: string;
9
- readonly posting: string;
10
- readonly memo: string;
11
- readonly ownerPubkey: string;
12
- readonly activePubkey: string;
13
- readonly postingPubkey: string;
14
- readonly memoPubkey: string;
15
- };
@@ -1,2 +0,0 @@
1
- export type HiveKeyDerivation = "bip44" | "master-password" | "unknown";
2
- export declare function detectHiveKeyDerivation(username: string, seed: string, type?: "active" | "owner"): Promise<HiveKeyDerivation>;
@@ -1,16 +0,0 @@
1
- import { Client } from '@hiveio/dhive';
2
- /**
3
- * Encrypt a memo using explicit keys.
4
- * @param privateKey Sender's private memo key in WIF format.
5
- * @param publicKey Recipient's public memo key.
6
- * @param memo Memo text to encrypt.
7
- */
8
- export declare function encryptMemoWithKeys(privateKey: string, publicKey: string, memo: string): string;
9
- /**
10
- * Encrypt a memo by looking up the recipient's memo key from the blockchain.
11
- * @param client Hive client instance used to fetch account information.
12
- * @param fromPrivateKey Sender's private memo key.
13
- * @param toAccount Recipient account name.
14
- * @param memo Memo text to encrypt.
15
- */
16
- export declare function encryptMemoWithAccounts(client: Client, fromPrivateKey: string, toAccount: string, memo: string): Promise<string>;
@@ -1,3 +0,0 @@
1
- import { BaseWallet } from '@okxweb3/coin-base';
2
- import { EcencyWalletCurrency } from '../enums';
3
- export declare function getWallet(currency: EcencyWalletCurrency): BaseWallet | undefined;
@@ -1,12 +0,0 @@
1
- export * from './delay';
2
- export * from './get-wallet';
3
- export * from './mnemonic-to-seed-bip-39';
4
- export * from './derive-hive-bip44-keys';
5
- export * from './derive-hive-master-password-keys';
6
- export * from './detect-hive-key-derivation';
7
- export * from './sign-digest';
8
- export * from './sign-transaction';
9
- export * from './encrypt-memo';
10
- export * from './decrypt-memo';
11
- export * from './sign-external-transaction';
12
- export * from './build-external-transaction';
@@ -1 +0,0 @@
1
- export declare function mnemonicToSeedBip39(value: string): string;
@@ -1,7 +0,0 @@
1
- /**
2
- * Sign a digest using the provided private key.
3
- * @param digest Digest as a Buffer or hex string.
4
- * @param privateKey Private key in WIF format.
5
- * @returns Hex encoded signature string.
6
- */
7
- export declare function signDigest(digest: Buffer | string, privateKey: string): string;
@@ -1,18 +0,0 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- import { SignTxParams } from '@okxweb3/coin-base';
3
- /**
4
- * Sign a transaction for an external chain supported by okxweb3 wallets.
5
- *
6
- * @param currency Chain identifier.
7
- * @param params Signing parameters accepted by okxweb3 wallets.
8
- */
9
- export declare function signExternalTx(currency: EcencyWalletCurrency, params: SignTxParams): Promise<any>;
10
- /**
11
- * Sign and broadcast a transaction for an external chain. The transaction is
12
- * signed locally and then sent to a public RPC endpoint for broadcasting.
13
- *
14
- * @param currency Chain identifier.
15
- * @param params Signing parameters accepted by okxweb3 wallets.
16
- * @returns RPC response or broadcasted transaction hash.
17
- */
18
- export declare function signExternalTxAndBroadcast(currency: EcencyWalletCurrency, params: SignTxParams): Promise<any>;
@@ -1,23 +0,0 @@
1
- import { Client } from '@hiveio/dhive';
2
- import { Transaction, SignedTransaction, TransactionConfirmation } from '@hiveio/dhive/lib/chain/transaction';
3
- /**
4
- * Sign a transaction with the given private key.
5
- * Optionally a custom chain id can be provided.
6
- *
7
- * @param tx Transaction to sign.
8
- * @param privateKey Private key in WIF format.
9
- * @param chainId Optional chain id as a hex string.
10
- * @returns Signed transaction including the signature.
11
- */
12
- export declare function signTx(tx: Transaction, privateKey: string, chainId?: string): SignedTransaction;
13
- /**
14
- * Sign a transaction and broadcast it to the network.
15
- * Optionally a custom chain id can be provided.
16
- *
17
- * @param client Hive client instance used for broadcasting.
18
- * @param tx Transaction to sign.
19
- * @param privateKey Private key in WIF format.
20
- * @param chainId Optional chain id as a hex string.
21
- * @returns Broadcast confirmation.
22
- */
23
- export declare function signTxAndBroadcast(client: Client, tx: Transaction, privateKey: string, chainId?: string): Promise<TransactionConfirmation>;
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;