@dexterai/vault 0.1.2 → 0.1.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.
@@ -39,7 +39,7 @@ var import_lib2 = require("@swig-wallet/lib");
39
39
  var import_node_crypto = require("crypto");
40
40
  var import_kit = require("@swig-wallet/kit");
41
41
  var import_lib = require("@swig-wallet/lib");
42
- var import_bs58 = __toESM(require("bs58"), 1);
42
+ var bs58Module = __toESM(require("bs58"), 1);
43
43
  var import_web32 = require("@solana/web3.js");
44
44
 
45
45
  // src/constants/index.ts
@@ -15,7 +15,7 @@ import {
15
15
  createEd25519SessionAuthorityInfo,
16
16
  getCreateSwigWithMultipleAuthoritiesInstructionContextBuilder
17
17
  } from "@swig-wallet/lib";
18
- import bs58 from "bs58";
18
+ import * as bs58Module from "bs58";
19
19
  import { PublicKey as PublicKey2 } from "@solana/web3.js";
20
20
 
21
21
  // src/constants/index.ts
package/dist/index.cjs CHANGED
@@ -41,7 +41,7 @@ var import_lib2 = require("@swig-wallet/lib");
41
41
  var import_node_crypto = require("crypto");
42
42
  var import_kit = require("@swig-wallet/kit");
43
43
  var import_lib = require("@swig-wallet/lib");
44
- var import_bs58 = __toESM(require("bs58"), 1);
44
+ var bs58Module = __toESM(require("bs58"), 1);
45
45
  var import_web32 = require("@solana/web3.js");
46
46
 
47
47
  // src/constants/index.ts
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  createEd25519SessionAuthorityInfo,
16
16
  getCreateSwigWithMultipleAuthoritiesInstructionContextBuilder
17
17
  } from "@swig-wallet/lib";
18
- import bs58 from "bs58";
18
+ import * as bs58Module from "bs58";
19
19
  import { PublicKey as PublicKey2 } from "@solana/web3.js";
20
20
 
21
21
  // src/constants/index.ts
@@ -4869,8 +4869,9 @@ function createSolanaRpcFromTransport(transport) {
4869
4869
  }
4870
4870
 
4871
4871
  // src/instructions/swigBundle.ts
4872
- var import_bs58 = __toESM(require("bs58"), 1);
4872
+ var bs58Module = __toESM(require("bs58"), 1);
4873
4873
  var import_web311 = require("@solana/web3.js");
4874
+ var bs58 = bs58Module.default ?? bs58Module;
4874
4875
  var SWIG_ID_DOMAIN = "dexter-swig-id:v1:";
4875
4876
  var DEFAULT_SESSION_TTL_SECONDS = BigInt(30 * 24 * 60 * 60);
4876
4877
  var DEFAULT_SPEND_LIMIT_ATOMIC = BigInt(1e9);
@@ -4916,9 +4917,9 @@ async function buildSwigCreationBundle(params) {
4916
4917
  const swigId = deriveSwigId(identitySeed, hmacKey);
4917
4918
  const swigPda = await (0, import_kit.findSwigPda)(swigId);
4918
4919
  const swigAddressStr = String(swigPda);
4919
- const feePayerBytes = import_bs58.default.decode(feePayer);
4920
+ const feePayerBytes = bs58.decode(feePayer);
4920
4921
  const vaultProgramIdBytes = Uint8Array.from(DEXTER_VAULT_PROGRAM_ID.toBytes());
4921
- const dexterPubkeyBytes = import_bs58.default.decode(dexterMasterPubkey);
4922
+ const dexterPubkeyBytes = bs58.decode(dexterMasterPubkey);
4922
4923
  const bootstrapAuthorityInfo = (0, import_lib.createEd25519AuthorityInfo)(feePayerBytes);
4923
4924
  const bootstrapActions = import_lib.Actions.set().manageAuthority().get();
4924
4925
  const vaultAuthorityInfo = (0, import_lib.createProgramExecAuthorityInfo)(
@@ -4935,7 +4936,7 @@ async function buildSwigCreationBundle(params) {
4935
4936
  dexterPubkeyBytes,
4936
4937
  sessionTtlSeconds
4937
4938
  );
4938
- const sessionActions = import_lib.Actions.set().tokenLimit({ mint: import_bs58.default.decode(USDC_MAINNET), amount: spendLimitAtomic }).programAll().get();
4939
+ const sessionActions = import_lib.Actions.set().tokenLimit({ mint: bs58.decode(USDC_MAINNET), amount: spendLimitAtomic }).programAll().get();
4939
4940
  const builder = (0, import_lib.getCreateSwigWithMultipleAuthoritiesInstructionContextBuilder)({
4940
4941
  payer: address(feePayer),
4941
4942
  swigAddress: address(swigAddressStr),
@@ -4948,7 +4949,7 @@ async function buildSwigCreationBundle(params) {
4948
4949
  const instructions = contexts.flatMap((ctx) => (0, import_kit.getInstructionsFromContext)(ctx));
4949
4950
  return {
4950
4951
  swigAddress: swigAddressStr,
4951
- swigIdBase58: import_bs58.default.encode(swigId),
4952
+ swigIdBase58: bs58.encode(swigId),
4952
4953
  instructions
4953
4954
  };
4954
4955
  }
@@ -4969,7 +4970,7 @@ async function verifySwigIsOurs(params) {
4969
4970
  const rpc = createSolanaRpc(rpcEndpoint);
4970
4971
  const swig = await (0, import_kit.fetchNullableSwig)(rpc, address(swigAddress));
4971
4972
  if (swig) {
4972
- const ourRoles = swig.findRolesByAuthorityAddress(import_bs58.default.decode(dexterMasterPubkey));
4973
+ const ourRoles = swig.findRolesByAuthorityAddress(bs58.decode(dexterMasterPubkey));
4973
4974
  if (!ourRoles || ourRoles.length === 0) {
4974
4975
  return {
4975
4976
  ok: false,
@@ -4843,8 +4843,9 @@ function createSolanaRpcFromTransport(transport) {
4843
4843
  }
4844
4844
 
4845
4845
  // src/instructions/swigBundle.ts
4846
- import bs58 from "bs58";
4846
+ import * as bs58Module from "bs58";
4847
4847
  import { PublicKey as PublicKey11 } from "@solana/web3.js";
4848
+ var bs58 = bs58Module.default ?? bs58Module;
4848
4849
  var SWIG_ID_DOMAIN = "dexter-swig-id:v1:";
4849
4850
  var DEFAULT_SESSION_TTL_SECONDS = BigInt(30 * 24 * 60 * 60);
4850
4851
  var DEFAULT_SPEND_LIMIT_ATOMIC = BigInt(1e9);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexterai/vault",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Canonical off-chain mirror of the dexter-vault Solana Anchor program — Solana instruction builders, byte-precise message encoders, account decoders, secp256r1/Ed25519 precompile helpers, counterfactual Swig derivation, and signer interfaces. The single source of truth for any TypeScript code that produces bytes the on-chain program will verify.",
5
5
  "author": "Dexter",
6
6
  "license": "MIT",