@altiuslabs/tx-sdk 0.1.9 → 0.1.11
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/package.json +2 -1
- package/src/error.js +2 -2
- package/src/rpc.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altiuslabs/tx-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "SDK for signing and sending Altius USD multi-token transactions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"signer"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@altiuslabs/tx-sdk": "^0.1.10",
|
|
22
23
|
"js-sha3": "^0.9.3",
|
|
23
24
|
"noble-secp256k1": "^1.2.14",
|
|
24
25
|
"rlp": "^3.0.0"
|
package/src/error.js
CHANGED
|
@@ -40,5 +40,5 @@ export class MissingFieldError extends AltiusError {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// Re-export error classes for convenience
|
|
43
|
-
export const Error = AltiusError;
|
|
44
|
-
export const Result = AltiusError;
|
|
43
|
+
// export const Error = AltiusError; // Removed - causes initialization issues
|
|
44
|
+
// export const Result = AltiusError;
|
package/src/rpc.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* RPC Client for Altius
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { num_to_hex, pad_hex } from './utils.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* JSON-RPC client for communicating with Altius node
|
|
@@ -139,7 +139,7 @@ export class RpcClient {
|
|
|
139
139
|
*/
|
|
140
140
|
async get_erc20_balance(token_address, owner_address) {
|
|
141
141
|
// ERC20 balanceOf selector: 0x70a08231
|
|
142
|
-
const data = '0x70a08231' +
|
|
142
|
+
const data = '0x70a08231' + pad_hex(owner_address, 32).slice(2);
|
|
143
143
|
const result = await this.call({ to: token_address, data });
|
|
144
144
|
return BigInt(result);
|
|
145
145
|
}
|