@rhinestone/sdk 2.0.0-beta.40 → 2.0.0-beta.42
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/src/accounts/index.d.ts +16 -3
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +57 -42
- package/dist/src/accounts/signing/common.d.ts +10 -1
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +41 -36
- package/dist/src/errors/index.d.ts +5 -5
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +4 -4
- package/dist/src/execution/error.d.ts +45 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +53 -1
- package/dist/src/execution/index.d.ts +3 -2
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +5 -5
- package/dist/src/execution/utils.d.ts +42 -5
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +360 -9
- package/dist/src/index.d.ts +26 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -1
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.js +1 -1
- package/dist/src/orchestrator/error.d.ts +67 -2
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +123 -6
- package/dist/src/orchestrator/index.d.ts +4 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +2 -2
- package/dist/src/orchestrator/types.d.ts +6 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/wire.gen.d.ts +1486 -27
- package/dist/src/orchestrator/wire.gen.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Address, type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type SignableMessage, type SignedAuthorization, type SignedAuthorizationList, type TypedData, type TypedDataDefinition, type TypedDataDomain } from 'viem';
|
|
2
|
-
import { type UserOperation } from 'viem/account-abstraction';
|
|
1
|
+
import { type Account, type Address, type Chain, type HashTypedDataParameters, type Hex, type PublicClient, type SignableMessage, type SignedAuthorization, type SignedAuthorizationList, type TypedData, type TypedDataDefinition, type TypedDataDomain } from 'viem';
|
|
2
|
+
import { type UserOperation, type WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
3
|
import { type ResolvedSessionSignerSet } from '../modules/validators/smart-sessions.js';
|
|
4
4
|
import { type Quote, type SignData } from '../orchestrator/index.js';
|
|
5
5
|
import { type DestinationChain, type NonEvmAddress } from '../orchestrator/destinations.js';
|
|
@@ -36,6 +36,41 @@ interface PreparedTransactionData {
|
|
|
36
36
|
interface QuoteSelection {
|
|
37
37
|
intentId: string;
|
|
38
38
|
}
|
|
39
|
+
interface SignAsOwnerOptions {
|
|
40
|
+
/** Account that contributes this signature. Must belong to the configured owner set. */
|
|
41
|
+
owner: Account | WebAuthnAccount;
|
|
42
|
+
/** Multi-factor validator ID containing `owner`. Required only for multi-factor accounts. */
|
|
43
|
+
validatorId?: number | Hex;
|
|
44
|
+
/** Quote to sign. Defaults to `preparedTransaction.quotes.best`. */
|
|
45
|
+
intentId?: string;
|
|
46
|
+
}
|
|
47
|
+
interface OwnerPasskeySignature {
|
|
48
|
+
webauthn: {
|
|
49
|
+
authenticatorData: Hex;
|
|
50
|
+
challengeIndex?: number;
|
|
51
|
+
clientDataJSON: string;
|
|
52
|
+
typeIndex?: number;
|
|
53
|
+
userVerificationRequired?: boolean;
|
|
54
|
+
};
|
|
55
|
+
signature: Hex;
|
|
56
|
+
}
|
|
57
|
+
type OwnerSignatureData = {
|
|
58
|
+
kind: 'ecdsa';
|
|
59
|
+
signer: Address;
|
|
60
|
+
origin: Hex[];
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'passkey';
|
|
63
|
+
publicKey: Hex;
|
|
64
|
+
origin: OwnerPasskeySignature[];
|
|
65
|
+
};
|
|
66
|
+
type OwnerSignature = ({
|
|
67
|
+
intentId: string;
|
|
68
|
+
} & OwnerSignatureData) | {
|
|
69
|
+
intentId: string;
|
|
70
|
+
kind: 'multi-factor';
|
|
71
|
+
validatorId: number | Hex;
|
|
72
|
+
signature: OwnerSignatureData;
|
|
73
|
+
};
|
|
39
74
|
interface PreparedUserOperationData {
|
|
40
75
|
userOperation: UserOperation;
|
|
41
76
|
hash: Hex;
|
|
@@ -58,7 +93,9 @@ declare function getTransactionMessages(_config: RhinestoneConfig, preparedTrans
|
|
|
58
93
|
destination: TypedDataDefinition;
|
|
59
94
|
targetExecution?: TypedDataDefinition;
|
|
60
95
|
};
|
|
96
|
+
declare function signTransaction(config: RhinestoneConfig, preparedTransaction: PreparedTransactionData, options: SignAsOwnerOptions): Promise<OwnerSignature>;
|
|
61
97
|
declare function signTransaction(config: RhinestoneConfig, preparedTransaction: PreparedTransactionData, options?: QuoteSelection): Promise<SignedTransactionData>;
|
|
98
|
+
declare function assembleTransaction(config: RhinestoneConfig, preparedTransaction: PreparedTransactionData, signatures: OwnerSignature[]): Promise<SignedTransactionData>;
|
|
62
99
|
declare function getTargetExecutionSignature(config: RhinestoneConfig, signData: SignData, targetChain: DestinationChain, signers: SignerSet | undefined): Promise<`0x${string}` | undefined>;
|
|
63
100
|
declare function signUserOperation(config: RhinestoneConfig, preparedUserOperation: PreparedUserOperationData): Promise<SignedUserOperationData>;
|
|
64
101
|
declare function signAuthorizations(config: RhinestoneConfig, preparedTransaction: PreparedTransactionData): Promise<SignedAuthorization[]>;
|
|
@@ -97,7 +134,7 @@ declare function prepareTransactionAsIntent(config: RhinestoneConfig, sourceChai
|
|
|
97
134
|
to: Address;
|
|
98
135
|
data: Hex;
|
|
99
136
|
}[];
|
|
100
|
-
} | undefined, signers: SignerSet | undefined, sourceCalls?: Record<number, SourceCallInput[]>, appFees?: AppFeeRate): Promise<{
|
|
137
|
+
} | undefined, signers: SignerSet | undefined, sourceCalls?: Record<number, SourceCallInput[]>, appFees?: AppFeeRate, customDeadline?: number): Promise<{
|
|
101
138
|
quotes: {
|
|
102
139
|
traceId: string;
|
|
103
140
|
best: Quote;
|
|
@@ -125,6 +162,6 @@ declare function hashErc7739TypedDataForSolady({ domain, types, primaryType, mes
|
|
|
125
162
|
salt: Hex;
|
|
126
163
|
};
|
|
127
164
|
}): Hex;
|
|
128
|
-
export { prepareTransaction, getTransactionMessages, signTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, prepareUserOperation, signUserOperation, submitUserOperation, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, getTokenRequests, resolveCallInputs, getIntentAccount, getTargetExecutionSignature, hashErc7739TypedDataForSolady, resolveSessionForChain, resolveSignatureMode, };
|
|
129
|
-
export type { InternalSignerSet, TransactionResult, PreparedQuotes, PreparedTransactionData, PreparedUserOperationData, QuoteSelection, SignedTransactionData, SignedUserOperationData, UserOperationResult, };
|
|
165
|
+
export { prepareTransaction, getTransactionMessages, signTransaction, assembleTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, prepareUserOperation, signUserOperation, submitUserOperation, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, getTokenRequests, resolveCallInputs, getIntentAccount, getTargetExecutionSignature, hashErc7739TypedDataForSolady, resolveSessionForChain, resolveSignatureMode, };
|
|
166
|
+
export type { InternalSignerSet, TransactionResult, PreparedQuotes, PreparedTransactionData, PreparedUserOperationData, OwnerPasskeySignature, OwnerSignature, OwnerSignatureData, QuoteSelection, SignAsOwnerOptions, SignedTransactionData, SignedUserOperationData, UserOperationResult, };
|
|
130
167
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,K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B,EAChB,2BAA2B,EAC3B,6BAA6B,EAC7B,sBAAsB,EACtB,oBAAoB,GACrB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { concat, createPublicClient, createWalletClient, encodeAbiParameters, encodePacked, hashDomain, hashMessage, hashStruct, hashTypedData, isAddress, keccak256, publicActions, toHex, } from 'viem';
|
|
1
|
+
import { concat, createPublicClient, createWalletClient, encodeAbiParameters, encodePacked, hashDomain, hashMessage, hashStruct, hashTypedData, isAddress, keccak256, pad, publicActions, toHex, } from 'viem';
|
|
2
2
|
import { entryPoint07Address, getUserOperationHash, } from 'viem/account-abstraction';
|
|
3
3
|
import { wrapTypedDataSignature } from 'viem/experimental/erc7739';
|
|
4
|
-
import { EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, FactoryArgsNotAvailableError, getAccountProvider, getAddress, getEip712Domain, getEip1271Signature, getEip7702InitCall, getEmissarySignature, getInitCode, getSmartAccount, getTypedDataPackedSignature, is7702, toErc6492Signature, } from '../accounts/index.js';
|
|
5
|
-
import { convertOwnerSetToSignerSet } from '../accounts/signing/common.js';
|
|
4
|
+
import { EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, FactoryArgsNotAvailableError, getAccountProvider, getAddress, getEip712Domain, getEip1271Signature, getEip7702InitCall, getEmissarySignature, getInitCode, getOwnerEcdsaSignature, getOwnerPasskeySignature, getSmartAccount, getTypedDataPackedSignature, is7702, packAccountSignature, toErc6492Signature, } from '../accounts/index.js';
|
|
5
|
+
import { convertOwnerSetToSignerSet, packMultiFactorOwnerSignatures, packPasskeyOwnerSignatures, } from '../accounts/signing/common.js';
|
|
6
6
|
import { K1_DEFAULT_VALIDATOR_ADDRESS } from '../accounts/startale.js';
|
|
7
7
|
import { createTransport, getBundlerClient, } from '../accounts/utils.js';
|
|
8
8
|
import { createAuthProvider } from '../auth/provider.js';
|
|
9
9
|
import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getOwnerValidator, getPermissionId, getSmartSessionValidator, isSessionEnabled, } from '../modules/validators/index.js';
|
|
10
|
-
import { getMultiFactorValidator, getWebAuthnValidator, supportsEip712, } from '../modules/validators/core.js';
|
|
10
|
+
import { getMultiFactorValidator, getValidator as getValidatorModule, getWebAuthnValidator, supportsEip712, } from '../modules/validators/core.js';
|
|
11
11
|
import { buildPermit2ClaimPolicyCalldata, } from '../modules/validators/policies/claim/permit2.js';
|
|
12
12
|
import { resolvePermit2ClaimPolicy, selectPermit2ClaimPolicyForMessage, } from '../modules/validators/smart-sessions.js';
|
|
13
13
|
import { getOrchestrator, } from '../orchestrator/index.js';
|
|
@@ -16,7 +16,7 @@ import { getChainId, isNonEvmChain, } from '../orchestrator/destinations.js';
|
|
|
16
16
|
import { getChainById, getTokenAddress, resolveTokenAddress, } from '../orchestrator/registry.js';
|
|
17
17
|
import { SIG_MODE_EMISSARY_EXECUTION_ERC1271, SIG_MODE_ERC1271, } from '../orchestrator/types.js';
|
|
18
18
|
import { convertBigIntFields } from '../orchestrator/utils.js';
|
|
19
|
-
import { Eip7702InitSignatureRequiredError, InvalidSourceCallsError, QuoteNotInPreparedTransactionError, } from './error.js';
|
|
19
|
+
import { Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, QuoteNotInPreparedTransactionError, UnknownOwnerError, } from './error.js';
|
|
20
20
|
function isResolvedSessionSignerSet(signers) {
|
|
21
21
|
return (signers?.type === 'experimental_session' && 'verifyExecutions' in signers);
|
|
22
22
|
}
|
|
@@ -93,7 +93,7 @@ function resolveSessionForChain(signers, chainId) {
|
|
|
93
93
|
return { session: signers.session, enableData: signers.enableData };
|
|
94
94
|
}
|
|
95
95
|
async function prepareTransaction(config, transaction) {
|
|
96
|
-
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, appFees, account, recipient, sourceCalls, } = getTransactionParams(transaction);
|
|
96
|
+
const { sourceChains, targetChain, tokenRequests, signers, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, appFees, customDeadline, account, recipient, sourceCalls, } = getTransactionParams(transaction);
|
|
97
97
|
const accountAddress = getAddress(config);
|
|
98
98
|
// Destination calls (transaction.calls on a cross-chain transaction) are
|
|
99
99
|
// executed on the destination chain by the solver/account. For non-EVM
|
|
@@ -109,7 +109,7 @@ async function prepareTransaction(config, transaction) {
|
|
|
109
109
|
else {
|
|
110
110
|
resolvedCalls = await resolveCallInputs(transaction.calls, config, targetChain, accountAddress);
|
|
111
111
|
}
|
|
112
|
-
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees);
|
|
112
|
+
const prepared = await prepareTransactionAsIntent(config, sourceChains, targetChain, resolvedCalls, transaction.gasLimit, tokenRequests, recipient, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees, customDeadline);
|
|
113
113
|
return {
|
|
114
114
|
quotes: prepared.quotes,
|
|
115
115
|
intentInput: prepared.intentInput,
|
|
@@ -153,6 +153,9 @@ function getTransactionMessages(_config, preparedTransaction, options) {
|
|
|
153
153
|
return getIntentMessages(quote.signData);
|
|
154
154
|
}
|
|
155
155
|
async function signTransaction(config, preparedTransaction, options) {
|
|
156
|
+
if (options && 'owner' in options) {
|
|
157
|
+
return signTransactionAsOwner(config, preparedTransaction, options);
|
|
158
|
+
}
|
|
156
159
|
const { signers } = getTransactionParams(preparedTransaction.transaction);
|
|
157
160
|
const quote = resolveQuote(preparedTransaction.quotes, options);
|
|
158
161
|
const targetChain = 'targetChain' in preparedTransaction.transaction
|
|
@@ -170,6 +173,349 @@ async function signTransaction(config, preparedTransaction, options) {
|
|
|
170
173
|
targetExecutionSignature,
|
|
171
174
|
};
|
|
172
175
|
}
|
|
176
|
+
function assertIndependentSigningSupported(config, preparedTransaction) {
|
|
177
|
+
if (config.account?.type === 'eoa') {
|
|
178
|
+
throw new IndependentSigningNotSupportedError({
|
|
179
|
+
context: { reason: 'eoa-account' },
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
const { signers } = getTransactionParams(preparedTransaction.transaction);
|
|
183
|
+
if (signers?.type === 'experimental_session') {
|
|
184
|
+
throw new IndependentSigningNotSupportedError({
|
|
185
|
+
context: { reason: 'smart-session' },
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
const validator = getOwnerValidator(config);
|
|
189
|
+
const selectedValidator = getValidator(config, signers);
|
|
190
|
+
if (!selectedValidator ||
|
|
191
|
+
selectedValidator.address.toLowerCase() !== validator.address.toLowerCase()) {
|
|
192
|
+
throw new IndependentSigningNotSupportedError({
|
|
193
|
+
context: { reason: 'non-owner-validator' },
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
if (validator.address.toLowerCase() ===
|
|
197
|
+
K1_DEFAULT_VALIDATOR_ADDRESS.toLowerCase()) {
|
|
198
|
+
throw new IndependentSigningNotSupportedError({
|
|
199
|
+
context: { reason: 'erc7739-validator' },
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (!config.owners) {
|
|
203
|
+
throw new IndependentSigningNotSupportedError({
|
|
204
|
+
context: { reason: 'missing-owner-set' },
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return { owners: config.owners, signers, validator };
|
|
208
|
+
}
|
|
209
|
+
function getValidatorIdKey(id) {
|
|
210
|
+
if (typeof id === 'number' && (!Number.isSafeInteger(id) || id < 0)) {
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
try {
|
|
214
|
+
return pad(toHex(id), { size: 12 }).toLowerCase();
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function getMultiFactorOwnerFactors(owners, signers) {
|
|
221
|
+
if (signers?.type === 'owner' && signers.kind === 'multi-factor') {
|
|
222
|
+
return signers.validators.map((factor) => {
|
|
223
|
+
switch (factor.type) {
|
|
224
|
+
case 'ecdsa':
|
|
225
|
+
return {
|
|
226
|
+
id: factor.id,
|
|
227
|
+
owners: {
|
|
228
|
+
type: 'ecdsa',
|
|
229
|
+
accounts: factor.accounts,
|
|
230
|
+
threshold: factor.accounts.length,
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
case 'passkey':
|
|
234
|
+
return {
|
|
235
|
+
id: factor.id,
|
|
236
|
+
owners: {
|
|
237
|
+
type: 'passkey',
|
|
238
|
+
accounts: factor.accounts,
|
|
239
|
+
threshold: factor.accounts.length,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
return owners.validators.map((factor, id) => ({ id, owners: factor }));
|
|
246
|
+
}
|
|
247
|
+
function resolveAtomicOwnerSet(owners, validatorId, signers) {
|
|
248
|
+
if (owners.type !== 'multi-factor') {
|
|
249
|
+
return validatorId === undefined ? { id: 0, owners } : undefined;
|
|
250
|
+
}
|
|
251
|
+
if (validatorId === undefined)
|
|
252
|
+
return undefined;
|
|
253
|
+
const key = getValidatorIdKey(validatorId);
|
|
254
|
+
if (!key)
|
|
255
|
+
return undefined;
|
|
256
|
+
return getMultiFactorOwnerFactors(owners, signers).find((factor) => getValidatorIdKey(factor.id) === key);
|
|
257
|
+
}
|
|
258
|
+
function getAtomicOwnerAccounts(owners) {
|
|
259
|
+
switch (owners.type) {
|
|
260
|
+
case 'ecdsa':
|
|
261
|
+
case 'passkey':
|
|
262
|
+
return owners.accounts;
|
|
263
|
+
case 'ens':
|
|
264
|
+
return owners.owners.map(({ account }) => account);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function getAtomicOwnerThreshold(owners) {
|
|
268
|
+
return owners.threshold ?? 1;
|
|
269
|
+
}
|
|
270
|
+
function isWebAuthnAccount(account) {
|
|
271
|
+
return account.type === 'webAuthn';
|
|
272
|
+
}
|
|
273
|
+
function getAccountIdentity(account) {
|
|
274
|
+
return isWebAuthnAccount(account)
|
|
275
|
+
? account.publicKey.toLowerCase()
|
|
276
|
+
: account.address.toLowerCase();
|
|
277
|
+
}
|
|
278
|
+
function getAtomicSignatureIdentity(signature) {
|
|
279
|
+
return signature.kind === 'passkey'
|
|
280
|
+
? signature.publicKey.toLowerCase()
|
|
281
|
+
: signature.signer.toLowerCase();
|
|
282
|
+
}
|
|
283
|
+
function isOwnerMember(owners, account) {
|
|
284
|
+
if ((owners.type === 'passkey') !== isWebAuthnAccount(account))
|
|
285
|
+
return false;
|
|
286
|
+
const identity = getAccountIdentity(account);
|
|
287
|
+
return getAtomicOwnerAccounts(owners).some((configured) => getAccountIdentity(configured) === identity);
|
|
288
|
+
}
|
|
289
|
+
async function signTransactionAsOwner(config, preparedTransaction, options) {
|
|
290
|
+
const { owners, signers } = assertIndependentSigningSupported(config, preparedTransaction);
|
|
291
|
+
const factor = resolveAtomicOwnerSet(owners, options.validatorId, signers);
|
|
292
|
+
if (!factor) {
|
|
293
|
+
throw new InvalidOwnerSigningOptionsError({
|
|
294
|
+
context: { validatorId: options.validatorId },
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
const atomicOwners = factor.owners;
|
|
298
|
+
if (!isOwnerMember(atomicOwners, options.owner)) {
|
|
299
|
+
throw new UnknownOwnerError({
|
|
300
|
+
context: {
|
|
301
|
+
...(isWebAuthnAccount(options.owner)
|
|
302
|
+
? { publicKey: options.owner.publicKey }
|
|
303
|
+
: { signer: options.owner.address }),
|
|
304
|
+
validatorId: options.validatorId,
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
const quote = resolveQuote(preparedTransaction.quotes, options.intentId === undefined ? undefined : { intentId: options.intentId });
|
|
309
|
+
const { origin } = getIntentMessages(quote.signData);
|
|
310
|
+
const atomicSigners = convertOwnerSetToSignerSet(atomicOwners);
|
|
311
|
+
if (atomicSigners.type !== 'owner' || atomicSigners.kind === 'multi-factor') {
|
|
312
|
+
throw new IndependentSigningNotSupportedError();
|
|
313
|
+
}
|
|
314
|
+
const validatorSupportsEip712 = supportsEip712(getValidatorModule(atomicOwners));
|
|
315
|
+
let signature;
|
|
316
|
+
if (atomicSigners.kind === 'ecdsa' && !isWebAuthnAccount(options.owner)) {
|
|
317
|
+
const signatures = [];
|
|
318
|
+
for (const typedData of origin) {
|
|
319
|
+
signatures.push(await getOwnerEcdsaSignature(config, getChainById(typedData.domain?.chainId), typedData, options.owner, atomicSigners.module, validatorSupportsEip712));
|
|
320
|
+
}
|
|
321
|
+
signature = {
|
|
322
|
+
kind: 'ecdsa',
|
|
323
|
+
signer: options.owner.address,
|
|
324
|
+
origin: signatures,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
else if (atomicSigners.kind === 'passkey' &&
|
|
328
|
+
isWebAuthnAccount(options.owner)) {
|
|
329
|
+
const signatures = [];
|
|
330
|
+
for (const typedData of origin) {
|
|
331
|
+
signatures.push(await getOwnerPasskeySignature(config, typedData, options.owner, validatorSupportsEip712));
|
|
332
|
+
}
|
|
333
|
+
signature = {
|
|
334
|
+
kind: 'passkey',
|
|
335
|
+
publicKey: options.owner.publicKey,
|
|
336
|
+
origin: signatures,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
throw new UnknownOwnerError({
|
|
341
|
+
context: { validatorId: options.validatorId },
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
return owners.type === 'multi-factor'
|
|
345
|
+
? {
|
|
346
|
+
intentId: quote.intentId,
|
|
347
|
+
kind: 'multi-factor',
|
|
348
|
+
validatorId: factor.id,
|
|
349
|
+
signature,
|
|
350
|
+
}
|
|
351
|
+
: { intentId: quote.intentId, ...signature };
|
|
352
|
+
}
|
|
353
|
+
function orderAtomicOwnerSignatures(owners, signatures, originCount, validatorId) {
|
|
354
|
+
const expectedKind = owners.type === 'passkey' ? 'passkey' : 'ecdsa';
|
|
355
|
+
const byIdentity = new Map();
|
|
356
|
+
const configuredIdentities = new Set(getAtomicOwnerAccounts(owners).map(getAccountIdentity));
|
|
357
|
+
for (const signature of signatures) {
|
|
358
|
+
if (signature.kind !== expectedKind ||
|
|
359
|
+
signature.origin.length !== originCount) {
|
|
360
|
+
throw new MismatchedOwnerSignaturesError({
|
|
361
|
+
context: {
|
|
362
|
+
expectedKind,
|
|
363
|
+
expectedOriginCount: originCount,
|
|
364
|
+
validatorId,
|
|
365
|
+
},
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
const identity = getAtomicSignatureIdentity(signature);
|
|
369
|
+
if (!configuredIdentities.has(identity)) {
|
|
370
|
+
throw new UnknownOwnerError({
|
|
371
|
+
context: {
|
|
372
|
+
...(signature.kind === 'passkey'
|
|
373
|
+
? { publicKey: signature.publicKey }
|
|
374
|
+
: { signer: signature.signer }),
|
|
375
|
+
validatorId,
|
|
376
|
+
},
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
if (!byIdentity.has(identity))
|
|
380
|
+
byIdentity.set(identity, signature);
|
|
381
|
+
}
|
|
382
|
+
const ordered = [...configuredIdentities].flatMap((identity) => {
|
|
383
|
+
const signature = byIdentity.get(identity);
|
|
384
|
+
return signature ? [signature] : [];
|
|
385
|
+
});
|
|
386
|
+
const required = getAtomicOwnerThreshold(owners);
|
|
387
|
+
if (ordered.length < required) {
|
|
388
|
+
throw new InsufficientOwnerSignaturesError({
|
|
389
|
+
required,
|
|
390
|
+
provided: ordered.length,
|
|
391
|
+
validatorId,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return ordered;
|
|
395
|
+
}
|
|
396
|
+
function packAtomicOwnerSignatures(owners, signatures, originIndex, chain, accountAddress) {
|
|
397
|
+
const signers = convertOwnerSetToSignerSet(owners);
|
|
398
|
+
if (owners.type === 'passkey' &&
|
|
399
|
+
signers.type === 'owner' &&
|
|
400
|
+
signers.kind === 'passkey') {
|
|
401
|
+
const passkeySignatures = signatures.map((signature) => {
|
|
402
|
+
if (signature.kind !== 'passkey') {
|
|
403
|
+
throw new MismatchedOwnerSignaturesError();
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
publicKey: signature.publicKey,
|
|
407
|
+
signature: signature.origin[originIndex],
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
return packPasskeyOwnerSignatures(chain, accountAddress, passkeySignatures.map(({ publicKey }) => publicKey), passkeySignatures.map(({ signature }) => signature), signers.module);
|
|
411
|
+
}
|
|
412
|
+
return concat(signatures.map((signature) => {
|
|
413
|
+
if (signature.kind !== 'ecdsa') {
|
|
414
|
+
throw new MismatchedOwnerSignaturesError();
|
|
415
|
+
}
|
|
416
|
+
return signature.origin[originIndex];
|
|
417
|
+
}));
|
|
418
|
+
}
|
|
419
|
+
async function assembleTransaction(config, preparedTransaction, signatures) {
|
|
420
|
+
const { owners, signers, validator } = assertIndependentSigningSupported(config, preparedTransaction);
|
|
421
|
+
if (signatures.length === 0) {
|
|
422
|
+
throw new InsufficientOwnerSignaturesError({
|
|
423
|
+
required: owners.threshold ?? 1,
|
|
424
|
+
provided: 0,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
const intentIds = [...new Set(signatures.map(({ intentId }) => intentId))];
|
|
428
|
+
if (intentIds.length !== 1) {
|
|
429
|
+
throw new MismatchedOwnerSignaturesError({ context: { intentIds } });
|
|
430
|
+
}
|
|
431
|
+
const quote = resolveQuote(preparedTransaction.quotes, {
|
|
432
|
+
intentId: intentIds[0],
|
|
433
|
+
});
|
|
434
|
+
const { origin } = getIntentMessages(quote.signData);
|
|
435
|
+
const accountAddress = getAddress(config);
|
|
436
|
+
const validatorConfig = {
|
|
437
|
+
address: validator.address,
|
|
438
|
+
isRoot: true,
|
|
439
|
+
};
|
|
440
|
+
let directSignatures;
|
|
441
|
+
let factorSignatures;
|
|
442
|
+
if (owners.type === 'multi-factor') {
|
|
443
|
+
const factors = getMultiFactorOwnerFactors(owners, signers);
|
|
444
|
+
const factorsById = new Map(factors.flatMap((factor) => {
|
|
445
|
+
const key = getValidatorIdKey(factor.id);
|
|
446
|
+
return key ? [[key, factor]] : [];
|
|
447
|
+
}));
|
|
448
|
+
const grouped = new Map();
|
|
449
|
+
for (const signature of signatures) {
|
|
450
|
+
if (signature.kind !== 'multi-factor') {
|
|
451
|
+
throw new MismatchedOwnerSignaturesError({
|
|
452
|
+
context: { expectedKind: 'multi-factor' },
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
const key = getValidatorIdKey(signature.validatorId);
|
|
456
|
+
if (!key || !factorsById.has(key)) {
|
|
457
|
+
throw new MismatchedOwnerSignaturesError({
|
|
458
|
+
context: { validatorId: signature.validatorId },
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
const current = grouped.get(key) ?? [];
|
|
462
|
+
current.push(signature.signature);
|
|
463
|
+
grouped.set(key, current);
|
|
464
|
+
}
|
|
465
|
+
factorSignatures = factors.flatMap((factor) => {
|
|
466
|
+
const key = getValidatorIdKey(factor.id);
|
|
467
|
+
const groupedSignatures = key ? grouped.get(key) : undefined;
|
|
468
|
+
if (!groupedSignatures)
|
|
469
|
+
return [];
|
|
470
|
+
return [
|
|
471
|
+
{
|
|
472
|
+
id: factor.id,
|
|
473
|
+
owners: factor.owners,
|
|
474
|
+
signatures: orderAtomicOwnerSignatures(factor.owners, groupedSignatures, origin.length, factor.id),
|
|
475
|
+
},
|
|
476
|
+
];
|
|
477
|
+
});
|
|
478
|
+
const required = owners.threshold ?? 1;
|
|
479
|
+
if (factorSignatures.length < required) {
|
|
480
|
+
throw new InsufficientOwnerSignaturesError({
|
|
481
|
+
required,
|
|
482
|
+
provided: factorSignatures.length,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
directSignatures = orderAtomicOwnerSignatures(owners, signatures.map((signature) => {
|
|
488
|
+
if (signature.kind === 'multi-factor') {
|
|
489
|
+
throw new MismatchedOwnerSignaturesError({
|
|
490
|
+
context: { expectedKind: owners.type },
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
const { intentId: _, ...atomicSignature } = signature;
|
|
494
|
+
return atomicSignature;
|
|
495
|
+
}), origin.length);
|
|
496
|
+
}
|
|
497
|
+
const originSignatures = [];
|
|
498
|
+
for (const [originIndex, typedData] of origin.entries()) {
|
|
499
|
+
const chain = getChainById(typedData.domain?.chainId);
|
|
500
|
+
const validatorSignature = factorSignatures
|
|
501
|
+
? packMultiFactorOwnerSignatures(factorSignatures.map((factor) => ({
|
|
502
|
+
id: factor.id,
|
|
503
|
+
validatorAddress: getValidatorModule(factor.owners).address,
|
|
504
|
+
signature: packAtomicOwnerSignatures(factor.owners, factor.signatures, originIndex, chain, accountAddress),
|
|
505
|
+
})))
|
|
506
|
+
: packAtomicOwnerSignatures(owners, directSignatures, originIndex, chain, accountAddress);
|
|
507
|
+
originSignatures.push(await packAccountSignature(config, validatorSignature, validatorConfig));
|
|
508
|
+
}
|
|
509
|
+
return {
|
|
510
|
+
quote,
|
|
511
|
+
quotes: preparedTransaction.quotes,
|
|
512
|
+
intentInput: preparedTransaction.intentInput,
|
|
513
|
+
transaction: preparedTransaction.transaction,
|
|
514
|
+
originSignatures,
|
|
515
|
+
destinationSignature: originSignatures.at(-1) ?? '0x',
|
|
516
|
+
targetExecutionSignature: undefined,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
173
519
|
function resolveQuote(quotes, options) {
|
|
174
520
|
if (!options)
|
|
175
521
|
return quotes.best;
|
|
@@ -384,6 +730,9 @@ function getTransactionParams(transaction) {
|
|
|
384
730
|
const sourceAssets = transaction.sourceAssets;
|
|
385
731
|
const auxiliaryFunds = transaction.auxiliaryFunds;
|
|
386
732
|
const appFees = transaction.appFees;
|
|
733
|
+
// customDeadline lives only on same-chain transactions (see types.ts) — it's
|
|
734
|
+
// meaningless cross-chain, so narrow before reading it.
|
|
735
|
+
const customDeadline = 'chain' in transaction ? transaction.customDeadline : undefined;
|
|
387
736
|
const account = transaction.experimental_accountOverride;
|
|
388
737
|
const recipient = transaction.recipient;
|
|
389
738
|
const sourceCalls = transaction.sourceCalls;
|
|
@@ -400,6 +749,7 @@ function getTransactionParams(transaction) {
|
|
|
400
749
|
sourceAssets,
|
|
401
750
|
auxiliaryFunds,
|
|
402
751
|
appFees,
|
|
752
|
+
customDeadline,
|
|
403
753
|
account,
|
|
404
754
|
recipient,
|
|
405
755
|
sourceCalls,
|
|
@@ -487,7 +837,7 @@ function addProvidedFunds(auxiliaryFunds, chainId, calls) {
|
|
|
487
837
|
}
|
|
488
838
|
return next;
|
|
489
839
|
}
|
|
490
|
-
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees) {
|
|
840
|
+
async function prepareTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, recipientInput, sponsored, eip7702InitSignature, settlementLayers, sourceAssets, auxiliaryFunds, account, signers, sourceCalls, appFees, customDeadline) {
|
|
491
841
|
const targetChainId = getChainId(targetChain);
|
|
492
842
|
const calls = parseCalls(callInputs, targetChainId);
|
|
493
843
|
const accountAccessList = createAccountAccessList(sourceChains, sourceAssets);
|
|
@@ -659,6 +1009,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
659
1009
|
signatureMode,
|
|
660
1010
|
auxiliaryFunds: combinedAuxiliaryFunds,
|
|
661
1011
|
appFees,
|
|
1012
|
+
customDeadline,
|
|
662
1013
|
},
|
|
663
1014
|
...(Object.keys(preClaimExecutions).length > 0 && { preClaimExecutions }),
|
|
664
1015
|
};
|
|
@@ -1252,4 +1603,4 @@ function hashErc7739TypedDataForSolady({ domain, types, primaryType, message, ve
|
|
|
1252
1603
|
// Final hash: keccak256("\x19\x01" || appDomainSep || structHash)
|
|
1253
1604
|
return keccak256(concat(['0x1901', appDomainSeparator, structHash]));
|
|
1254
1605
|
}
|
|
1255
|
-
export { prepareTransaction, getTransactionMessages, signTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, prepareUserOperation, signUserOperation, submitUserOperation, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, getTokenRequests, resolveCallInputs, getIntentAccount, getTargetExecutionSignature, hashErc7739TypedDataForSolady, resolveSessionForChain, resolveSignatureMode, };
|
|
1606
|
+
export { prepareTransaction, getTransactionMessages, signTransaction, assembleTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, prepareUserOperation, signUserOperation, submitUserOperation, signIntent, prepareTransactionAsIntent, submitIntentInternal, getValidatorAccount, parseCalls, getTokenRequests, resolveCallInputs, getIntentAccount, getTargetExecutionSignature, hashErc7739TypedDataForSolady, resolveSessionForChain, resolveSignatureMode, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData, TypedDataDefinition } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
3
|
import { type TransactionResult, type TransactionStatus, type UserOperationResult } from './execution/index.js';
|
|
4
|
-
import { type PreparedQuotes, type PreparedTransactionData, type PreparedUserOperationData, type QuoteSelection, type SignedTransactionData, type SignedUserOperationData } from './execution/utils.js';
|
|
4
|
+
import { type OwnerPasskeySignature, type OwnerSignature, type OwnerSignatureData, type PreparedQuotes, type PreparedTransactionData, type PreparedUserOperationData, type QuoteSelection, type SignAsOwnerOptions, type SignedTransactionData, type SignedUserOperationData } from './execution/utils.js';
|
|
5
5
|
import { MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './modules/index.js';
|
|
6
6
|
import { type SessionDetails } from './modules/validators/smart-sessions.js';
|
|
7
7
|
import type { AppFeeBalances, ApprovalRequired, AuxiliaryFunds, BridgeFill, ChainOperation, DestinationChain, FailureReason, IntentInput, IntentOpStatus, NonEvmAddress, NonEvmChain, OperationStatus, OriginSignature, Portfolio, Quote, SettlementLayer, SettlementLayerFilter, SignData, SplitIntentsInput, SplitIntentsResult, TokenRequirements, WrapRequired } from './orchestrator/index.js';
|
|
@@ -75,7 +75,17 @@ interface RhinestoneAccount {
|
|
|
75
75
|
targetExecution?: TypedDataDefinition;
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
|
-
* Sign a prepared transaction.
|
|
78
|
+
* Sign a prepared transaction as one configured owner. The returned signature
|
|
79
|
+
* can be serialized and shared with the party coordinating submission.
|
|
80
|
+
* @param preparedTransaction Prepared transaction data
|
|
81
|
+
* @param options Owner account, optional quote, and multi-factor validator ID
|
|
82
|
+
* @returns This owner's signature contribution
|
|
83
|
+
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
84
|
+
* @see {@link assembleTransaction} to combine independent owner signatures
|
|
85
|
+
*/
|
|
86
|
+
signTransaction(preparedTransaction: PreparedTransactionData, options: SignAsOwnerOptions): Promise<OwnerSignature>;
|
|
87
|
+
/**
|
|
88
|
+
* Sign a prepared transaction with the transaction's configured signers.
|
|
79
89
|
* @param preparedTransaction Prepared transaction data
|
|
80
90
|
* @param options Optional override; pass `{ intentId }` to sign a specific quote from `preparedTransaction.quotes.all`
|
|
81
91
|
* @returns The signed transaction data
|
|
@@ -83,6 +93,19 @@ interface RhinestoneAccount {
|
|
|
83
93
|
* @see {@link submitTransaction} to submit the signed transaction
|
|
84
94
|
*/
|
|
85
95
|
signTransaction(preparedTransaction: PreparedTransactionData, options?: QuoteSelection): Promise<SignedTransactionData>;
|
|
96
|
+
/**
|
|
97
|
+
* Assemble independently collected owner signatures into a signed transaction.
|
|
98
|
+
* Signatures are deduplicated and ordered according to the configured owner set.
|
|
99
|
+
* Account thresholds are read from the local configuration; an explicit
|
|
100
|
+
* transaction signer set determines active MFA IDs and contributing owners.
|
|
101
|
+
* Callers must keep these synchronized with onchain owner and threshold changes.
|
|
102
|
+
* @param preparedTransaction The prepared transaction every owner signed
|
|
103
|
+
* @param signatures Owner signatures returned by `signTransaction` with an `owner` option
|
|
104
|
+
* @returns Signed transaction data ready for submission
|
|
105
|
+
* @see {@link signTransaction} to create each owner signature
|
|
106
|
+
* @see {@link submitTransaction} to submit the result
|
|
107
|
+
*/
|
|
108
|
+
assembleTransaction(preparedTransaction: PreparedTransactionData, signatures: OwnerSignature[]): Promise<SignedTransactionData>;
|
|
86
109
|
/**
|
|
87
110
|
* Sign the EIP-7702 authorizations required for a transaction.
|
|
88
111
|
* @param preparedTransaction Prepared transaction data
|
|
@@ -289,5 +312,5 @@ declare class RhinestoneSDK {
|
|
|
289
312
|
getAppFeeBalances(): Promise<AppFeeBalances>;
|
|
290
313
|
}
|
|
291
314
|
export { RhinestoneSDK, hyperCoreMainnet, solanaMainnet, tronMainnet, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
|
|
292
|
-
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, NonEvmTokenRequest, NonEvmTokenRequests, NonEvmAddress, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, SourceCallInput, SourceCallProvidedFunds, ChainSessionConfig, Session, SessionDefinition, Permission, PermissionFunctionConfig, ParamConstraint, Policy, Permit2ClaimPolicy, CrossChainPermissionInput, CrossChainPermit, FromLeg, ToLeg, CrossChainSettlementLayer, UniversalActionPolicyParamCondition, PreparedQuotes, PreparedTransactionData, Quote, QuoteSelection, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, BridgeFill, DestinationChain, NonEvmChain, IntentInput, IntentOpStatus, SettlementLayer, SettlementLayerFilter, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, OriginSignature, SignData, SignedIntentData, OperationStatus, FailureReason, ChainOperation, };
|
|
315
|
+
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, NonEvmTokenRequest, NonEvmTokenRequests, NonEvmAddress, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, SourceCallInput, SourceCallProvidedFunds, ChainSessionConfig, Session, SessionDefinition, Permission, PermissionFunctionConfig, ParamConstraint, Policy, Permit2ClaimPolicy, CrossChainPermissionInput, CrossChainPermit, FromLeg, ToLeg, CrossChainSettlementLayer, UniversalActionPolicyParamCondition, PreparedQuotes, PreparedTransactionData, Quote, QuoteSelection, SignAsOwnerOptions, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, BridgeFill, DestinationChain, NonEvmChain, IntentInput, IntentOpStatus, SettlementLayer, SettlementLayerFilter, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, OriginSignature, SignData, SignedIntentData, OperationStatus, FailureReason, ChainOperation, OwnerPasskeySignature, OwnerSignature, OwnerSignatureData, };
|
|
293
316
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAcpE,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAA;AACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAcpE,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAA;AACpB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAG9B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAS7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAKL,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAE9B,0BAA0B,EAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACV,cAAc,EACd,gBAAg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