@dexterai/vault 0.4.1 → 0.5.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 CHANGED
@@ -41,6 +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_kit2 = require("@solana/kit");
44
45
  var bs58Module = __toESM(require("bs58"), 1);
45
46
  var import_web32 = require("@solana/web3.js");
46
47
 
@@ -62,6 +63,7 @@ var INSTRUCTIONS_SYSVAR_ID = new import_web3.PublicKey(
62
63
  "Sysvar1nstructions1111111111111111111111111"
63
64
  );
64
65
  var VAULT_SEED_PREFIX = Buffer.from("vault");
66
+ var LOCKED_CLAIM_SEED = Buffer.from("locked-claim");
65
67
  var DISCRIMINATORS = Object.freeze({
66
68
  initialize_vault: Uint8Array.from([48, 191, 163, 44, 71, 129, 63, 164]),
67
69
  set_swig: Uint8Array.from([253, 229, 89, 206, 192, 118, 137, 165]),
@@ -74,7 +76,16 @@ var DISCRIMINATORS = Object.freeze({
74
76
  prove_passkey: Uint8Array.from([35, 175, 41, 143, 201, 118, 49, 184]),
75
77
  settle_tab_voucher: Uint8Array.from([173, 22, 98, 31, 110, 129, 59, 161]),
76
78
  register_session_key: Uint8Array.from([69, 94, 60, 44, 49, 199, 183, 233]),
77
- revoke_session_key: Uint8Array.from([81, 192, 32, 110, 104, 116, 144, 151])
79
+ revoke_session_key: Uint8Array.from([81, 192, 32, 110, 104, 116, 144, 151]),
80
+ lock_voucher: Uint8Array.from([91, 138, 5, 227, 119, 239, 48, 254]),
81
+ settle_locked_voucher: Uint8Array.from([44, 80, 216, 43, 247, 253, 101, 45]),
82
+ transfer_lock_ownership: Uint8Array.from([193, 13, 131, 134, 95, 25, 229, 157]),
83
+ recover_abandoned_lock: Uint8Array.from([169, 213, 107, 64, 229, 49, 43, 234]),
84
+ open_standby: Uint8Array.from([234, 184, 232, 135, 246, 191, 90, 250]),
85
+ draw_credit: Uint8Array.from([20, 84, 47, 211, 78, 117, 195, 210]),
86
+ repay_credit: Uint8Array.from([38, 113, 240, 182, 109, 179, 154, 245]),
87
+ seize_collateral: Uint8Array.from([40, 250, 7, 243, 168, 184, 116, 154]),
88
+ migrate_v4_to_v5: Uint8Array.from([226, 105, 140, 184, 101, 39, 235, 116])
78
89
  });
79
90
  var OTS_SESSION_REGISTER_V1_DOMAIN = (() => {
80
91
  const buf = new Uint8Array(32);
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  createEd25519SessionAuthorityInfo,
16
16
  getCreateSwigWithMultipleAuthoritiesInstructionContextBuilder
17
17
  } from "@swig-wallet/lib";
18
+ import { address, createSolanaRpc } from "@solana/kit";
18
19
  import * as bs58Module from "bs58";
19
20
  import { PublicKey as PublicKey2 } from "@solana/web3.js";
20
21
 
@@ -36,6 +37,7 @@ var INSTRUCTIONS_SYSVAR_ID = new PublicKey(
36
37
  "Sysvar1nstructions1111111111111111111111111"
37
38
  );
38
39
  var VAULT_SEED_PREFIX = Buffer.from("vault");
40
+ var LOCKED_CLAIM_SEED = Buffer.from("locked-claim");
39
41
  var DISCRIMINATORS = Object.freeze({
40
42
  initialize_vault: Uint8Array.from([48, 191, 163, 44, 71, 129, 63, 164]),
41
43
  set_swig: Uint8Array.from([253, 229, 89, 206, 192, 118, 137, 165]),
@@ -48,7 +50,16 @@ var DISCRIMINATORS = Object.freeze({
48
50
  prove_passkey: Uint8Array.from([35, 175, 41, 143, 201, 118, 49, 184]),
49
51
  settle_tab_voucher: Uint8Array.from([173, 22, 98, 31, 110, 129, 59, 161]),
50
52
  register_session_key: Uint8Array.from([69, 94, 60, 44, 49, 199, 183, 233]),
51
- revoke_session_key: Uint8Array.from([81, 192, 32, 110, 104, 116, 144, 151])
53
+ revoke_session_key: Uint8Array.from([81, 192, 32, 110, 104, 116, 144, 151]),
54
+ lock_voucher: Uint8Array.from([91, 138, 5, 227, 119, 239, 48, 254]),
55
+ settle_locked_voucher: Uint8Array.from([44, 80, 216, 43, 247, 253, 101, 45]),
56
+ transfer_lock_ownership: Uint8Array.from([193, 13, 131, 134, 95, 25, 229, 157]),
57
+ recover_abandoned_lock: Uint8Array.from([169, 213, 107, 64, 229, 49, 43, 234]),
58
+ open_standby: Uint8Array.from([234, 184, 232, 135, 246, 191, 90, 250]),
59
+ draw_credit: Uint8Array.from([20, 84, 47, 211, 78, 117, 195, 210]),
60
+ repay_credit: Uint8Array.from([38, 113, 240, 182, 109, 179, 154, 245]),
61
+ seize_collateral: Uint8Array.from([40, 250, 7, 243, 168, 184, 116, 154]),
62
+ migrate_v4_to_v5: Uint8Array.from([226, 105, 140, 184, 101, 39, 235, 116])
52
63
  });
53
64
  var OTS_SESSION_REGISTER_V1_DOMAIN = (() => {
54
65
  const buf = new Uint8Array(32);