@paraspell/sdk 10.1.7 → 10.3.0
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/dist/index.cjs +2 -2
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +2 -2
- package/package.json +2 -4
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var sdkCore = require('@paraspell/sdk-core');
|
|
4
4
|
var blake2 = require('@noble/hashes/blake2');
|
|
5
5
|
var utils = require('@noble/hashes/utils');
|
|
6
|
-
var ethers = require('ethers');
|
|
7
6
|
var polkadotApi = require('polkadot-api');
|
|
8
7
|
var polkadotSdkCompat = require('polkadot-api/polkadot-sdk-compat');
|
|
8
|
+
var viem = require('viem');
|
|
9
9
|
|
|
10
10
|
function _arrayLikeToArray(r, a) {
|
|
11
11
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1400,7 +1400,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1400
1400
|
case 0:
|
|
1401
1401
|
toSS58 = polkadotApi.AccountId().dec;
|
|
1402
1402
|
_context15.next = 3;
|
|
1403
|
-
return this.api._request("".concat(module, "_").concat(method), [module === 'system' && isHex(key) && !
|
|
1403
|
+
return this.api._request("".concat(module, "_").concat(method), [module === 'system' && isHex(key) && !viem.isAddress(key) ? toSS58(key) : key]);
|
|
1404
1404
|
case 3:
|
|
1405
1405
|
value = _context15.sent;
|
|
1406
1406
|
return _context15.abrupt("return", isHex(value) ? value : '0x' + value.toString(16).padStart(8, '0'));
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from '@paraspell/sdk-core';
|
|
|
4
4
|
import { TEvmNodeFrom } from '@paraspell/sdk-core/src';
|
|
5
5
|
import * as polkadot_api from 'polkadot-api';
|
|
6
6
|
import { PolkadotClient, UnsafeTransaction } from 'polkadot-api';
|
|
7
|
-
import { Signer } from 'ethers';
|
|
8
7
|
import { WalletClient } from 'viem';
|
|
9
8
|
|
|
10
9
|
type TPapiApi = PolkadotClient;
|
|
@@ -161,8 +160,8 @@ declare class EvmBuilderCore<TApi, TRes, T extends Partial<TEvmBuilderOptions<TA
|
|
|
161
160
|
* @param signer - The Ethereum signer to authorize the transfer.
|
|
162
161
|
* @returns An instance of EvmBuilder
|
|
163
162
|
*/
|
|
164
|
-
signer(signer:
|
|
165
|
-
signer:
|
|
163
|
+
signer(signer: WalletClient): EvmBuilderCore<TApi, TRes, T & {
|
|
164
|
+
signer: WalletClient;
|
|
166
165
|
}>;
|
|
167
166
|
/**
|
|
168
167
|
* Builds and executes the transfer from Ethereum to Polkadot.
|
package/dist/index.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import { InvalidParameterError, BatchMode, getNodeProviders, createApiInstanceFo
|
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { blake2b } from '@noble/hashes/blake2';
|
|
4
4
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
5
|
-
import { ethers } from 'ethers';
|
|
6
5
|
import { FixedSizeBinary, getSs58AddressInfo, Binary, AccountId, createClient } from 'polkadot-api';
|
|
7
6
|
import { withPolkadotSdkCompat } from 'polkadot-api/polkadot-sdk-compat';
|
|
7
|
+
import { isAddress } from 'viem';
|
|
8
8
|
|
|
9
9
|
function _arrayLikeToArray(r, a) {
|
|
10
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -1399,7 +1399,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1399
1399
|
case 0:
|
|
1400
1400
|
toSS58 = AccountId().dec;
|
|
1401
1401
|
_context15.next = 3;
|
|
1402
|
-
return this.api._request("".concat(module, "_").concat(method), [module === 'system' && isHex(key) && !
|
|
1402
|
+
return this.api._request("".concat(module, "_").concat(method), [module === 'system' && isHex(key) && !isAddress(key) ? toSS58(key) : key]);
|
|
1403
1403
|
case 3:
|
|
1404
1404
|
value = _context15.sent;
|
|
1405
1405
|
return _context15.abrupt("return", isHex(value) ? value : '0x' + value.toString(16).padStart(8, '0'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,10 +24,8 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
|
-
"ethers": "^6.13.7",
|
|
28
|
-
"quick-lru": "^7.0.1",
|
|
29
27
|
"viem": "^2.28.1",
|
|
30
|
-
"@paraspell/sdk-core": "10.
|
|
28
|
+
"@paraspell/sdk-core": "10.3.0"
|
|
31
29
|
},
|
|
32
30
|
"peerDependencies": {
|
|
33
31
|
"polkadot-api": ">= 1.10.2 < 2"
|