@aptos-labs/ts-sdk 0.0.0 → 0.0.1

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 (42) hide show
  1. package/README.md +12 -2
  2. package/dist/browser/index.global.js +25 -25
  3. package/dist/browser/index.global.js.map +1 -1
  4. package/dist/cjs/index.d.ts +50 -3
  5. package/dist/cjs/index.js +43 -16
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/esm/index.d.ts +50 -3
  8. package/dist/esm/index.mjs +42 -16
  9. package/dist/esm/index.mjs.map +1 -1
  10. package/dist/types/index.d.ts +24 -2
  11. package/dist/types/index.js.map +1 -1
  12. package/package.json +1 -1
  13. package/src/api/account.ts +26 -6
  14. package/src/api/aptosConfig.ts +8 -1
  15. package/src/api/fungibleAsset.ts +25 -0
  16. package/src/api/general.ts +2 -2
  17. package/src/api/transaction.ts +9 -2
  18. package/src/api/transactionSubmission.ts +34 -10
  19. package/src/bcs/serializable/fixedBytes.ts +1 -1
  20. package/src/client/core.ts +15 -17
  21. package/src/client/get.ts +1 -1
  22. package/src/client/post.ts +2 -2
  23. package/src/core/account.ts +74 -33
  24. package/src/core/authenticationKey.ts +29 -13
  25. package/src/core/crypto/anyPublicKey.ts +84 -0
  26. package/src/core/crypto/anySignature.ts +56 -0
  27. package/src/core/crypto/ed25519.ts +10 -0
  28. package/src/core/crypto/secp256k1.ts +11 -1
  29. package/src/internal/account.ts +78 -6
  30. package/src/internal/coin.ts +1 -1
  31. package/src/internal/digitalAsset.ts +2 -6
  32. package/src/internal/faucet.ts +5 -1
  33. package/src/internal/general.ts +1 -1
  34. package/src/internal/transaction.ts +2 -1
  35. package/src/internal/transactionSubmission.ts +47 -6
  36. package/src/transactions/authenticator/account.ts +16 -15
  37. package/src/transactions/authenticator/transaction.ts +15 -22
  38. package/src/transactions/transaction_builder/transaction_builder.ts +27 -28
  39. package/src/transactions/typeTag/parser.ts +285 -0
  40. package/src/transactions/types.ts +2 -2
  41. package/src/types/index.ts +93 -15
  42. package/src/version.ts +1 -1
package/README.md CHANGED
@@ -26,7 +26,7 @@ pnpm install @aptos-labs/ts-sdk@experimental
26
26
  You can add the SDK to your web application using a script tag:
27
27
 
28
28
  ```html
29
- <script src="https://unpkg.com/@aptos-labs-ts-sdk@experimental/dist/browser/index.global.js" />
29
+ <script src="https://unpkg.com/@aptos-labs/ts-sdk@experimental/dist/browser/index.global.js" />
30
30
  ```
31
31
 
32
32
  Then, the SDK can be accessed through `window.aptosSDK`.
@@ -40,7 +40,7 @@ Initialize `Aptos` to access the SDK API.
40
40
  const aptos = new Aptos();
41
41
  ```
42
42
 
43
- If you want to pass in a costum config
43
+ If you want to pass in a custom config
44
44
 
45
45
  ```ts
46
46
  // an optional config information for the SDK client instance.
@@ -131,6 +131,16 @@ To run the SDK tests, simply run from the root of this repository:
131
131
  pnpm test
132
132
  ```
133
133
 
134
+ ## Troubleshooting
135
+
136
+ If you see import error when you do this
137
+
138
+ ```typescript
139
+ import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
140
+ ```
141
+
142
+ It could be your `tsconfig.json` is not incompatible, make sure your `moduleResolution` is set to `node` instead of `bundler`.
143
+
134
144
  ## Contributing
135
145
 
136
146
  If you found a bug or would like to request a feature, please file an [issue](https://github.com/aptos-labs/aptos-ts-sdk/issues/new/choose).