@ardrive/turbo-sdk 1.44.1-alpha.2 → 1.44.1-alpha.3

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.
@@ -24,7 +24,6 @@ const amino_1 = require("@cosmjs/amino");
24
24
  const crypto_1 = require("@cosmjs/crypto");
25
25
  const encoding_1 = require("@cosmjs/encoding");
26
26
  const arbundles_1 = require("@dha-team/arbundles");
27
- const signing_key_1 = require("@ethersproject/signing-key");
28
27
  const web3_js_1 = require("@solana/web3.js");
29
28
  const bignumber_js_1 = require("bignumber.js");
30
29
  const bs58_1 = __importDefault(require("bs58"));
@@ -61,7 +60,7 @@ class TurboDataItemAbstractSigner {
61
60
  case 'usdc':
62
61
  case 'base-usdc':
63
62
  case 'polygon-usdc':
64
- return (0, ethers_2.computeAddress)((0, signing_key_1.computePublicKey)((0, base64_js_1.fromB64Url)(owner)));
63
+ return (0, ethers_2.computeAddress)(ethers_2.SigningKey.computePublicKey((0, base64_js_1.fromB64Url)(owner)));
65
64
  case 'kyve':
66
65
  return (0, amino_1.pubkeyToAddress)({
67
66
  type: 'tendermint/PubKeySecp256k1',
@@ -32,8 +32,6 @@ const amino_1 = require("@cosmjs/amino");
32
32
  const crypto_1 = require("@cosmjs/crypto");
33
33
  const encoding_1 = require("@cosmjs/encoding");
34
34
  const arbundles_1 = require("@dha-team/arbundles");
35
- const bytes_1 = require("@ethersproject/bytes");
36
- const signing_key_1 = require("@ethersproject/signing-key");
37
35
  const web3_js_1 = require("@solana/web3.js");
38
36
  const ethers_1 = require("ethers");
39
37
  const types_js_1 = require("../types.js");
@@ -81,8 +79,8 @@ function createTurboSigner({ signer: clientProvidedSigner, privateKey: clientPro
81
79
  const message = 'sign this message to connect to your account';
82
80
  const signedMsg = await clientProvidedSigner['signer'].signMessage(message);
83
81
  const hash = (0, ethers_1.hashMessage)(message);
84
- const recoveredKey = (0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(hash), signedMsg);
85
- clientProvidedSigner.publicKey = Buffer.from((0, bytes_1.arrayify)(recoveredKey));
82
+ const recoveredKey = ethers_1.SigningKey.recoverPublicKey((0, ethers_1.getBytes)(hash), signedMsg);
83
+ clientProvidedSigner.publicKey = Buffer.from((0, ethers_1.getBytes)(recoveredKey));
86
84
  };
87
85
  }
88
86
  return clientProvidedSigner;
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '1.40.0';
20
+ exports.version = '1.44.1-alpha.3';
@@ -17,13 +17,12 @@ import { pubkeyToAddress } from '@cosmjs/amino';
17
17
  import { Secp256k1 } from '@cosmjs/crypto';
18
18
  import { toBase64 } from '@cosmjs/encoding';
19
19
  import { EthereumSigner, HexSolanaSigner, SignatureConfig, } from '@dha-team/arbundles';
20
- import { computePublicKey } from '@ethersproject/signing-key';
21
20
  import { Connection, PublicKey, SystemProgram, Transaction, TransactionInstruction, } from '@solana/web3.js';
22
21
  import { BigNumber } from 'bignumber.js';
23
22
  import bs58 from 'bs58';
24
23
  import { randomBytes } from 'crypto';
25
24
  import { Wallet as EthereumWallet, ethers, parseEther } from 'ethers';
26
- import { computeAddress } from 'ethers';
25
+ import { SigningKey, computeAddress } from 'ethers';
27
26
  import nacl from 'tweetnacl';
28
27
  import { createWalletClient, custom, http } from 'viem';
29
28
  import { privateKeyToAccount } from 'viem/accounts';
@@ -54,7 +53,7 @@ export class TurboDataItemAbstractSigner {
54
53
  case 'usdc':
55
54
  case 'base-usdc':
56
55
  case 'polygon-usdc':
57
- return computeAddress(computePublicKey(fromB64Url(owner)));
56
+ return computeAddress(SigningKey.computePublicKey(fromB64Url(owner)));
58
57
  case 'kyve':
59
58
  return pubkeyToAddress({
60
59
  type: 'tendermint/PubKeySecp256k1',
@@ -17,10 +17,8 @@ import { Secp256k1HdWallet, makeCosmoshubPath } from '@cosmjs/amino';
17
17
  import { Slip10, Slip10Curve } from '@cosmjs/crypto';
18
18
  import { toHex } from '@cosmjs/encoding';
19
19
  import { ArweaveSigner, EthereumSigner, HexSolanaSigner, InjectedEthereumSigner, } from '@dha-team/arbundles';
20
- import { arrayify } from '@ethersproject/bytes';
21
- import { recoverPublicKey } from '@ethersproject/signing-key';
22
20
  import { PublicKey } from '@solana/web3.js';
23
- import { hashMessage } from 'ethers';
21
+ import { SigningKey, getBytes, hashMessage } from 'ethers';
24
22
  import { isEthPrivateKey, isJWK, isKyvePrivateKey, tokenTypes, } from '../types.js';
25
23
  export function sleep(ms) {
26
24
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -66,8 +64,8 @@ export function createTurboSigner({ signer: clientProvidedSigner, privateKey: cl
66
64
  const message = 'sign this message to connect to your account';
67
65
  const signedMsg = await clientProvidedSigner['signer'].signMessage(message);
68
66
  const hash = hashMessage(message);
69
- const recoveredKey = recoverPublicKey(arrayify(hash), signedMsg);
70
- clientProvidedSigner.publicKey = Buffer.from(arrayify(recoveredKey));
67
+ const recoveredKey = SigningKey.recoverPublicKey(getBytes(hash), signedMsg);
68
+ clientProvidedSigner.publicKey = Buffer.from(getBytes(recoveredKey));
71
69
  };
72
70
  }
73
71
  return clientProvidedSigner;
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '1.40.0';
17
+ export const version = '1.44.1-alpha.3';
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/common/signer.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkB/D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,WAAW,E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13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.40.0";
16
+ export declare const version = "1.44.1-alpha.3";
17
17
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.44.1-alpha.2",
3
+ "version": "1.44.1-alpha.3",
4
4
  "main": "./lib/cjs/node/index.js",
5
5
  "types": "./lib/types/node/index.d.ts",
6
6
  "module": "./lib/esm/node/index.js",
@@ -78,8 +78,6 @@
78
78
  "@cosmjs/proto-signing": "^0.33.1",
79
79
  "@cosmjs/stargate": "^0.33.1",
80
80
  "@dha-team/arbundles": "^1.0.1",
81
- "@ethersproject/signing-key": "^5.7.0",
82
- "@permaweb/aoconnect": "0.0.57",
83
81
  "@solana/spl-token": "^0.4.14",
84
82
  "@solana/web3.js": "^1.95.5",
85
83
  "arweave": "^1.15.1",