@thalalabs/surf 0.0.2 → 0.0.4

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 (78) hide show
  1. package/.changeset/README.md +15 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/publish.yml +31 -0
  4. package/CHANGELOG.md +13 -0
  5. package/README.md +14 -16
  6. package/build/cjs/core/Client.js +10 -5
  7. package/build/cjs/core/Client.js.map +1 -1
  8. package/build/cjs/core/WalletClient.js +14 -4
  9. package/build/cjs/core/WalletClient.js.map +1 -1
  10. package/build/cjs/core/createEntryPayload.js +8 -8
  11. package/build/cjs/core/createEntryPayload.js.map +1 -1
  12. package/build/cjs/core/createViewPayload.js +12 -10
  13. package/build/cjs/core/createViewPayload.js.map +1 -1
  14. package/build/cjs/core/index.js +9 -9
  15. package/build/cjs/core/index.js.map +1 -1
  16. package/build/cjs/hooks/index.js +4 -4
  17. package/build/cjs/hooks/index.js.map +1 -1
  18. package/build/cjs/hooks/useWalletClient.js +2 -2
  19. package/build/cjs/hooks/useWalletClient.js.map +1 -1
  20. package/build/cjs/index.js +4 -4
  21. package/build/cjs/index.js.map +1 -1
  22. package/build/esm/core/Client.js +8 -3
  23. package/build/esm/core/Client.js.map +1 -1
  24. package/build/esm/core/WalletClient.js +13 -3
  25. package/build/esm/core/WalletClient.js.map +1 -1
  26. package/build/esm/core/createEntryPayload.js +1 -1
  27. package/build/esm/core/createEntryPayload.js.map +1 -1
  28. package/build/esm/core/createViewPayload.js +11 -9
  29. package/build/esm/core/createViewPayload.js.map +1 -1
  30. package/build/esm/core/index.js +4 -4
  31. package/build/esm/core/index.js.map +1 -1
  32. package/build/esm/hooks/index.js +2 -2
  33. package/build/esm/hooks/index.js.map +1 -1
  34. package/build/esm/hooks/useWalletClient.js +1 -1
  35. package/build/esm/hooks/useWalletClient.js.map +1 -1
  36. package/build/esm/index.js +1 -1
  37. package/build/esm/index.js.map +1 -1
  38. package/build/types/core/Client.d.ts +2 -3
  39. package/build/types/core/Client.d.ts.map +1 -1
  40. package/build/types/core/WalletClient.d.ts +3 -4
  41. package/build/types/core/WalletClient.d.ts.map +1 -1
  42. package/build/types/core/createEntryPayload.d.ts +2 -2
  43. package/build/types/core/createEntryPayload.d.ts.map +1 -1
  44. package/build/types/core/createViewPayload.d.ts +2 -2
  45. package/build/types/core/createViewPayload.d.ts.map +1 -1
  46. package/build/types/core/index.d.ts +4 -4
  47. package/build/types/core/index.d.ts.map +1 -1
  48. package/build/types/hooks/index.d.ts +2 -2
  49. package/build/types/hooks/index.d.ts.map +1 -1
  50. package/build/types/hooks/useSubmitTransaction.d.ts +4 -4
  51. package/build/types/hooks/useSubmitTransaction.d.ts.map +1 -1
  52. package/build/types/hooks/useWalletClient.d.ts +2 -2
  53. package/build/types/hooks/useWalletClient.d.ts.map +1 -1
  54. package/build/types/index.d.ts +2 -2
  55. package/build/types/index.d.ts.map +1 -1
  56. package/build/types/types/abiClient.d.ts +3 -3
  57. package/build/types/types/abiClient.d.ts.map +1 -1
  58. package/build/types/types/common.d.ts +1 -1
  59. package/build/types/types/common.d.ts.map +1 -1
  60. package/build/types/types/index.d.ts +4 -4
  61. package/build/types/types/index.d.ts.map +1 -1
  62. package/build/types/types/walletClient.d.ts +2 -2
  63. package/build/types/types/walletClient.d.ts.map +1 -1
  64. package/package.json +22 -6
  65. package/src/core/Client.ts +4 -5
  66. package/src/core/WalletClient.ts +4 -3
  67. package/src/core/createEntryPayload.ts +6 -6
  68. package/src/core/createViewPayload.ts +14 -12
  69. package/src/core/index.ts +4 -4
  70. package/src/hooks/index.ts +2 -2
  71. package/src/hooks/useSubmitTransaction.ts +1 -1
  72. package/src/hooks/useWalletClient.ts +1 -1
  73. package/src/index.ts +3 -3
  74. package/src/types/abiClient.ts +11 -3
  75. package/src/types/common.ts +1 -1
  76. package/src/types/index.ts +5 -5
  77. package/src/types/walletClient.ts +2 -2
  78. package/images/surf-useABI.png +0 -0
