@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.
- package/README.md +12 -2
- package/dist/browser/index.global.js +25 -25
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.d.ts +50 -3
- package/dist/cjs/index.js +43 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +50 -3
- package/dist/esm/index.mjs +42 -16
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +24 -2
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +26 -6
- package/src/api/aptosConfig.ts +8 -1
- package/src/api/fungibleAsset.ts +25 -0
- package/src/api/general.ts +2 -2
- package/src/api/transaction.ts +9 -2
- package/src/api/transactionSubmission.ts +34 -10
- package/src/bcs/serializable/fixedBytes.ts +1 -1
- package/src/client/core.ts +15 -17
- package/src/client/get.ts +1 -1
- package/src/client/post.ts +2 -2
- package/src/core/account.ts +74 -33
- package/src/core/authenticationKey.ts +29 -13
- package/src/core/crypto/anyPublicKey.ts +84 -0
- package/src/core/crypto/anySignature.ts +56 -0
- package/src/core/crypto/ed25519.ts +10 -0
- package/src/core/crypto/secp256k1.ts +11 -1
- package/src/internal/account.ts +78 -6
- package/src/internal/coin.ts +1 -1
- package/src/internal/digitalAsset.ts +2 -6
- package/src/internal/faucet.ts +5 -1
- package/src/internal/general.ts +1 -1
- package/src/internal/transaction.ts +2 -1
- package/src/internal/transactionSubmission.ts +47 -6
- package/src/transactions/authenticator/account.ts +16 -15
- package/src/transactions/authenticator/transaction.ts +15 -22
- package/src/transactions/transaction_builder/transaction_builder.ts +27 -28
- package/src/transactions/typeTag/parser.ts +285 -0
- package/src/transactions/types.ts +2 -2
- package/src/types/index.ts +93 -15
- 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
|
|
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
|
|
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).
|