@vaultum/sdk 0.1.9 → 0.1.10

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.d.mts CHANGED
@@ -48,6 +48,10 @@ interface AuthMeResponse<TUser = ApiUser> {
48
48
  interface LogoutResponse {
49
49
  message: string;
50
50
  }
51
+ interface AuthSelectedChainResponse {
52
+ selectedChain: string | null;
53
+ enforced?: boolean;
54
+ }
51
55
  interface WalletChallengeResponse {
52
56
  challengeId: string;
53
57
  message: string;
@@ -990,6 +994,7 @@ declare const API: {
990
994
  readonly logout: "/api/auth/logout";
991
995
  readonly logoutAll: "/api/auth/logout-all";
992
996
  readonly me: "/api/auth/me";
997
+ readonly selectedChain: "/api/auth/selected-chain";
993
998
  readonly walletLinkChallenge: "/api/auth/wallet/link/challenge";
994
999
  readonly walletLinkVerify: "/api/auth/wallet/link/verify";
995
1000
  readonly wallets: "/api/auth/wallets";
@@ -1314,6 +1319,8 @@ declare class VaultumClient {
1314
1319
  signal?: AbortSignal;
1315
1320
  }): Promise<AuthTokenResponse>;
1316
1321
  authMe(signal?: AbortSignal): Promise<ApiUser>;
1322
+ authGetSelectedChain(signal?: AbortSignal): Promise<AuthSelectedChainResponse>;
1323
+ authSetSelectedChain(chain: string, signal?: AbortSignal): Promise<AuthSelectedChainResponse>;
1317
1324
  authLogout(signal?: AbortSignal): Promise<LogoutResponse>;
1318
1325
  authLogoutAll(signal?: AbortSignal): Promise<LogoutResponse>;
1319
1326
  walletChallenge(params: {
@@ -2375,4 +2382,4 @@ declare function hashCrossChainRootTypedData(params: CrossChainRootTypedDataPara
2375
2382
 
2376
2383
  declare const VERSION: string;
2377
2384
 
2378
- export { API, type AccountCreateResult, type AccountOperation, type AccountOperations, type AccountRoles, type AccountVerifyResult, type ActorPermissions, type AddressBookEntry, type AddressBookPage, type AddressCapabilities, type AggregatedRecoveryInitiateResponse, type AggregatedRecoveryPrepareExecutionResponse, type AggregatedRecoveryStatus, type AllowlistRoots, type AllowlistStatus, type ApiUser, type ArmedStatus, type AuthMeResponse, type AuthTokenResponse, type Automation, type AutomationDetails, type AutomationExecution, type AutomationExecutionStatus, type AutomationPage, type AutomationResponse, type AutomationStatus, type AutomationType, type BanStatus, CONTRACTS, type CanaryOptIn, type Capabilities, type ContractName, type CrossChainConfig, type CrossChainGasLimit, type CrossChainPendingProposal, type CrossChainReceiverState, type CrossChainRootTypedDataParams, type CrossChainRootTypedMessage, type CrossChainSkipProposal, type CursorPage, type EIP712Template, ENTRYPOINT_V07, type EnabledFeature, type ExecuteCall, FEATURE_IDS, FEATURE_ID_STRINGS, type FeatureConfig, type FeatureInfo, type FeatureInternal, type FinalizedProposal, GOVERNANCE_DOMAIN_NAME, GOVERNANCE_DOMAIN_VERSION, type GloballyPaused, type GuardianApproval, type GuardianConfig, type HasRole, type HealthStatus, type IsGuardian, type LogoutResponse, type NativeLimitConfig, type NativeLimitStatus, type OnChainRecoveryStatus, type OpWaitResponse, type OperationResult, type OperationState, type OtpInitResponse, type OtpVerifyResponse, type PackedUserOperation, type PasskeySignupResponse, type PasskeySuborgsResponse, type PortfolioTokenItem, type PortfolioTokensResponse, type Proposal, type ProposalCall, type ProposalDigest, type ProposalSignature, type ProposalsPage, type QuoteResponse, type QuoteResponseRaw, type RecoveryGuardians, type RecoveryProposal, type RecoveryProposalInfo, type RecoveryProposalState, type RecoveryStatus, type RegistryFeatures, type RegistryVersion, type RelayEstimate, type RequestContext, type RequestInterceptor, type ResponseContext, type ResponseInterceptor, type RetryConfig, type RoleBudget, type RoleInfo, type RolesInfo, type SDKErrorCode, type SelectorIndex, type SessionKeyCount, type SessionKeyInfo, type SessionKeyList, type SessionKeyPolicySigner, type SessionKeyRoles, type SessionKeyStatus, type SessionKeyTokenLimit, type SettlementPrepareResult, type SettlementQuote, type SettlementTokens, type SpendingLimitBucket, type SpendingLimitPreview, type SpendingLimitStatus, type SpendingLimitSummary, type TargetIndex, type TimestampValidation, type TimingConfig, type TokenLimitConfig, type TokenLimitFullStatus, type TokenLimitStatus, type TokenMaxTransfer, type TriggerAutomationResponse, UserOpBuilder, type UserOpBuilderConfig, type UserOpGasLimits, type UserOpResponse, type UserOpSimulationResponse, type UserOpTemplate, type UserOperation, type UserWalletInfo, VERSION, type ValidatorSelectorPermitted, type VaultDeployment, type VaultGroup, type VaultGroupsResponse, type VaultState, VaultumClient, type VaultumConfig, VaultumError, type WaitOptions, type WalletChallengeResponse, type WalletsResponse, buildCrossChainRootTypedData, createUserOpBuilder, getUserOpHash, hashCrossChainRootTypedData, packGasFees, packGasLimits, parseQuoteResponse, unpackGasFees, unpackGasLimits };
2385
+ export { API, type AccountCreateResult, type AccountOperation, type AccountOperations, type AccountRoles, type AccountVerifyResult, type ActorPermissions, type AddressBookEntry, type AddressBookPage, type AddressCapabilities, type AggregatedRecoveryInitiateResponse, type AggregatedRecoveryPrepareExecutionResponse, type AggregatedRecoveryStatus, type AllowlistRoots, type AllowlistStatus, type ApiUser, type ArmedStatus, type AuthMeResponse, type AuthSelectedChainResponse, type AuthTokenResponse, type Automation, type AutomationDetails, type AutomationExecution, type AutomationExecutionStatus, type AutomationPage, type AutomationResponse, type AutomationStatus, type AutomationType, type BanStatus, CONTRACTS, type CanaryOptIn, type Capabilities, type ContractName, type CrossChainConfig, type CrossChainGasLimit, type CrossChainPendingProposal, type CrossChainReceiverState, type CrossChainRootTypedDataParams, type CrossChainRootTypedMessage, type CrossChainSkipProposal, type CursorPage, type EIP712Template, ENTRYPOINT_V07, type EnabledFeature, type ExecuteCall, FEATURE_IDS, FEATURE_ID_STRINGS, type FeatureConfig, type FeatureInfo, type FeatureInternal, type FinalizedProposal, GOVERNANCE_DOMAIN_NAME, GOVERNANCE_DOMAIN_VERSION, type GloballyPaused, type GuardianApproval, type GuardianConfig, type HasRole, type HealthStatus, type IsGuardian, type LogoutResponse, type NativeLimitConfig, type NativeLimitStatus, type OnChainRecoveryStatus, type OpWaitResponse, type OperationResult, type OperationState, type OtpInitResponse, type OtpVerifyResponse, type PackedUserOperation, type PasskeySignupResponse, type PasskeySuborgsResponse, type PortfolioTokenItem, type PortfolioTokensResponse, type Proposal, type ProposalCall, type ProposalDigest, type ProposalSignature, type ProposalsPage, type QuoteResponse, type QuoteResponseRaw, type RecoveryGuardians, type RecoveryProposal, type RecoveryProposalInfo, type RecoveryProposalState, type RecoveryStatus, type RegistryFeatures, type RegistryVersion, type RelayEstimate, type RequestContext, type RequestInterceptor, type ResponseContext, type ResponseInterceptor, type RetryConfig, type RoleBudget, type RoleInfo, type RolesInfo, type SDKErrorCode, type SelectorIndex, type SessionKeyCount, type SessionKeyInfo, type SessionKeyList, type SessionKeyPolicySigner, type SessionKeyRoles, type SessionKeyStatus, type SessionKeyTokenLimit, type SettlementPrepareResult, type SettlementQuote, type SettlementTokens, type SpendingLimitBucket, type SpendingLimitPreview, type SpendingLimitStatus, type SpendingLimitSummary, type TargetIndex, type TimestampValidation, type TimingConfig, type TokenLimitConfig, type TokenLimitFullStatus, type TokenLimitStatus, type TokenMaxTransfer, type TriggerAutomationResponse, UserOpBuilder, type UserOpBuilderConfig, type UserOpGasLimits, type UserOpResponse, type UserOpSimulationResponse, type UserOpTemplate, type UserOperation, type UserWalletInfo, VERSION, type ValidatorSelectorPermitted, type VaultDeployment, type VaultGroup, type VaultGroupsResponse, type VaultState, VaultumClient, type VaultumConfig, VaultumError, type WaitOptions, type WalletChallengeResponse, type WalletsResponse, buildCrossChainRootTypedData, createUserOpBuilder, getUserOpHash, hashCrossChainRootTypedData, packGasFees, packGasLimits, parseQuoteResponse, unpackGasFees, unpackGasLimits };
package/dist/index.d.ts CHANGED
@@ -48,6 +48,10 @@ interface AuthMeResponse<TUser = ApiUser> {
48
48
  interface LogoutResponse {
49
49
  message: string;
50
50
  }
51
+ interface AuthSelectedChainResponse {
52
+ selectedChain: string | null;
53
+ enforced?: boolean;
54
+ }
51
55
  interface WalletChallengeResponse {
52
56
  challengeId: string;
53
57
  message: string;
@@ -990,6 +994,7 @@ declare const API: {
990
994
  readonly logout: "/api/auth/logout";
991
995
  readonly logoutAll: "/api/auth/logout-all";
992
996
  readonly me: "/api/auth/me";
997
+ readonly selectedChain: "/api/auth/selected-chain";
993
998
  readonly walletLinkChallenge: "/api/auth/wallet/link/challenge";
994
999
  readonly walletLinkVerify: "/api/auth/wallet/link/verify";
995
1000
  readonly wallets: "/api/auth/wallets";
@@ -1314,6 +1319,8 @@ declare class VaultumClient {
1314
1319
  signal?: AbortSignal;
1315
1320
  }): Promise<AuthTokenResponse>;
1316
1321
  authMe(signal?: AbortSignal): Promise<ApiUser>;
1322
+ authGetSelectedChain(signal?: AbortSignal): Promise<AuthSelectedChainResponse>;
1323
+ authSetSelectedChain(chain: string, signal?: AbortSignal): Promise<AuthSelectedChainResponse>;
1317
1324
  authLogout(signal?: AbortSignal): Promise<LogoutResponse>;
1318
1325
  authLogoutAll(signal?: AbortSignal): Promise<LogoutResponse>;
1319
1326
  walletChallenge(params: {
@@ -2375,4 +2382,4 @@ declare function hashCrossChainRootTypedData(params: CrossChainRootTypedDataPara
2375
2382
 
2376
2383
  declare const VERSION: string;
2377
2384
 
2378
- export { API, type AccountCreateResult, type AccountOperation, type AccountOperations, type AccountRoles, type AccountVerifyResult, type ActorPermissions, type AddressBookEntry, type AddressBookPage, type AddressCapabilities, type AggregatedRecoveryInitiateResponse, type AggregatedRecoveryPrepareExecutionResponse, type AggregatedRecoveryStatus, type AllowlistRoots, type AllowlistStatus, type ApiUser, type ArmedStatus, type AuthMeResponse, type AuthTokenResponse, type Automation, type AutomationDetails, type AutomationExecution, type AutomationExecutionStatus, type AutomationPage, type AutomationResponse, type AutomationStatus, type AutomationType, type BanStatus, CONTRACTS, type CanaryOptIn, type Capabilities, type ContractName, type CrossChainConfig, type CrossChainGasLimit, type CrossChainPendingProposal, type CrossChainReceiverState, type CrossChainRootTypedDataParams, type CrossChainRootTypedMessage, type CrossChainSkipProposal, type CursorPage, type EIP712Template, ENTRYPOINT_V07, type EnabledFeature, type ExecuteCall, FEATURE_IDS, FEATURE_ID_STRINGS, type FeatureConfig, type FeatureInfo, type FeatureInternal, type FinalizedProposal, GOVERNANCE_DOMAIN_NAME, GOVERNANCE_DOMAIN_VERSION, type GloballyPaused, type GuardianApproval, type GuardianConfig, type HasRole, type HealthStatus, type IsGuardian, type LogoutResponse, type NativeLimitConfig, type NativeLimitStatus, type OnChainRecoveryStatus, type OpWaitResponse, type OperationResult, type OperationState, type OtpInitResponse, type OtpVerifyResponse, type PackedUserOperation, type PasskeySignupResponse, type PasskeySuborgsResponse, type PortfolioTokenItem, type PortfolioTokensResponse, type Proposal, type ProposalCall, type ProposalDigest, type ProposalSignature, type ProposalsPage, type QuoteResponse, type QuoteResponseRaw, type RecoveryGuardians, type RecoveryProposal, type RecoveryProposalInfo, type RecoveryProposalState, type RecoveryStatus, type RegistryFeatures, type RegistryVersion, type RelayEstimate, type RequestContext, type RequestInterceptor, type ResponseContext, type ResponseInterceptor, type RetryConfig, type RoleBudget, type RoleInfo, type RolesInfo, type SDKErrorCode, type SelectorIndex, type SessionKeyCount, type SessionKeyInfo, type SessionKeyList, type SessionKeyPolicySigner, type SessionKeyRoles, type SessionKeyStatus, type SessionKeyTokenLimit, type SettlementPrepareResult, type SettlementQuote, type SettlementTokens, type SpendingLimitBucket, type SpendingLimitPreview, type SpendingLimitStatus, type SpendingLimitSummary, type TargetIndex, type TimestampValidation, type TimingConfig, type TokenLimitConfig, type TokenLimitFullStatus, type TokenLimitStatus, type TokenMaxTransfer, type TriggerAutomationResponse, UserOpBuilder, type UserOpBuilderConfig, type UserOpGasLimits, type UserOpResponse, type UserOpSimulationResponse, type UserOpTemplate, type UserOperation, type UserWalletInfo, VERSION, type ValidatorSelectorPermitted, type VaultDeployment, type VaultGroup, type VaultGroupsResponse, type VaultState, VaultumClient, type VaultumConfig, VaultumError, type WaitOptions, type WalletChallengeResponse, type WalletsResponse, buildCrossChainRootTypedData, createUserOpBuilder, getUserOpHash, hashCrossChainRootTypedData, packGasFees, packGasLimits, parseQuoteResponse, unpackGasFees, unpackGasLimits };
2385
+ export { API, type AccountCreateResult, type AccountOperation, type AccountOperations, type AccountRoles, type AccountVerifyResult, type ActorPermissions, type AddressBookEntry, type AddressBookPage, type AddressCapabilities, type AggregatedRecoveryInitiateResponse, type AggregatedRecoveryPrepareExecutionResponse, type AggregatedRecoveryStatus, type AllowlistRoots, type AllowlistStatus, type ApiUser, type ArmedStatus, type AuthMeResponse, type AuthSelectedChainResponse, type AuthTokenResponse, type Automation, type AutomationDetails, type AutomationExecution, type AutomationExecutionStatus, type AutomationPage, type AutomationResponse, type AutomationStatus, type AutomationType, type BanStatus, CONTRACTS, type CanaryOptIn, type Capabilities, type ContractName, type CrossChainConfig, type CrossChainGasLimit, type CrossChainPendingProposal, type CrossChainReceiverState, type CrossChainRootTypedDataParams, type CrossChainRootTypedMessage, type CrossChainSkipProposal, type CursorPage, type EIP712Template, ENTRYPOINT_V07, type EnabledFeature, type ExecuteCall, FEATURE_IDS, FEATURE_ID_STRINGS, type FeatureConfig, type FeatureInfo, type FeatureInternal, type FinalizedProposal, GOVERNANCE_DOMAIN_NAME, GOVERNANCE_DOMAIN_VERSION, type GloballyPaused, type GuardianApproval, type GuardianConfig, type HasRole, type HealthStatus, type IsGuardian, type LogoutResponse, type NativeLimitConfig, type NativeLimitStatus, type OnChainRecoveryStatus, type OpWaitResponse, type OperationResult, type OperationState, type OtpInitResponse, type OtpVerifyResponse, type PackedUserOperation, type PasskeySignupResponse, type PasskeySuborgsResponse, type PortfolioTokenItem, type PortfolioTokensResponse, type Proposal, type ProposalCall, type ProposalDigest, type ProposalSignature, type ProposalsPage, type QuoteResponse, type QuoteResponseRaw, type RecoveryGuardians, type RecoveryProposal, type RecoveryProposalInfo, type RecoveryProposalState, type RecoveryStatus, type RegistryFeatures, type RegistryVersion, type RelayEstimate, type RequestContext, type RequestInterceptor, type ResponseContext, type ResponseInterceptor, type RetryConfig, type RoleBudget, type RoleInfo, type RolesInfo, type SDKErrorCode, type SelectorIndex, type SessionKeyCount, type SessionKeyInfo, type SessionKeyList, type SessionKeyPolicySigner, type SessionKeyRoles, type SessionKeyStatus, type SessionKeyTokenLimit, type SettlementPrepareResult, type SettlementQuote, type SettlementTokens, type SpendingLimitBucket, type SpendingLimitPreview, type SpendingLimitStatus, type SpendingLimitSummary, type TargetIndex, type TimestampValidation, type TimingConfig, type TokenLimitConfig, type TokenLimitFullStatus, type TokenLimitStatus, type TokenMaxTransfer, type TriggerAutomationResponse, UserOpBuilder, type UserOpBuilderConfig, type UserOpGasLimits, type UserOpResponse, type UserOpSimulationResponse, type UserOpTemplate, type UserOperation, type UserWalletInfo, VERSION, type ValidatorSelectorPermitted, type VaultDeployment, type VaultGroup, type VaultGroupsResponse, type VaultState, VaultumClient, type VaultumConfig, VaultumError, type WaitOptions, type WalletChallengeResponse, type WalletsResponse, buildCrossChainRootTypedData, createUserOpBuilder, getUserOpHash, hashCrossChainRootTypedData, packGasFees, packGasLimits, parseQuoteResponse, unpackGasFees, unpackGasLimits };
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ var API = {
63
63
  logout: "/api/auth/logout",
64
64
  logoutAll: "/api/auth/logout-all",
65
65
  me: "/api/auth/me",
66
+ selectedChain: "/api/auth/selected-chain",
66
67
  walletLinkChallenge: "/api/auth/wallet/link/challenge",
67
68
  walletLinkVerify: "/api/auth/wallet/link/verify",
68
69
  wallets: "/api/auth/wallets",
@@ -837,6 +838,12 @@ var VaultumClient = class {
837
838
  if ("user" in raw && isRecord(raw.user)) return raw.user;
838
839
  return raw;
839
840
  }
841
+ async authGetSelectedChain(signal) {
842
+ return this.request("GET", API.auth.selectedChain, void 0, { signal });
843
+ }
844
+ async authSetSelectedChain(chain, signal) {
845
+ return this.request("POST", API.auth.selectedChain, { chain }, { signal });
846
+ }
840
847
  async authLogout(signal) {
841
848
  const r = await this.request("POST", API.auth.logout, void 0, { signal });
842
849
  this.setBearer(null);
@@ -2142,7 +2149,7 @@ function hashCrossChainRootTypedData(params) {
2142
2149
  }
2143
2150
 
2144
2151
  // src/index.ts
2145
- var VERSION = "0.1.9";
2152
+ var VERSION = "0.1.10";
2146
2153
  // Annotate the CommonJS export names for ESM import in node:
2147
2154
  0 && (module.exports = {
2148
2155
  API,
package/dist/index.mjs CHANGED
@@ -18,6 +18,7 @@ var API = {
18
18
  logout: "/api/auth/logout",
19
19
  logoutAll: "/api/auth/logout-all",
20
20
  me: "/api/auth/me",
21
+ selectedChain: "/api/auth/selected-chain",
21
22
  walletLinkChallenge: "/api/auth/wallet/link/challenge",
22
23
  walletLinkVerify: "/api/auth/wallet/link/verify",
23
24
  wallets: "/api/auth/wallets",
@@ -801,6 +802,12 @@ var VaultumClient = class {
801
802
  if ("user" in raw && isRecord(raw.user)) return raw.user;
802
803
  return raw;
803
804
  }
805
+ async authGetSelectedChain(signal) {
806
+ return this.request("GET", API.auth.selectedChain, void 0, { signal });
807
+ }
808
+ async authSetSelectedChain(chain, signal) {
809
+ return this.request("POST", API.auth.selectedChain, { chain }, { signal });
810
+ }
804
811
  async authLogout(signal) {
805
812
  const r = await this.request("POST", API.auth.logout, void 0, { signal });
806
813
  this.setBearer(null);
@@ -2106,7 +2113,7 @@ function hashCrossChainRootTypedData(params) {
2106
2113
  }
2107
2114
 
2108
2115
  // src/index.ts
2109
- var VERSION = "0.1.9";
2116
+ var VERSION = "0.1.10";
2110
2117
  export {
2111
2118
  API,
2112
2119
  CONTRACTS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaultum/sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "TypeScript SDK for Vaultum smart wallet",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,7 +23,8 @@
23
23
  "typecheck": "tsc --noEmit",
24
24
  "lint": "eslint src --ext .ts",
25
25
  "verify": "npm run lint && npm run test",
26
- "prepublishOnly": "npm run build"
26
+ "release:check": "npm run verify && npm run typecheck && npm run build && npm pack --dry-run",
27
+ "prepublishOnly": "npm run verify && npm run typecheck && npm run build"
27
28
  },
28
29
  "keywords": [
29
30
  "vaultum",