@@ -1,7 +1,7 @@
1
1
  import { useState, useRef } from "react";
2
2
  import { useWallet } from "@aptos-labs/wallet-adapter-react";
3
3
  import { AptosClient, Types } from "aptos";
4
- import { EntryPayload } from "../types";
4
+ import type { EntryPayload } from "../types/index.js";
5
5
 
6
6
  export type submitTransactionOptions = {
7
7
  nodeUrl: string,
@@ -1,5 +1,5 @@
1
1
  import { useWallet } from "@aptos-labs/wallet-adapter-react";
2
- import { MoveTsWalletClient } from "../core";
2
+ import { MoveTsWalletClient } from "../core/index.js";
3
3
 
4
4
  export const useWalletClient = ({ nodeUrl }: { nodeUrl: string }) => {
5
5
  const wallet = useWallet();
package/src/index.ts CHANGED
@@ -2,9 +2,9 @@ export {
2
2
  createViewPayload,
3
3
  createEntryPayload,
4
4
  createClient
5
- } from "./core";
5
+ } from "./core/index.js";
6
6
 
7
- export {
7
+ export type {
8
8
  EntryPayload,
9
9
  ViewPayload,
10
- } from "./types";
10
+ } from "./types/index.js";
@@ -1,6 +1,14 @@
1
- import { AptosAccount } from "aptos";
2
- import { ABIRoot } from "./abi";
3
- import { EntryFunctionName, ExtractGenericParamsType, ExtractParamsType, ExtractParamsTypeOmitSigner, ExtractReturnType, TransactionResponse, ViewFunctionName } from "./common";
1
+ import type { AptosAccount } from "aptos";
2
+ import type { ABIRoot } from "./abi.js";
3
+ import type {
4
+ EntryFunctionName,
5
+ ExtractGenericParamsType,
6
+ ExtractParamsType,
7
+ ExtractParamsTypeOmitSigner,
8
+ ExtractReturnType,
9
+ TransactionResponse,
10
+ ViewFunctionName
11
+ } from "./common.js";
4
12
 
5
13
  export type ABIViewClient<T extends ABIRoot> = {
6
14
  [TFuncName in ViewFunctionName<T>]: (payload: {
@@ -1,4 +1,4 @@
1
- import { ABIRoot } from "./abi";
1
+ import type { ABIRoot } from "./abi.js";
2
2
 
3
3
  // TODO: rename this variable, not only primitive, but also struct and vector
4
4
  export type Primitive =
@@ -1,9 +1,9 @@
1
- export { ABIWalletClient } from "./walletClient";
2
- export { ABIViewClient, ABIEntryClient } from "./abiClient";
3
- export {
1
+ export type { ABIWalletClient } from "./walletClient.js";
2
+ export type { ABIViewClient, ABIEntryClient } from "./abiClient.js";
3
+ export type {
4
4
  ViewPayload,
5
5
  EntryPayload,
6
6
  ViewOptions,
7
7
  EntryOptions,
8
- } from "./client";
9
- export { ABIRoot } from "./abi";
8
+ } from "./client.js";
9
+ export type { ABIRoot } from "./abi.js";
@@ -1,5 +1,5 @@
1
- import { ABIRoot } from "./abi";
2
- import { EntryFunctionName, ExtractGenericParamsType, ExtractParamsTypeOmitSigner, TransactionResponse } from "./common";
1
+ import type { ABIRoot } from "./abi.js";
2
+ import { EntryFunctionName, ExtractGenericParamsType, ExtractParamsTypeOmitSigner, TransactionResponse } from "./common.js";
3
3
 
4
4
  export type ABIWalletClient<T extends ABIRoot> = {
5
5
  [TFuncName in EntryFunctionName<T>]:
Binary file