@tangram-mover/sdk 0.1.0 → 0.1.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 +32 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Tangram Mover TypeScript SDK
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/%40tangram-mover%2Fsdk)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
3
6
|
TypeScript SDK for **Tangram Mover** - A comprehensive transaction trace analyzer for Sui Move protocols. Detect smart contract invariant violations, trace transactions, and execute transactions on the Sui network.
|
|
4
7
|
|
|
8
|
+
- **Package:** `@tangram-mover/sdk`
|
|
9
|
+
- **Version:** 0.1.0
|
|
10
|
+
- **License:** MIT
|
|
11
|
+
- **Repository:** [tangram-mover](https://github.com/your-org/tangram-mover)
|
|
12
|
+
|
|
5
13
|
## Features
|
|
6
14
|
|
|
7
15
|
✅ **Transaction Tracing** - Fetch and parse complete transaction traces including PTB commands, balance changes, object changes, and events
|
|
@@ -23,9 +31,11 @@ TypeScript SDK for **Tangram Mover** - A comprehensive transaction trace analyze
|
|
|
23
31
|
## Installation
|
|
24
32
|
|
|
25
33
|
```bash
|
|
26
|
-
npm install @tangram-mover/sdk
|
|
34
|
+
npm install @tangram-mover/sdk
|
|
27
35
|
```
|
|
28
36
|
|
|
37
|
+
**Note:** This package includes [@scallop-io/sui-kit](https://github.com/scallop-io/sui-kit) as a dependency for Sui network interactions.
|
|
38
|
+
|
|
29
39
|
## Quick Start
|
|
30
40
|
|
|
31
41
|
### Initialize the SDK
|
|
@@ -112,6 +122,16 @@ const moveResult = await mover.moveCall(
|
|
|
112
122
|
[arg1, arg2],
|
|
113
123
|
['TypeArg1']
|
|
114
124
|
);
|
|
125
|
+
|
|
126
|
+
// Transfer multiple objects
|
|
127
|
+
const objectResult = await mover.transferObjects(
|
|
128
|
+
['0xobject1', '0xobject2'],
|
|
129
|
+
'0xrecipient-address'
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
// Get balance
|
|
133
|
+
const balance = await mover.getBalance('0x2::sui::SUI');
|
|
134
|
+
console.log('SUI Balance:', balance.totalBalance);
|
|
115
135
|
```
|
|
116
136
|
|
|
117
137
|
### Batch Operations
|
|
@@ -141,6 +161,9 @@ const addr1 = mover.getAddress({ accountIndex: 1 });
|
|
|
141
161
|
|
|
142
162
|
// Execute transaction from specific account
|
|
143
163
|
await mover.transferSui('0xrecipient', 1000000, { accountIndex: 1 });
|
|
164
|
+
|
|
165
|
+
// Get balance for specific account
|
|
166
|
+
const balance = await mover.getBalance('0x2::sui::SUI', { accountIndex: 1 });
|
|
144
167
|
```
|
|
145
168
|
|
|
146
169
|
## API Reference
|
|
@@ -182,6 +205,11 @@ interface TangramMoverOptions {
|
|
|
182
205
|
- `moveCall(target: string, arguments: any[], typeArguments?: string[], options?: { accountIndex?: number }): Promise<TransactionResult>`
|
|
183
206
|
- `transferObjects(objectIds: string[], recipient: string, options?: { accountIndex?: number }): Promise<TransactionResult>`
|
|
184
207
|
|
|
208
|
+
**Utilities**
|
|
209
|
+
- `getCurrentAddress(): string`
|
|
210
|
+
- `getAddress(options?: { accountIndex?: number }): string`
|
|
211
|
+
- `getBalance(coinType?: string, options?: { accountIndex?: number }): Promise<{ totalBalance: string }>`
|
|
212
|
+
|
|
185
213
|
**Utilities**
|
|
186
214
|
- `getCurrentAddress(): string`
|
|
187
215
|
- `getAddress(options?: { accountIndex?: number }): string`
|
|
@@ -336,9 +364,9 @@ npm run lint
|
|
|
336
364
|
|
|
337
365
|
## Related Projects
|
|
338
366
|
|
|
339
|
-
- [Tangram Mover Rust Crawler](../crawler/) - High-performance Rust implementation for batch processing
|
|
340
|
-
- [Tangram Mover Python Analyzer](../analysis/) - Python-based invariant detection
|
|
341
|
-
- [sui-kit](https://github.com/scallop-io/sui-kit) - Sui network interaction toolkit
|
|
367
|
+
- [Tangram Mover Rust Crawler](../crawler/) - High-performance Rust implementation for batch processing and CSV logging
|
|
368
|
+
- [Tangram Mover Python Analyzer](../analysis/) - Python-based invariant detection engine
|
|
369
|
+
- [sui-kit](https://github.com/scallop-io/sui-kit) - Sui network interaction toolkit (included as dependency)
|
|
342
370
|
|
|
343
371
|
## License
|
|
344
372
|
|
package/package.json
CHANGED