@vaultum/sdk 0.1.8 → 0.1.9
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 +60 -10
- package/dist/index.d.ts +60 -10
- package/dist/index.js +64 -4
- package/dist/index.mjs +64 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -138,6 +138,14 @@ interface AccountCreateResult {
|
|
|
138
138
|
userOpHash: Hex;
|
|
139
139
|
vaultGroupId: number;
|
|
140
140
|
vaultIndex: number;
|
|
141
|
+
sponsorship?: {
|
|
142
|
+
mode: 'sponsored' | 'self_funded';
|
|
143
|
+
fallbackReason?: string;
|
|
144
|
+
};
|
|
145
|
+
funding?: {
|
|
146
|
+
requiredPrefundWei: string;
|
|
147
|
+
recommendedPrefundWei: string;
|
|
148
|
+
};
|
|
141
149
|
}
|
|
142
150
|
interface AccountVerifyResult {
|
|
143
151
|
address: Address;
|
|
@@ -326,18 +334,59 @@ interface FinalizedProposal {
|
|
|
326
334
|
userOp: Record<string, unknown>;
|
|
327
335
|
}
|
|
328
336
|
interface SettlementTokens {
|
|
337
|
+
chainId: number;
|
|
338
|
+
paymaster: Address | null;
|
|
329
339
|
tokens: Array<{
|
|
330
340
|
symbol: string;
|
|
331
341
|
address: Address;
|
|
332
|
-
|
|
342
|
+
pricing: {
|
|
343
|
+
currentRate: string;
|
|
344
|
+
minRate: string;
|
|
345
|
+
maxRate: string;
|
|
346
|
+
maxChargePerOp: string;
|
|
347
|
+
};
|
|
333
348
|
}>;
|
|
334
349
|
}
|
|
335
350
|
interface SettlementQuote {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
351
|
+
chainId: number;
|
|
352
|
+
sender: Address;
|
|
353
|
+
token: {
|
|
354
|
+
symbol: string;
|
|
355
|
+
address: Address;
|
|
356
|
+
};
|
|
357
|
+
quote: {
|
|
358
|
+
tokenPerEth: string;
|
|
359
|
+
maxTokenCharge: string;
|
|
360
|
+
postOpGasOverhead: string;
|
|
361
|
+
validAfter: number;
|
|
362
|
+
validUntil: number;
|
|
363
|
+
nonce: string;
|
|
364
|
+
bounds: {
|
|
365
|
+
min: string;
|
|
366
|
+
max: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
gasLimits: {
|
|
370
|
+
paymasterVerificationGasLimit: string;
|
|
371
|
+
paymasterPostOpGasLimit: string;
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
interface SettlementPrepareResult {
|
|
375
|
+
paymasterAndData: Hex;
|
|
376
|
+
token: {
|
|
377
|
+
symbol: string;
|
|
378
|
+
address: Address;
|
|
379
|
+
};
|
|
380
|
+
quote: {
|
|
381
|
+
tokenPerEth: string;
|
|
382
|
+
validUntil: number;
|
|
383
|
+
bounds: {
|
|
384
|
+
min: string;
|
|
385
|
+
max: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
nonce: string;
|
|
389
|
+
policyVersion: number;
|
|
341
390
|
}
|
|
342
391
|
type SwapRouteStepType = 'swap' | 'bridge';
|
|
343
392
|
interface SwapRouteStep {
|
|
@@ -1346,6 +1395,7 @@ declare class VaultumClient {
|
|
|
1346
1395
|
sessionKeyAddress: Address;
|
|
1347
1396
|
chain?: string;
|
|
1348
1397
|
vaultIndex?: number;
|
|
1398
|
+
sponsorshipMode?: 'required' | 'prefer' | 'disabled';
|
|
1349
1399
|
salt?: Hex;
|
|
1350
1400
|
owners?: Address[];
|
|
1351
1401
|
threshold?: number;
|
|
@@ -1489,19 +1539,19 @@ declare class VaultumClient {
|
|
|
1489
1539
|
getSettlementQuote(params: {
|
|
1490
1540
|
chain: string;
|
|
1491
1541
|
sender: Address;
|
|
1492
|
-
token:
|
|
1542
|
+
token: string;
|
|
1493
1543
|
maxGasCost: string;
|
|
1494
1544
|
maxFeePerGas: string;
|
|
1495
1545
|
signal?: AbortSignal;
|
|
1496
1546
|
}): Promise<SettlementQuote>;
|
|
1497
1547
|
prepareSettlement(params: {
|
|
1498
1548
|
chain: string;
|
|
1499
|
-
token:
|
|
1549
|
+
token: string;
|
|
1500
1550
|
userOp: UserOperation | PackedUserOperation | Record<string, unknown>;
|
|
1501
1551
|
idempotencyKey?: string;
|
|
1502
1552
|
timestamp?: number;
|
|
1503
1553
|
signal?: AbortSignal;
|
|
1504
|
-
}): Promise<
|
|
1554
|
+
}): Promise<SettlementPrepareResult>;
|
|
1505
1555
|
swapQuote(params: {
|
|
1506
1556
|
wallet: Address;
|
|
1507
1557
|
fromChain: string;
|
|
@@ -2325,4 +2375,4 @@ declare function hashCrossChainRootTypedData(params: CrossChainRootTypedDataPara
|
|
|
2325
2375
|
|
|
2326
2376
|
declare const VERSION: string;
|
|
2327
2377
|
|
|
2328
|
-
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 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,14 @@ interface AccountCreateResult {
|
|
|
138
138
|
userOpHash: Hex;
|
|
139
139
|
vaultGroupId: number;
|
|
140
140
|
vaultIndex: number;
|
|
141
|
+
sponsorship?: {
|
|
142
|
+
mode: 'sponsored' | 'self_funded';
|
|
143
|
+
fallbackReason?: string;
|
|
144
|
+
};
|
|
145
|
+
funding?: {
|
|
146
|
+
requiredPrefundWei: string;
|
|
147
|
+
recommendedPrefundWei: string;
|
|
148
|
+
};
|
|
141
149
|
}
|
|
142
150
|
interface AccountVerifyResult {
|
|
143
151
|
address: Address;
|
|
@@ -326,18 +334,59 @@ interface FinalizedProposal {
|
|
|
326
334
|
userOp: Record<string, unknown>;
|
|
327
335
|
}
|
|
328
336
|
interface SettlementTokens {
|
|
337
|
+
chainId: number;
|
|
338
|
+
paymaster: Address | null;
|
|
329
339
|
tokens: Array<{
|
|
330
340
|
symbol: string;
|
|
331
341
|
address: Address;
|
|
332
|
-
|
|
342
|
+
pricing: {
|
|
343
|
+
currentRate: string;
|
|
344
|
+
minRate: string;
|
|
345
|
+
maxRate: string;
|
|
346
|
+
maxChargePerOp: string;
|
|
347
|
+
};
|
|
333
348
|
}>;
|
|
334
349
|
}
|
|
335
350
|
interface SettlementQuote {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
351
|
+
chainId: number;
|
|
352
|
+
sender: Address;
|
|
353
|
+
token: {
|
|
354
|
+
symbol: string;
|
|
355
|
+
address: Address;
|
|
356
|
+
};
|
|
357
|
+
quote: {
|
|
358
|
+
tokenPerEth: string;
|
|
359
|
+
maxTokenCharge: string;
|
|
360
|
+
postOpGasOverhead: string;
|
|
361
|
+
validAfter: number;
|
|
362
|
+
validUntil: number;
|
|
363
|
+
nonce: string;
|
|
364
|
+
bounds: {
|
|
365
|
+
min: string;
|
|
366
|
+
max: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
gasLimits: {
|
|
370
|
+
paymasterVerificationGasLimit: string;
|
|
371
|
+
paymasterPostOpGasLimit: string;
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
interface SettlementPrepareResult {
|
|
375
|
+
paymasterAndData: Hex;
|
|
376
|
+
token: {
|
|
377
|
+
symbol: string;
|
|
378
|
+
address: Address;
|
|
379
|
+
};
|
|
380
|
+
quote: {
|
|
381
|
+
tokenPerEth: string;
|
|
382
|
+
validUntil: number;
|
|
383
|
+
bounds: {
|
|
384
|
+
min: string;
|
|
385
|
+
max: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
nonce: string;
|
|
389
|
+
policyVersion: number;
|
|
341
390
|
}
|
|
342
391
|
type SwapRouteStepType = 'swap' | 'bridge';
|
|
343
392
|
interface SwapRouteStep {
|
|
@@ -1346,6 +1395,7 @@ declare class VaultumClient {
|
|
|
1346
1395
|
sessionKeyAddress: Address;
|
|
1347
1396
|
chain?: string;
|
|
1348
1397
|
vaultIndex?: number;
|
|
1398
|
+
sponsorshipMode?: 'required' | 'prefer' | 'disabled';
|
|
1349
1399
|
salt?: Hex;
|
|
1350
1400
|
owners?: Address[];
|
|
1351
1401
|
threshold?: number;
|
|
@@ -1489,19 +1539,19 @@ declare class VaultumClient {
|
|
|
1489
1539
|
getSettlementQuote(params: {
|
|
1490
1540
|
chain: string;
|
|
1491
1541
|
sender: Address;
|
|
1492
|
-
token:
|
|
1542
|
+
token: string;
|
|
1493
1543
|
maxGasCost: string;
|
|
1494
1544
|
maxFeePerGas: string;
|
|
1495
1545
|
signal?: AbortSignal;
|
|
1496
1546
|
}): Promise<SettlementQuote>;
|
|
1497
1547
|
prepareSettlement(params: {
|
|
1498
1548
|
chain: string;
|
|
1499
|
-
token:
|
|
1549
|
+
token: string;
|
|
1500
1550
|
userOp: UserOperation | PackedUserOperation | Record<string, unknown>;
|
|
1501
1551
|
idempotencyKey?: string;
|
|
1502
1552
|
timestamp?: number;
|
|
1503
1553
|
signal?: AbortSignal;
|
|
1504
|
-
}): Promise<
|
|
1554
|
+
}): Promise<SettlementPrepareResult>;
|
|
1505
1555
|
swapQuote(params: {
|
|
1506
1556
|
wallet: Address;
|
|
1507
1557
|
fromChain: string;
|
|
@@ -2325,4 +2375,4 @@ declare function hashCrossChainRootTypedData(params: CrossChainRootTypedDataPara
|
|
|
2325
2375
|
|
|
2326
2376
|
declare const VERSION: string;
|
|
2327
2377
|
|
|
2328
|
-
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 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -998,6 +998,7 @@ var VaultumClient = class {
|
|
|
998
998
|
type: "create",
|
|
999
999
|
chain: options.chain ?? this.chain,
|
|
1000
1000
|
vaultIndex: options.vaultIndex,
|
|
1001
|
+
sponsorshipMode: options.sponsorshipMode ?? "prefer",
|
|
1001
1002
|
salt: options.salt,
|
|
1002
1003
|
owners: options.owners?.map((a) => a.toLowerCase()),
|
|
1003
1004
|
threshold: options.threshold,
|
|
@@ -1141,16 +1142,57 @@ var VaultumClient = class {
|
|
|
1141
1142
|
}
|
|
1142
1143
|
async getSettlementTokens(options) {
|
|
1143
1144
|
const chain = options?.chain ?? this.chain ?? "sepolia";
|
|
1144
|
-
|
|
1145
|
+
const raw = await this.request("GET", `${API.settlement.tokens}?chain=${chain}`, void 0, {
|
|
1146
|
+
signal: options?.signal
|
|
1147
|
+
});
|
|
1148
|
+
return {
|
|
1149
|
+
chainId: Number(raw.chainId),
|
|
1150
|
+
paymaster: raw.paymaster ? raw.paymaster.toLowerCase() : null,
|
|
1151
|
+
tokens: (raw.tokens ?? []).map((token) => ({
|
|
1152
|
+
symbol: token.symbol,
|
|
1153
|
+
address: token.address.toLowerCase(),
|
|
1154
|
+
pricing: {
|
|
1155
|
+
currentRate: token.pricing.currentRate,
|
|
1156
|
+
minRate: token.pricing.minRate,
|
|
1157
|
+
maxRate: token.pricing.maxRate,
|
|
1158
|
+
maxChargePerOp: token.pricing.maxChargePerOp
|
|
1159
|
+
}
|
|
1160
|
+
}))
|
|
1161
|
+
};
|
|
1145
1162
|
}
|
|
1146
1163
|
async getSettlementQuote(params) {
|
|
1147
|
-
|
|
1164
|
+
const raw = await this.request("POST", API.settlement.quote, {
|
|
1148
1165
|
chain: params.chain,
|
|
1149
1166
|
sender: params.sender.toLowerCase(),
|
|
1150
1167
|
token: params.token,
|
|
1151
1168
|
maxGasCost: params.maxGasCost,
|
|
1152
1169
|
maxFeePerGas: params.maxFeePerGas
|
|
1153
1170
|
}, { signal: params.signal });
|
|
1171
|
+
const quote = raw;
|
|
1172
|
+
return {
|
|
1173
|
+
chainId: Number(quote.chainId),
|
|
1174
|
+
sender: quote.sender.toLowerCase(),
|
|
1175
|
+
token: {
|
|
1176
|
+
symbol: quote.token.symbol,
|
|
1177
|
+
address: quote.token.address.toLowerCase()
|
|
1178
|
+
},
|
|
1179
|
+
quote: {
|
|
1180
|
+
tokenPerEth: quote.quote.tokenPerEth,
|
|
1181
|
+
maxTokenCharge: quote.quote.maxTokenCharge,
|
|
1182
|
+
postOpGasOverhead: quote.quote.postOpGasOverhead,
|
|
1183
|
+
validAfter: Number(quote.quote.validAfter),
|
|
1184
|
+
validUntil: Number(quote.quote.validUntil),
|
|
1185
|
+
nonce: quote.quote.nonce,
|
|
1186
|
+
bounds: {
|
|
1187
|
+
min: quote.quote.bounds.min,
|
|
1188
|
+
max: quote.quote.bounds.max
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
gasLimits: {
|
|
1192
|
+
paymasterVerificationGasLimit: quote.gasLimits.paymasterVerificationGasLimit,
|
|
1193
|
+
paymasterPostOpGasLimit: quote.gasLimits.paymasterPostOpGasLimit
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1154
1196
|
}
|
|
1155
1197
|
async prepareSettlement(params) {
|
|
1156
1198
|
const userOp = isPackedUserOp(params.userOp) ? packedToUserOperation(params.userOp) : isUserOperation(params.userOp) ? normalizeUserOperation(params.userOp) : params.userOp;
|
|
@@ -1161,11 +1203,29 @@ var VaultumClient = class {
|
|
|
1161
1203
|
};
|
|
1162
1204
|
const idempotencyKey = params.idempotencyKey ?? autoIdempotencyKey(body);
|
|
1163
1205
|
const timestamp = params.timestamp ?? nowUnix();
|
|
1164
|
-
|
|
1206
|
+
const raw = await this.request("POST", API.settlement.prepare, body, {
|
|
1165
1207
|
idempotencyKey,
|
|
1166
1208
|
timestamp,
|
|
1167
1209
|
signal: params.signal
|
|
1168
1210
|
});
|
|
1211
|
+
const prepared = raw;
|
|
1212
|
+
return {
|
|
1213
|
+
paymasterAndData: prepared.paymasterAndData,
|
|
1214
|
+
token: {
|
|
1215
|
+
symbol: prepared.token.symbol,
|
|
1216
|
+
address: prepared.token.address.toLowerCase()
|
|
1217
|
+
},
|
|
1218
|
+
quote: {
|
|
1219
|
+
tokenPerEth: prepared.quote.tokenPerEth,
|
|
1220
|
+
validUntil: Number(prepared.quote.validUntil),
|
|
1221
|
+
bounds: {
|
|
1222
|
+
min: prepared.quote.bounds.min,
|
|
1223
|
+
max: prepared.quote.bounds.max
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
nonce: prepared.nonce,
|
|
1227
|
+
policyVersion: Number(prepared.policyVersion)
|
|
1228
|
+
};
|
|
1169
1229
|
}
|
|
1170
1230
|
async swapQuote(params) {
|
|
1171
1231
|
return this.request("POST", API.swap.quote, {
|
|
@@ -2082,7 +2142,7 @@ function hashCrossChainRootTypedData(params) {
|
|
|
2082
2142
|
}
|
|
2083
2143
|
|
|
2084
2144
|
// src/index.ts
|
|
2085
|
-
var VERSION = "0.1.
|
|
2145
|
+
var VERSION = "0.1.9";
|
|
2086
2146
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2087
2147
|
0 && (module.exports = {
|
|
2088
2148
|
API,
|
package/dist/index.mjs
CHANGED
|
@@ -962,6 +962,7 @@ var VaultumClient = class {
|
|
|
962
962
|
type: "create",
|
|
963
963
|
chain: options.chain ?? this.chain,
|
|
964
964
|
vaultIndex: options.vaultIndex,
|
|
965
|
+
sponsorshipMode: options.sponsorshipMode ?? "prefer",
|
|
965
966
|
salt: options.salt,
|
|
966
967
|
owners: options.owners?.map((a) => a.toLowerCase()),
|
|
967
968
|
threshold: options.threshold,
|
|
@@ -1105,16 +1106,57 @@ var VaultumClient = class {
|
|
|
1105
1106
|
}
|
|
1106
1107
|
async getSettlementTokens(options) {
|
|
1107
1108
|
const chain = options?.chain ?? this.chain ?? "sepolia";
|
|
1108
|
-
|
|
1109
|
+
const raw = await this.request("GET", `${API.settlement.tokens}?chain=${chain}`, void 0, {
|
|
1110
|
+
signal: options?.signal
|
|
1111
|
+
});
|
|
1112
|
+
return {
|
|
1113
|
+
chainId: Number(raw.chainId),
|
|
1114
|
+
paymaster: raw.paymaster ? raw.paymaster.toLowerCase() : null,
|
|
1115
|
+
tokens: (raw.tokens ?? []).map((token) => ({
|
|
1116
|
+
symbol: token.symbol,
|
|
1117
|
+
address: token.address.toLowerCase(),
|
|
1118
|
+
pricing: {
|
|
1119
|
+
currentRate: token.pricing.currentRate,
|
|
1120
|
+
minRate: token.pricing.minRate,
|
|
1121
|
+
maxRate: token.pricing.maxRate,
|
|
1122
|
+
maxChargePerOp: token.pricing.maxChargePerOp
|
|
1123
|
+
}
|
|
1124
|
+
}))
|
|
1125
|
+
};
|
|
1109
1126
|
}
|
|
1110
1127
|
async getSettlementQuote(params) {
|
|
1111
|
-
|
|
1128
|
+
const raw = await this.request("POST", API.settlement.quote, {
|
|
1112
1129
|
chain: params.chain,
|
|
1113
1130
|
sender: params.sender.toLowerCase(),
|
|
1114
1131
|
token: params.token,
|
|
1115
1132
|
maxGasCost: params.maxGasCost,
|
|
1116
1133
|
maxFeePerGas: params.maxFeePerGas
|
|
1117
1134
|
}, { signal: params.signal });
|
|
1135
|
+
const quote = raw;
|
|
1136
|
+
return {
|
|
1137
|
+
chainId: Number(quote.chainId),
|
|
1138
|
+
sender: quote.sender.toLowerCase(),
|
|
1139
|
+
token: {
|
|
1140
|
+
symbol: quote.token.symbol,
|
|
1141
|
+
address: quote.token.address.toLowerCase()
|
|
1142
|
+
},
|
|
1143
|
+
quote: {
|
|
1144
|
+
tokenPerEth: quote.quote.tokenPerEth,
|
|
1145
|
+
maxTokenCharge: quote.quote.maxTokenCharge,
|
|
1146
|
+
postOpGasOverhead: quote.quote.postOpGasOverhead,
|
|
1147
|
+
validAfter: Number(quote.quote.validAfter),
|
|
1148
|
+
validUntil: Number(quote.quote.validUntil),
|
|
1149
|
+
nonce: quote.quote.nonce,
|
|
1150
|
+
bounds: {
|
|
1151
|
+
min: quote.quote.bounds.min,
|
|
1152
|
+
max: quote.quote.bounds.max
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
gasLimits: {
|
|
1156
|
+
paymasterVerificationGasLimit: quote.gasLimits.paymasterVerificationGasLimit,
|
|
1157
|
+
paymasterPostOpGasLimit: quote.gasLimits.paymasterPostOpGasLimit
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1118
1160
|
}
|
|
1119
1161
|
async prepareSettlement(params) {
|
|
1120
1162
|
const userOp = isPackedUserOp(params.userOp) ? packedToUserOperation(params.userOp) : isUserOperation(params.userOp) ? normalizeUserOperation(params.userOp) : params.userOp;
|
|
@@ -1125,11 +1167,29 @@ var VaultumClient = class {
|
|
|
1125
1167
|
};
|
|
1126
1168
|
const idempotencyKey = params.idempotencyKey ?? autoIdempotencyKey(body);
|
|
1127
1169
|
const timestamp = params.timestamp ?? nowUnix();
|
|
1128
|
-
|
|
1170
|
+
const raw = await this.request("POST", API.settlement.prepare, body, {
|
|
1129
1171
|
idempotencyKey,
|
|
1130
1172
|
timestamp,
|
|
1131
1173
|
signal: params.signal
|
|
1132
1174
|
});
|
|
1175
|
+
const prepared = raw;
|
|
1176
|
+
return {
|
|
1177
|
+
paymasterAndData: prepared.paymasterAndData,
|
|
1178
|
+
token: {
|
|
1179
|
+
symbol: prepared.token.symbol,
|
|
1180
|
+
address: prepared.token.address.toLowerCase()
|
|
1181
|
+
},
|
|
1182
|
+
quote: {
|
|
1183
|
+
tokenPerEth: prepared.quote.tokenPerEth,
|
|
1184
|
+
validUntil: Number(prepared.quote.validUntil),
|
|
1185
|
+
bounds: {
|
|
1186
|
+
min: prepared.quote.bounds.min,
|
|
1187
|
+
max: prepared.quote.bounds.max
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
nonce: prepared.nonce,
|
|
1191
|
+
policyVersion: Number(prepared.policyVersion)
|
|
1192
|
+
};
|
|
1133
1193
|
}
|
|
1134
1194
|
async swapQuote(params) {
|
|
1135
1195
|
return this.request("POST", API.swap.quote, {
|
|
@@ -2046,7 +2106,7 @@ function hashCrossChainRootTypedData(params) {
|
|
|
2046
2106
|
}
|
|
2047
2107
|
|
|
2048
2108
|
// src/index.ts
|
|
2049
|
-
var VERSION = "0.1.
|
|
2109
|
+
var VERSION = "0.1.9";
|
|
2050
2110
|
export {
|
|
2051
2111
|
API,
|
|
2052
2112
|
CONTRACTS,
|