@veridex/sdk 1.1.1 → 1.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.
- package/dist/{EVMClient-DtqvdfUP.d.mts → EVMClient-Bmy9czkE.d.mts} +2 -0
- package/dist/chains/avalanche/index.d.mts +1 -1
- package/dist/chains/avalanche/index.js +81 -19
- package/dist/chains/avalanche/index.js.map +1 -1
- package/dist/chains/avalanche/index.mjs +2 -2
- package/dist/chains/evm/index.d.mts +3 -3
- package/dist/chains/evm/index.js +81 -19
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/chains/evm/index.mjs +1 -1
- package/dist/chains/stacks/index.d.mts +1 -1
- package/dist/chains/starknet/index.d.mts +1 -1
- package/dist/chains/stellar/index.d.mts +312 -0
- package/dist/chains/stellar/index.js +300 -0
- package/dist/chains/stellar/index.js.map +1 -0
- package/dist/chains/stellar/index.mjs +260 -0
- package/dist/chains/stellar/index.mjs.map +1 -0
- package/dist/chains/sui/index.d.mts +1 -1
- package/dist/{chunk-PEGOXMBU.mjs → chunk-6JULIESG.mjs} +2 -2
- package/dist/{chunk-YBN2VC6E.mjs → chunk-E5HHE7IW.mjs} +82 -20
- package/dist/chunk-E5HHE7IW.mjs.map +1 -0
- package/dist/{index-CySMITQ9.d.mts → index-CKKUV4J7.d.mts} +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.js +89 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DWx-5jmz.d.mts → types-C564CfsE.d.mts} +21 -1
- package/package.json +8 -1
- package/dist/chunk-YBN2VC6E.mjs.map +0 -1
- /package/dist/{chunk-PEGOXMBU.mjs.map → chunk-6JULIESG.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -61,10 +61,10 @@ import {
|
|
|
61
61
|
} from "./chunk-CSU4IV2F.mjs";
|
|
62
62
|
import {
|
|
63
63
|
AvalancheClient
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-6JULIESG.mjs";
|
|
65
65
|
import {
|
|
66
66
|
EVMClient
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-E5HHE7IW.mjs";
|
|
68
68
|
import {
|
|
69
69
|
CONSISTENCY_LEVELS,
|
|
70
70
|
GUARDIAN_CONFIG,
|
|
@@ -7730,6 +7730,12 @@ function validateSessionConfig(config) {
|
|
|
7730
7730
|
"INVALID_CONFIG" /* INVALID_CONFIG */
|
|
7731
7731
|
);
|
|
7732
7732
|
}
|
|
7733
|
+
if (config.maxValue === 0n && config.allowUnboundedMaxValue !== true) {
|
|
7734
|
+
throw new SessionError(
|
|
7735
|
+
'Session maxValue=0 means "no per-tx limit" \u2014 the vault daily cap is then the only bound. This is a foot-gun: a compromised session key can drain the vault up to that cap. Pass a non-zero maxValue, or set allowUnboundedMaxValue:true if you have verified the vault daily cap and accept the residual risk.',
|
|
7736
|
+
"INVALID_CONFIG" /* INVALID_CONFIG */
|
|
7737
|
+
);
|
|
7738
|
+
}
|
|
7733
7739
|
}
|
|
7734
7740
|
|
|
7735
7741
|
// src/sessions/storage.ts
|
|
@@ -8275,7 +8281,8 @@ var SessionManager = class {
|
|
|
8275
8281
|
maxValue: config.maxValue ?? 0n,
|
|
8276
8282
|
autoRefresh: config.autoRefresh ?? true,
|
|
8277
8283
|
refreshBuffer: config.refreshBuffer ?? DEFAULT_REFRESH_BUFFER,
|
|
8278
|
-
chainScopes: config.chainScopes ?? []
|
|
8284
|
+
chainScopes: config.chainScopes ?? [],
|
|
8285
|
+
allowUnboundedMaxValue: config.allowUnboundedMaxValue ?? false
|
|
8279
8286
|
};
|
|
8280
8287
|
validateSessionConfig(this.config);
|
|
8281
8288
|
this.debug = managerConfig?.debug ?? false;
|