@clawdvault/sdk 0.3.1 → 0.3.2

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.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/index.ts
@@ -46,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
46
36
 
47
37
  // src/wallet.ts
48
38
  var import_web3 = require("@solana/web3.js");
49
- var import_bs58 = __toESM(require("bs58"));
39
+ var bs58 = require("bs58").default || require("bs58");
50
40
  var KeypairSigner = class _KeypairSigner {
51
41
  constructor(keypairOrSecretKey) {
52
42
  if (keypairOrSecretKey instanceof import_web3.Keypair) {
@@ -56,7 +46,7 @@ var KeypairSigner = class _KeypairSigner {
56
46
  const secretKey = new Uint8Array(JSON.parse(keypairOrSecretKey));
57
47
  this._keypair = import_web3.Keypair.fromSecretKey(secretKey);
58
48
  } else {
59
- const secretKey = import_bs58.default.decode(keypairOrSecretKey);
49
+ const secretKey = bs58.decode(keypairOrSecretKey);
60
50
  this._keypair = import_web3.Keypair.fromSecretKey(secretKey);
61
51
  }
62
52
  } else {
@@ -162,14 +152,14 @@ async function createAuthSignature(signer, payload, action) {
162
152
  const messageBytes = new TextEncoder().encode(message);
163
153
  const signatureBytes = await signer.signMessage(messageBytes);
164
154
  return {
165
- signature: import_bs58.default.encode(signatureBytes),
155
+ signature: bs58.encode(signatureBytes),
166
156
  wallet: signer.publicKey.toBase58()
167
157
  };
168
158
  }
169
159
  function verifySignature(message, signature, publicKey) {
170
160
  try {
171
161
  const messageBytes = new TextEncoder().encode(message);
172
- const signatureBytes = import_bs58.default.decode(signature);
162
+ const signatureBytes = bs58.decode(signature);
173
163
  const pubkey = new import_web3.PublicKey(publicKey);
174
164
  const nacl = require("tweetnacl");
175
165
  return nacl.sign.detached.verify(messageBytes, signatureBytes, pubkey.toBytes());
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  Transaction,
13
13
  VersionedTransaction
14
14
  } from "@solana/web3.js";
15
- import bs58 from "bs58";
15
+ var bs58 = __require("bs58").default || __require("bs58");
16
16
  var KeypairSigner = class _KeypairSigner {
17
17
  constructor(keypairOrSecretKey) {
18
18
  if (keypairOrSecretKey instanceof Keypair) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawdvault/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript SDK for ClawdVault - Solana token launchpad",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@solana/spl-token": "^0.4.0",
28
28
  "@solana/web3.js": "^1.91.0",
29
- "bs58": "^5.0.0",
29
+ "bs58": "^6.0.0",
30
30
  "eventsource": "^2.0.2",
31
31
  "tweetnacl": "^1.0.3"
32
32
  },