@dynamic-labs-wallet/browser-wallet-client 1.1.77 → 1.1.78
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/index.cjs +132 -118
- package/index.esm.js +133 -119
- package/package.json +2 -2
- package/src/assertPreparedSigningIntentMatchesRequest.d.ts.map +1 -1
- package/src/client/client.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -15,6 +15,122 @@ function _extends() {
|
|
|
15
15
|
return _extends.apply(this, arguments);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
const limitKeys = [
|
|
19
|
+
'maxGas',
|
|
20
|
+
'maxFeePerGas',
|
|
21
|
+
'maxPriorityFeePerGas',
|
|
22
|
+
'maxTotalFee'
|
|
23
|
+
];
|
|
24
|
+
const isHex = (value)=>typeof value === 'string' && /^0x(?:[0-9a-f]{2})*$/.test(value);
|
|
25
|
+
const isTransactionIntent = (intent)=>intent.operation.kind === 'transaction';
|
|
26
|
+
const isSvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'SVM';
|
|
27
|
+
const isEvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'EVM';
|
|
28
|
+
const isTronTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'TRON';
|
|
29
|
+
const isBtcTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'BTC';
|
|
30
|
+
const assertMatches = (matches, message)=>{
|
|
31
|
+
if (!matches) throw new Error(message);
|
|
32
|
+
};
|
|
33
|
+
const hasLifetime = (lifetime, refreshable)=>{
|
|
34
|
+
if (refreshable === undefined) return lifetime === undefined;
|
|
35
|
+
const keys = lifetime && typeof lifetime === 'object' ? Object.keys(lifetime) : [];
|
|
36
|
+
return keys.length === 1 && lifetime.refreshable === refreshable;
|
|
37
|
+
};
|
|
38
|
+
const hasMatchingMetadata = (intent, request)=>{
|
|
39
|
+
const sameAddress = request.chainName === 'EVM' ? intent.accountAddress.toLowerCase() === request.accountAddress.toLowerCase() : intent.accountAddress === request.accountAddress;
|
|
40
|
+
return Object.values(core.WaasChainEnum).includes(request.chainName) && intent.actionType === 'waasSigningQuorumApprove' && Boolean(intent.intentId) && Number.isFinite(Date.parse(intent.createdAt)) && sameAddress && intent.businessAccountId === request.businessAccountId && intent.initiatorUserId === request.initiatorUserId && Boolean(intent.walletId) && (!request.walletId || intent.walletId === request.walletId) && intent.completeBy === request.completeBy && intent.operation.chainName === request.chainName && intent.operation.kind === request.kind;
|
|
41
|
+
};
|
|
42
|
+
const hasValidSvmHeader = (intent)=>{
|
|
43
|
+
const { header, staticAccountKeys } = intent.operation;
|
|
44
|
+
return Number.isInteger(header.numRequiredSignatures) && header.numRequiredSignatures >= 1 && header.numRequiredSignatures <= staticAccountKeys.length && Number.isInteger(header.numReadonlySignedAccounts) && header.numReadonlySignedAccounts >= 0 && header.numReadonlySignedAccounts < header.numRequiredSignatures && Number.isInteger(header.numReadonlyUnsignedAccounts) && header.numReadonlyUnsignedAccounts >= 0 && header.numReadonlyUnsignedAccounts <= staticAccountKeys.length - header.numRequiredSignatures;
|
|
45
|
+
};
|
|
46
|
+
const hasValidSvmInstructions = (intent)=>{
|
|
47
|
+
const { instructions, staticAccountKeys } = intent.operation;
|
|
48
|
+
const isIndex = (value)=>Number.isInteger(value) && value >= 0 && value < staticAccountKeys.length;
|
|
49
|
+
return instructions.every((instruction)=>isIndex(instruction.programIdIndex) && instruction.accountKeyIndexes.every(isIndex) && isHex(instruction.data));
|
|
50
|
+
};
|
|
51
|
+
const assertSvmTransactionMatchesRequest = (intent, request)=>{
|
|
52
|
+
var _request_chainId;
|
|
53
|
+
const { operation } = intent;
|
|
54
|
+
const isBase58 = (value)=>/^[1-9A-HJ-NP-Za-km-z]+$/.test(value);
|
|
55
|
+
assertMatches(request.chainName === 'SVM' && Boolean(request.chainId) && ((_request_chainId = request.chainId) == null ? void 0 : _request_chainId.trim()) === request.chainId && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'blockhash') && (operation.messageVersion === 'legacy' || operation.messageVersion === 'v0') && operation.staticAccountKeys.length > 0 && operation.staticAccountKeys.every(isBase58) && operation.feePayer === request.accountAddress && operation.feePayer === operation.staticAccountKeys[0] && hasValidSvmHeader(intent) && hasValidSvmInstructions(intent), 'Prepared SVM transaction signing intent is malformed');
|
|
56
|
+
};
|
|
57
|
+
// The intent describes the network in decimal; a request may name it in hexadecimal.
|
|
58
|
+
const toDecimalChainId = (chainId)=>chainId && /^0x[\da-f]+$/i.test(chainId) ? BigInt(chainId).toString() : chainId;
|
|
59
|
+
const assertTronTransactionMatchesRequest = (intent, request)=>{
|
|
60
|
+
const { operation } = intent;
|
|
61
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
62
|
+
// the approved operation, so the contract fields are not re-derived here.
|
|
63
|
+
assertMatches(request.chainName === 'TRON' && Boolean(request.chainId) && operation.chainId === toDecimalChainId(request.chainId) && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.from === request.accountAddress, 'Prepared TRON transaction signing intent is malformed');
|
|
64
|
+
};
|
|
65
|
+
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
66
|
+
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
67
|
+
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
68
|
+
const hasValidBtcOperationFields = ({ operation })=>BTC_HASH.test(operation.txid) && DECIMAL.test(operation.feeSats) && Array.isArray(operation.outputs) && operation.outputs.length > 0 && operation.outputs.every(({ script, valueSats })=>HEX_BYTES.test(script) && DECIMAL.test(valueSats)) && Array.isArray(operation.sighashes) && operation.sighashes.length > 0 && operation.sighashes.every((sighash)=>BTC_HASH.test(sighash));
|
|
69
|
+
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
70
|
+
var _request_bitcoinConfig;
|
|
71
|
+
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
72
|
+
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
73
|
+
assertMatches(request.chainName === 'BTC' && intent.operation.chainId === (((_request_bitcoinConfig = request.bitcoinConfig) == null ? void 0 : _request_bitcoinConfig.network) === 'testnet' ? '2' : '1') && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, undefined) && hasValidBtcOperationFields(intent), 'Prepared BTC transaction signing intent is malformed');
|
|
74
|
+
};
|
|
75
|
+
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
76
|
+
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
77
|
+
const { operation, limits } = intent;
|
|
78
|
+
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
79
|
+
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
80
|
+
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
81
|
+
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
82
|
+
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
83
|
+
var _request_refreshLimits;
|
|
84
|
+
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
85
|
+
}), 'Transaction signing limits do not match request');
|
|
86
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
87
|
+
// the approved operation, so the transaction fields are not re-derived here.
|
|
88
|
+
};
|
|
89
|
+
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
90
|
+
if (request.kind !== 'transaction') {
|
|
91
|
+
throw new Error('Unsupported transaction signing intent');
|
|
92
|
+
}
|
|
93
|
+
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
94
|
+
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
95
|
+
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
96
|
+
if (!isEvmTransactionIntent(intent)) {
|
|
97
|
+
throw new Error('Unsupported transaction signing intent');
|
|
98
|
+
}
|
|
99
|
+
return assertEvmTransactionMatchesRequest(intent, request);
|
|
100
|
+
};
|
|
101
|
+
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
102
|
+
const { operation } = intent;
|
|
103
|
+
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
104
|
+
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
105
|
+
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
106
|
+
if (operation.kind === 'message') {
|
|
107
|
+
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (operation.kind === 'typedData') {
|
|
111
|
+
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (operation.kind === 'eip7702Auth') {
|
|
115
|
+
assertMatches(request.kind === 'eip7702Auth' && request.chainName === 'EVM' && operation.eip7702Auth.address === request.eip7702Auth.address && operation.eip7702Auth.chainId === request.eip7702Auth.chainId && operation.eip7702Auth.nonce === request.eip7702Auth.nonce, 'Prepared EIP-7702 authorization does not match request');
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const rawSign = operation.rawSign;
|
|
119
|
+
assertMatches(request.kind === 'raw' && (rawSign == null ? void 0 : rawSign.payload) === request.rawSign.payload && rawSign.hashFunction === request.rawSign.hashFunction && rawSign.prefix === request.rawSign.prefix, 'Prepared raw signing intent does not match request');
|
|
120
|
+
};
|
|
121
|
+
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
122
|
+
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
123
|
+
if (isTransactionIntent(intent)) {
|
|
124
|
+
assertTransactionIntentMatchesRequest(intent, request);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
assertExactOperationMatchesRequest({
|
|
128
|
+
intent,
|
|
129
|
+
request,
|
|
130
|
+
preparedPayload
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
|
|
18
134
|
function _object_without_properties_loose(source, excluded) {
|
|
19
135
|
if (source == null) return {};
|
|
20
136
|
var target = {};
|
|
@@ -1868,9 +1984,23 @@ class DynamicWalletClient extends IframeManager {
|
|
|
1868
1984
|
})));
|
|
1869
1985
|
}
|
|
1870
1986
|
async prepareSigningIntent(request) {
|
|
1871
|
-
return this.withHandler((handler)=>
|
|
1987
|
+
return this.withHandler(async (handler)=>{
|
|
1988
|
+
const requestWithChain = _extends({}, request, {
|
|
1872
1989
|
chainName: this.chainName
|
|
1873
|
-
})
|
|
1990
|
+
});
|
|
1991
|
+
const intent = await handler.prepareSigningIntent(requestWithChain);
|
|
1992
|
+
// Refuse intents that drop or change the wallet the request named.
|
|
1993
|
+
let preparedPayload;
|
|
1994
|
+
if (intent.operation.kind !== 'transaction') {
|
|
1995
|
+
preparedPayload = intent.operation.payload;
|
|
1996
|
+
}
|
|
1997
|
+
assertPreparedSigningIntentMatchesRequest({
|
|
1998
|
+
intent,
|
|
1999
|
+
preparedPayload,
|
|
2000
|
+
request: requestWithChain
|
|
2001
|
+
});
|
|
2002
|
+
return intent;
|
|
2003
|
+
});
|
|
1874
2004
|
}
|
|
1875
2005
|
async resumeSigningIntent(request) {
|
|
1876
2006
|
return this.withHandler((handler)=>handler.resumeSigningIntent(_extends({}, request, {
|
|
@@ -2394,122 +2524,6 @@ class DynamicWalletClient extends IframeManager {
|
|
|
2394
2524
|
}
|
|
2395
2525
|
}
|
|
2396
2526
|
|
|
2397
|
-
const limitKeys = [
|
|
2398
|
-
'maxGas',
|
|
2399
|
-
'maxFeePerGas',
|
|
2400
|
-
'maxPriorityFeePerGas',
|
|
2401
|
-
'maxTotalFee'
|
|
2402
|
-
];
|
|
2403
|
-
const isHex = (value)=>typeof value === 'string' && /^0x(?:[0-9a-f]{2})*$/.test(value);
|
|
2404
|
-
const isTransactionIntent = (intent)=>intent.operation.kind === 'transaction';
|
|
2405
|
-
const isSvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'SVM';
|
|
2406
|
-
const isEvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'EVM';
|
|
2407
|
-
const isTronTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'TRON';
|
|
2408
|
-
const isBtcTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'BTC';
|
|
2409
|
-
const assertMatches = (matches, message)=>{
|
|
2410
|
-
if (!matches) throw new Error(message);
|
|
2411
|
-
};
|
|
2412
|
-
const hasLifetime = (lifetime, refreshable)=>{
|
|
2413
|
-
if (refreshable === undefined) return lifetime === undefined;
|
|
2414
|
-
const keys = lifetime && typeof lifetime === 'object' ? Object.keys(lifetime) : [];
|
|
2415
|
-
return keys.length === 1 && lifetime.refreshable === refreshable;
|
|
2416
|
-
};
|
|
2417
|
-
const hasMatchingMetadata = (intent, request)=>{
|
|
2418
|
-
const sameAddress = request.chainName === 'EVM' ? intent.accountAddress.toLowerCase() === request.accountAddress.toLowerCase() : intent.accountAddress === request.accountAddress;
|
|
2419
|
-
return Object.values(core.WaasChainEnum).includes(request.chainName) && intent.actionType === 'waasSigningQuorumApprove' && Boolean(intent.intentId) && Number.isFinite(Date.parse(intent.createdAt)) && sameAddress && intent.businessAccountId === request.businessAccountId && intent.initiatorUserId === request.initiatorUserId && intent.completeBy === request.completeBy && intent.operation.chainName === request.chainName && intent.operation.kind === request.kind;
|
|
2420
|
-
};
|
|
2421
|
-
const hasValidSvmHeader = (intent)=>{
|
|
2422
|
-
const { header, staticAccountKeys } = intent.operation;
|
|
2423
|
-
return Number.isInteger(header.numRequiredSignatures) && header.numRequiredSignatures >= 1 && header.numRequiredSignatures <= staticAccountKeys.length && Number.isInteger(header.numReadonlySignedAccounts) && header.numReadonlySignedAccounts >= 0 && header.numReadonlySignedAccounts < header.numRequiredSignatures && Number.isInteger(header.numReadonlyUnsignedAccounts) && header.numReadonlyUnsignedAccounts >= 0 && header.numReadonlyUnsignedAccounts <= staticAccountKeys.length - header.numRequiredSignatures;
|
|
2424
|
-
};
|
|
2425
|
-
const hasValidSvmInstructions = (intent)=>{
|
|
2426
|
-
const { instructions, staticAccountKeys } = intent.operation;
|
|
2427
|
-
const isIndex = (value)=>Number.isInteger(value) && value >= 0 && value < staticAccountKeys.length;
|
|
2428
|
-
return instructions.every((instruction)=>isIndex(instruction.programIdIndex) && instruction.accountKeyIndexes.every(isIndex) && isHex(instruction.data));
|
|
2429
|
-
};
|
|
2430
|
-
const assertSvmTransactionMatchesRequest = (intent, request)=>{
|
|
2431
|
-
var _request_chainId;
|
|
2432
|
-
const { operation } = intent;
|
|
2433
|
-
const isBase58 = (value)=>/^[1-9A-HJ-NP-Za-km-z]+$/.test(value);
|
|
2434
|
-
assertMatches(request.chainName === 'SVM' && Boolean(request.chainId) && ((_request_chainId = request.chainId) == null ? void 0 : _request_chainId.trim()) === request.chainId && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'blockhash') && (operation.messageVersion === 'legacy' || operation.messageVersion === 'v0') && operation.staticAccountKeys.length > 0 && operation.staticAccountKeys.every(isBase58) && operation.feePayer === request.accountAddress && operation.feePayer === operation.staticAccountKeys[0] && hasValidSvmHeader(intent) && hasValidSvmInstructions(intent), 'Prepared SVM transaction signing intent is malformed');
|
|
2435
|
-
};
|
|
2436
|
-
// The intent describes the network in decimal; a request may name it in hexadecimal.
|
|
2437
|
-
const toDecimalChainId = (chainId)=>chainId && /^0x[\da-f]+$/i.test(chainId) ? BigInt(chainId).toString() : chainId;
|
|
2438
|
-
const assertTronTransactionMatchesRequest = (intent, request)=>{
|
|
2439
|
-
const { operation } = intent;
|
|
2440
|
-
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
2441
|
-
// the approved operation, so the contract fields are not re-derived here.
|
|
2442
|
-
assertMatches(request.chainName === 'TRON' && Boolean(request.chainId) && operation.chainId === toDecimalChainId(request.chainId) && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.from === request.accountAddress, 'Prepared TRON transaction signing intent is malformed');
|
|
2443
|
-
};
|
|
2444
|
-
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
2445
|
-
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
2446
|
-
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
2447
|
-
const hasValidBtcOperationFields = ({ operation })=>BTC_HASH.test(operation.txid) && DECIMAL.test(operation.feeSats) && Array.isArray(operation.outputs) && operation.outputs.length > 0 && operation.outputs.every(({ script, valueSats })=>HEX_BYTES.test(script) && DECIMAL.test(valueSats)) && Array.isArray(operation.sighashes) && operation.sighashes.length > 0 && operation.sighashes.every((sighash)=>BTC_HASH.test(sighash));
|
|
2448
|
-
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
2449
|
-
var _request_bitcoinConfig;
|
|
2450
|
-
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
2451
|
-
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
2452
|
-
assertMatches(request.chainName === 'BTC' && intent.operation.chainId === (((_request_bitcoinConfig = request.bitcoinConfig) == null ? void 0 : _request_bitcoinConfig.network) === 'testnet' ? '2' : '1') && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, undefined) && hasValidBtcOperationFields(intent), 'Prepared BTC transaction signing intent is malformed');
|
|
2453
|
-
};
|
|
2454
|
-
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
2455
|
-
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
2456
|
-
const { operation, limits } = intent;
|
|
2457
|
-
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
2458
|
-
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
2459
|
-
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
2460
|
-
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
2461
|
-
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
2462
|
-
var _request_refreshLimits;
|
|
2463
|
-
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
2464
|
-
}), 'Transaction signing limits do not match request');
|
|
2465
|
-
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
2466
|
-
// the approved operation, so the transaction fields are not re-derived here.
|
|
2467
|
-
};
|
|
2468
|
-
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
2469
|
-
if (request.kind !== 'transaction') {
|
|
2470
|
-
throw new Error('Unsupported transaction signing intent');
|
|
2471
|
-
}
|
|
2472
|
-
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
2473
|
-
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
2474
|
-
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
2475
|
-
if (!isEvmTransactionIntent(intent)) {
|
|
2476
|
-
throw new Error('Unsupported transaction signing intent');
|
|
2477
|
-
}
|
|
2478
|
-
return assertEvmTransactionMatchesRequest(intent, request);
|
|
2479
|
-
};
|
|
2480
|
-
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
2481
|
-
const { operation } = intent;
|
|
2482
|
-
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
2483
|
-
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
2484
|
-
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
2485
|
-
if (operation.kind === 'message') {
|
|
2486
|
-
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
2487
|
-
return;
|
|
2488
|
-
}
|
|
2489
|
-
if (operation.kind === 'typedData') {
|
|
2490
|
-
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
2491
|
-
return;
|
|
2492
|
-
}
|
|
2493
|
-
if (operation.kind === 'eip7702Auth') {
|
|
2494
|
-
assertMatches(request.kind === 'eip7702Auth' && request.chainName === 'EVM' && operation.eip7702Auth.address === request.eip7702Auth.address && operation.eip7702Auth.chainId === request.eip7702Auth.chainId && operation.eip7702Auth.nonce === request.eip7702Auth.nonce, 'Prepared EIP-7702 authorization does not match request');
|
|
2495
|
-
return;
|
|
2496
|
-
}
|
|
2497
|
-
const rawSign = operation.rawSign;
|
|
2498
|
-
assertMatches(request.kind === 'raw' && (rawSign == null ? void 0 : rawSign.payload) === request.rawSign.payload && rawSign.hashFunction === request.rawSign.hashFunction && rawSign.prefix === request.rawSign.prefix, 'Prepared raw signing intent does not match request');
|
|
2499
|
-
};
|
|
2500
|
-
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
2501
|
-
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
2502
|
-
if (isTransactionIntent(intent)) {
|
|
2503
|
-
assertTransactionIntentMatchesRequest(intent, request);
|
|
2504
|
-
return;
|
|
2505
|
-
}
|
|
2506
|
-
assertExactOperationMatchesRequest({
|
|
2507
|
-
intent,
|
|
2508
|
-
request,
|
|
2509
|
-
preparedPayload
|
|
2510
|
-
});
|
|
2511
|
-
};
|
|
2512
|
-
|
|
2513
2527
|
Object.defineProperty(exports, "AuthMode", {
|
|
2514
2528
|
enumerable: true,
|
|
2515
2529
|
get: function () { return core.AuthMode; }
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMode, IFRAME_DOMAIN_MAP, getEnvironmentFromUrl, generateUUID, WalletOperation
|
|
1
|
+
import { WaasChainEnum, AuthMode, IFRAME_DOMAIN_MAP, getEnvironmentFromUrl, generateUUID, WalletOperation } from '@dynamic-labs-wallet/core';
|
|
2
2
|
export { AuthMode, MPC_RELAY_PREPROD_API_URL, MPC_RELAY_PROD_API_URL, ThresholdSignatureScheme, WalletOperation } from '@dynamic-labs-wallet/core';
|
|
3
3
|
import { createRequestChannel, parseMessageTransportData, applyDefaultMessageOrigin, createMessageTransport, applyRecoveryManager, makeWaitForUnblock } from '@dynamic-labs/message-transport';
|
|
4
4
|
import { Logger } from '@dynamic-labs/logger';
|
|
@@ -14,6 +14,122 @@ function _extends() {
|
|
|
14
14
|
return _extends.apply(this, arguments);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
const limitKeys = [
|
|
18
|
+
'maxGas',
|
|
19
|
+
'maxFeePerGas',
|
|
20
|
+
'maxPriorityFeePerGas',
|
|
21
|
+
'maxTotalFee'
|
|
22
|
+
];
|
|
23
|
+
const isHex = (value)=>typeof value === 'string' && /^0x(?:[0-9a-f]{2})*$/.test(value);
|
|
24
|
+
const isTransactionIntent = (intent)=>intent.operation.kind === 'transaction';
|
|
25
|
+
const isSvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'SVM';
|
|
26
|
+
const isEvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'EVM';
|
|
27
|
+
const isTronTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'TRON';
|
|
28
|
+
const isBtcTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'BTC';
|
|
29
|
+
const assertMatches = (matches, message)=>{
|
|
30
|
+
if (!matches) throw new Error(message);
|
|
31
|
+
};
|
|
32
|
+
const hasLifetime = (lifetime, refreshable)=>{
|
|
33
|
+
if (refreshable === undefined) return lifetime === undefined;
|
|
34
|
+
const keys = lifetime && typeof lifetime === 'object' ? Object.keys(lifetime) : [];
|
|
35
|
+
return keys.length === 1 && lifetime.refreshable === refreshable;
|
|
36
|
+
};
|
|
37
|
+
const hasMatchingMetadata = (intent, request)=>{
|
|
38
|
+
const sameAddress = request.chainName === 'EVM' ? intent.accountAddress.toLowerCase() === request.accountAddress.toLowerCase() : intent.accountAddress === request.accountAddress;
|
|
39
|
+
return Object.values(WaasChainEnum).includes(request.chainName) && intent.actionType === 'waasSigningQuorumApprove' && Boolean(intent.intentId) && Number.isFinite(Date.parse(intent.createdAt)) && sameAddress && intent.businessAccountId === request.businessAccountId && intent.initiatorUserId === request.initiatorUserId && Boolean(intent.walletId) && (!request.walletId || intent.walletId === request.walletId) && intent.completeBy === request.completeBy && intent.operation.chainName === request.chainName && intent.operation.kind === request.kind;
|
|
40
|
+
};
|
|
41
|
+
const hasValidSvmHeader = (intent)=>{
|
|
42
|
+
const { header, staticAccountKeys } = intent.operation;
|
|
43
|
+
return Number.isInteger(header.numRequiredSignatures) && header.numRequiredSignatures >= 1 && header.numRequiredSignatures <= staticAccountKeys.length && Number.isInteger(header.numReadonlySignedAccounts) && header.numReadonlySignedAccounts >= 0 && header.numReadonlySignedAccounts < header.numRequiredSignatures && Number.isInteger(header.numReadonlyUnsignedAccounts) && header.numReadonlyUnsignedAccounts >= 0 && header.numReadonlyUnsignedAccounts <= staticAccountKeys.length - header.numRequiredSignatures;
|
|
44
|
+
};
|
|
45
|
+
const hasValidSvmInstructions = (intent)=>{
|
|
46
|
+
const { instructions, staticAccountKeys } = intent.operation;
|
|
47
|
+
const isIndex = (value)=>Number.isInteger(value) && value >= 0 && value < staticAccountKeys.length;
|
|
48
|
+
return instructions.every((instruction)=>isIndex(instruction.programIdIndex) && instruction.accountKeyIndexes.every(isIndex) && isHex(instruction.data));
|
|
49
|
+
};
|
|
50
|
+
const assertSvmTransactionMatchesRequest = (intent, request)=>{
|
|
51
|
+
var _request_chainId;
|
|
52
|
+
const { operation } = intent;
|
|
53
|
+
const isBase58 = (value)=>/^[1-9A-HJ-NP-Za-km-z]+$/.test(value);
|
|
54
|
+
assertMatches(request.chainName === 'SVM' && Boolean(request.chainId) && ((_request_chainId = request.chainId) == null ? void 0 : _request_chainId.trim()) === request.chainId && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'blockhash') && (operation.messageVersion === 'legacy' || operation.messageVersion === 'v0') && operation.staticAccountKeys.length > 0 && operation.staticAccountKeys.every(isBase58) && operation.feePayer === request.accountAddress && operation.feePayer === operation.staticAccountKeys[0] && hasValidSvmHeader(intent) && hasValidSvmInstructions(intent), 'Prepared SVM transaction signing intent is malformed');
|
|
55
|
+
};
|
|
56
|
+
// The intent describes the network in decimal; a request may name it in hexadecimal.
|
|
57
|
+
const toDecimalChainId = (chainId)=>chainId && /^0x[\da-f]+$/i.test(chainId) ? BigInt(chainId).toString() : chainId;
|
|
58
|
+
const assertTronTransactionMatchesRequest = (intent, request)=>{
|
|
59
|
+
const { operation } = intent;
|
|
60
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
61
|
+
// the approved operation, so the contract fields are not re-derived here.
|
|
62
|
+
assertMatches(request.chainName === 'TRON' && Boolean(request.chainId) && operation.chainId === toDecimalChainId(request.chainId) && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.from === request.accountAddress, 'Prepared TRON transaction signing intent is malformed');
|
|
63
|
+
};
|
|
64
|
+
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
65
|
+
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
66
|
+
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
67
|
+
const hasValidBtcOperationFields = ({ operation })=>BTC_HASH.test(operation.txid) && DECIMAL.test(operation.feeSats) && Array.isArray(operation.outputs) && operation.outputs.length > 0 && operation.outputs.every(({ script, valueSats })=>HEX_BYTES.test(script) && DECIMAL.test(valueSats)) && Array.isArray(operation.sighashes) && operation.sighashes.length > 0 && operation.sighashes.every((sighash)=>BTC_HASH.test(sighash));
|
|
68
|
+
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
69
|
+
var _request_bitcoinConfig;
|
|
70
|
+
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
71
|
+
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
72
|
+
assertMatches(request.chainName === 'BTC' && intent.operation.chainId === (((_request_bitcoinConfig = request.bitcoinConfig) == null ? void 0 : _request_bitcoinConfig.network) === 'testnet' ? '2' : '1') && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, undefined) && hasValidBtcOperationFields(intent), 'Prepared BTC transaction signing intent is malformed');
|
|
73
|
+
};
|
|
74
|
+
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
75
|
+
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
76
|
+
const { operation, limits } = intent;
|
|
77
|
+
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
78
|
+
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
79
|
+
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
80
|
+
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
81
|
+
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
82
|
+
var _request_refreshLimits;
|
|
83
|
+
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
84
|
+
}), 'Transaction signing limits do not match request');
|
|
85
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
86
|
+
// the approved operation, so the transaction fields are not re-derived here.
|
|
87
|
+
};
|
|
88
|
+
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
89
|
+
if (request.kind !== 'transaction') {
|
|
90
|
+
throw new Error('Unsupported transaction signing intent');
|
|
91
|
+
}
|
|
92
|
+
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
93
|
+
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
94
|
+
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
95
|
+
if (!isEvmTransactionIntent(intent)) {
|
|
96
|
+
throw new Error('Unsupported transaction signing intent');
|
|
97
|
+
}
|
|
98
|
+
return assertEvmTransactionMatchesRequest(intent, request);
|
|
99
|
+
};
|
|
100
|
+
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
101
|
+
const { operation } = intent;
|
|
102
|
+
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
103
|
+
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
104
|
+
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
105
|
+
if (operation.kind === 'message') {
|
|
106
|
+
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (operation.kind === 'typedData') {
|
|
110
|
+
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (operation.kind === 'eip7702Auth') {
|
|
114
|
+
assertMatches(request.kind === 'eip7702Auth' && request.chainName === 'EVM' && operation.eip7702Auth.address === request.eip7702Auth.address && operation.eip7702Auth.chainId === request.eip7702Auth.chainId && operation.eip7702Auth.nonce === request.eip7702Auth.nonce, 'Prepared EIP-7702 authorization does not match request');
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const rawSign = operation.rawSign;
|
|
118
|
+
assertMatches(request.kind === 'raw' && (rawSign == null ? void 0 : rawSign.payload) === request.rawSign.payload && rawSign.hashFunction === request.rawSign.hashFunction && rawSign.prefix === request.rawSign.prefix, 'Prepared raw signing intent does not match request');
|
|
119
|
+
};
|
|
120
|
+
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
121
|
+
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
122
|
+
if (isTransactionIntent(intent)) {
|
|
123
|
+
assertTransactionIntentMatchesRequest(intent, request);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
assertExactOperationMatchesRequest({
|
|
127
|
+
intent,
|
|
128
|
+
request,
|
|
129
|
+
preparedPayload
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
|
|
17
133
|
function _object_without_properties_loose(source, excluded) {
|
|
18
134
|
if (source == null) return {};
|
|
19
135
|
var target = {};
|
|
@@ -1867,9 +1983,23 @@ class DynamicWalletClient extends IframeManager {
|
|
|
1867
1983
|
})));
|
|
1868
1984
|
}
|
|
1869
1985
|
async prepareSigningIntent(request) {
|
|
1870
|
-
return this.withHandler((handler)=>
|
|
1986
|
+
return this.withHandler(async (handler)=>{
|
|
1987
|
+
const requestWithChain = _extends({}, request, {
|
|
1871
1988
|
chainName: this.chainName
|
|
1872
|
-
})
|
|
1989
|
+
});
|
|
1990
|
+
const intent = await handler.prepareSigningIntent(requestWithChain);
|
|
1991
|
+
// Refuse intents that drop or change the wallet the request named.
|
|
1992
|
+
let preparedPayload;
|
|
1993
|
+
if (intent.operation.kind !== 'transaction') {
|
|
1994
|
+
preparedPayload = intent.operation.payload;
|
|
1995
|
+
}
|
|
1996
|
+
assertPreparedSigningIntentMatchesRequest({
|
|
1997
|
+
intent,
|
|
1998
|
+
preparedPayload,
|
|
1999
|
+
request: requestWithChain
|
|
2000
|
+
});
|
|
2001
|
+
return intent;
|
|
2002
|
+
});
|
|
1873
2003
|
}
|
|
1874
2004
|
async resumeSigningIntent(request) {
|
|
1875
2005
|
return this.withHandler((handler)=>handler.resumeSigningIntent(_extends({}, request, {
|
|
@@ -2393,120 +2523,4 @@ class DynamicWalletClient extends IframeManager {
|
|
|
2393
2523
|
}
|
|
2394
2524
|
}
|
|
2395
2525
|
|
|
2396
|
-
const limitKeys = [
|
|
2397
|
-
'maxGas',
|
|
2398
|
-
'maxFeePerGas',
|
|
2399
|
-
'maxPriorityFeePerGas',
|
|
2400
|
-
'maxTotalFee'
|
|
2401
|
-
];
|
|
2402
|
-
const isHex = (value)=>typeof value === 'string' && /^0x(?:[0-9a-f]{2})*$/.test(value);
|
|
2403
|
-
const isTransactionIntent = (intent)=>intent.operation.kind === 'transaction';
|
|
2404
|
-
const isSvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'SVM';
|
|
2405
|
-
const isEvmTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'EVM';
|
|
2406
|
-
const isTronTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'TRON';
|
|
2407
|
-
const isBtcTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'BTC';
|
|
2408
|
-
const assertMatches = (matches, message)=>{
|
|
2409
|
-
if (!matches) throw new Error(message);
|
|
2410
|
-
};
|
|
2411
|
-
const hasLifetime = (lifetime, refreshable)=>{
|
|
2412
|
-
if (refreshable === undefined) return lifetime === undefined;
|
|
2413
|
-
const keys = lifetime && typeof lifetime === 'object' ? Object.keys(lifetime) : [];
|
|
2414
|
-
return keys.length === 1 && lifetime.refreshable === refreshable;
|
|
2415
|
-
};
|
|
2416
|
-
const hasMatchingMetadata = (intent, request)=>{
|
|
2417
|
-
const sameAddress = request.chainName === 'EVM' ? intent.accountAddress.toLowerCase() === request.accountAddress.toLowerCase() : intent.accountAddress === request.accountAddress;
|
|
2418
|
-
return Object.values(WaasChainEnum).includes(request.chainName) && intent.actionType === 'waasSigningQuorumApprove' && Boolean(intent.intentId) && Number.isFinite(Date.parse(intent.createdAt)) && sameAddress && intent.businessAccountId === request.businessAccountId && intent.initiatorUserId === request.initiatorUserId && intent.completeBy === request.completeBy && intent.operation.chainName === request.chainName && intent.operation.kind === request.kind;
|
|
2419
|
-
};
|
|
2420
|
-
const hasValidSvmHeader = (intent)=>{
|
|
2421
|
-
const { header, staticAccountKeys } = intent.operation;
|
|
2422
|
-
return Number.isInteger(header.numRequiredSignatures) && header.numRequiredSignatures >= 1 && header.numRequiredSignatures <= staticAccountKeys.length && Number.isInteger(header.numReadonlySignedAccounts) && header.numReadonlySignedAccounts >= 0 && header.numReadonlySignedAccounts < header.numRequiredSignatures && Number.isInteger(header.numReadonlyUnsignedAccounts) && header.numReadonlyUnsignedAccounts >= 0 && header.numReadonlyUnsignedAccounts <= staticAccountKeys.length - header.numRequiredSignatures;
|
|
2423
|
-
};
|
|
2424
|
-
const hasValidSvmInstructions = (intent)=>{
|
|
2425
|
-
const { instructions, staticAccountKeys } = intent.operation;
|
|
2426
|
-
const isIndex = (value)=>Number.isInteger(value) && value >= 0 && value < staticAccountKeys.length;
|
|
2427
|
-
return instructions.every((instruction)=>isIndex(instruction.programIdIndex) && instruction.accountKeyIndexes.every(isIndex) && isHex(instruction.data));
|
|
2428
|
-
};
|
|
2429
|
-
const assertSvmTransactionMatchesRequest = (intent, request)=>{
|
|
2430
|
-
var _request_chainId;
|
|
2431
|
-
const { operation } = intent;
|
|
2432
|
-
const isBase58 = (value)=>/^[1-9A-HJ-NP-Za-km-z]+$/.test(value);
|
|
2433
|
-
assertMatches(request.chainName === 'SVM' && Boolean(request.chainId) && ((_request_chainId = request.chainId) == null ? void 0 : _request_chainId.trim()) === request.chainId && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'blockhash') && (operation.messageVersion === 'legacy' || operation.messageVersion === 'v0') && operation.staticAccountKeys.length > 0 && operation.staticAccountKeys.every(isBase58) && operation.feePayer === request.accountAddress && operation.feePayer === operation.staticAccountKeys[0] && hasValidSvmHeader(intent) && hasValidSvmInstructions(intent), 'Prepared SVM transaction signing intent is malformed');
|
|
2434
|
-
};
|
|
2435
|
-
// The intent describes the network in decimal; a request may name it in hexadecimal.
|
|
2436
|
-
const toDecimalChainId = (chainId)=>chainId && /^0x[\da-f]+$/i.test(chainId) ? BigInt(chainId).toString() : chainId;
|
|
2437
|
-
const assertTronTransactionMatchesRequest = (intent, request)=>{
|
|
2438
|
-
const { operation } = intent;
|
|
2439
|
-
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
2440
|
-
// the approved operation, so the contract fields are not re-derived here.
|
|
2441
|
-
assertMatches(request.chainName === 'TRON' && Boolean(request.chainId) && operation.chainId === toDecimalChainId(request.chainId) && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.from === request.accountAddress, 'Prepared TRON transaction signing intent is malformed');
|
|
2442
|
-
};
|
|
2443
|
-
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
2444
|
-
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
2445
|
-
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
2446
|
-
const hasValidBtcOperationFields = ({ operation })=>BTC_HASH.test(operation.txid) && DECIMAL.test(operation.feeSats) && Array.isArray(operation.outputs) && operation.outputs.length > 0 && operation.outputs.every(({ script, valueSats })=>HEX_BYTES.test(script) && DECIMAL.test(valueSats)) && Array.isArray(operation.sighashes) && operation.sighashes.length > 0 && operation.sighashes.every((sighash)=>BTC_HASH.test(sighash));
|
|
2447
|
-
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
2448
|
-
var _request_bitcoinConfig;
|
|
2449
|
-
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
2450
|
-
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
2451
|
-
assertMatches(request.chainName === 'BTC' && intent.operation.chainId === (((_request_bitcoinConfig = request.bitcoinConfig) == null ? void 0 : _request_bitcoinConfig.network) === 'testnet' ? '2' : '1') && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, undefined) && hasValidBtcOperationFields(intent), 'Prepared BTC transaction signing intent is malformed');
|
|
2452
|
-
};
|
|
2453
|
-
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
2454
|
-
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
2455
|
-
const { operation, limits } = intent;
|
|
2456
|
-
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
2457
|
-
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
2458
|
-
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
2459
|
-
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
2460
|
-
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
2461
|
-
var _request_refreshLimits;
|
|
2462
|
-
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
2463
|
-
}), 'Transaction signing limits do not match request');
|
|
2464
|
-
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
2465
|
-
// the approved operation, so the transaction fields are not re-derived here.
|
|
2466
|
-
};
|
|
2467
|
-
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
2468
|
-
if (request.kind !== 'transaction') {
|
|
2469
|
-
throw new Error('Unsupported transaction signing intent');
|
|
2470
|
-
}
|
|
2471
|
-
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
2472
|
-
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
2473
|
-
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
2474
|
-
if (!isEvmTransactionIntent(intent)) {
|
|
2475
|
-
throw new Error('Unsupported transaction signing intent');
|
|
2476
|
-
}
|
|
2477
|
-
return assertEvmTransactionMatchesRequest(intent, request);
|
|
2478
|
-
};
|
|
2479
|
-
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
2480
|
-
const { operation } = intent;
|
|
2481
|
-
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
2482
|
-
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
2483
|
-
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
2484
|
-
if (operation.kind === 'message') {
|
|
2485
|
-
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
2486
|
-
return;
|
|
2487
|
-
}
|
|
2488
|
-
if (operation.kind === 'typedData') {
|
|
2489
|
-
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
2490
|
-
return;
|
|
2491
|
-
}
|
|
2492
|
-
if (operation.kind === 'eip7702Auth') {
|
|
2493
|
-
assertMatches(request.kind === 'eip7702Auth' && request.chainName === 'EVM' && operation.eip7702Auth.address === request.eip7702Auth.address && operation.eip7702Auth.chainId === request.eip7702Auth.chainId && operation.eip7702Auth.nonce === request.eip7702Auth.nonce, 'Prepared EIP-7702 authorization does not match request');
|
|
2494
|
-
return;
|
|
2495
|
-
}
|
|
2496
|
-
const rawSign = operation.rawSign;
|
|
2497
|
-
assertMatches(request.kind === 'raw' && (rawSign == null ? void 0 : rawSign.payload) === request.rawSign.payload && rawSign.hashFunction === request.rawSign.hashFunction && rawSign.prefix === request.rawSign.prefix, 'Prepared raw signing intent does not match request');
|
|
2498
|
-
};
|
|
2499
|
-
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
2500
|
-
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
2501
|
-
if (isTransactionIntent(intent)) {
|
|
2502
|
-
assertTransactionIntentMatchesRequest(intent, request);
|
|
2503
|
-
return;
|
|
2504
|
-
}
|
|
2505
|
-
assertExactOperationMatchesRequest({
|
|
2506
|
-
intent,
|
|
2507
|
-
request,
|
|
2508
|
-
preparedPayload
|
|
2509
|
-
});
|
|
2510
|
-
};
|
|
2511
|
-
|
|
2512
2526
|
export { DynamicWalletClient, assertPreparedSigningIntentMatchesRequest, createIframeWaasSDKContainer, preconnectWaasIframe };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser-wallet-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.78",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "1.1.
|
|
7
|
+
"@dynamic-labs-wallet/core": "1.1.78",
|
|
8
8
|
"@dynamic-labs/logger": "^5.9.4",
|
|
9
9
|
"@dynamic-labs/message-transport": "^5.9.1"
|
|
10
10
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertPreparedSigningIntentMatchesRequest.d.ts","sourceRoot":"","sources":["../../packages/src/assertPreparedSigningIntentMatchesRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,2BAA2B,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"assertPreparedSigningIntentMatchesRequest.d.ts","sourceRoot":"","sources":["../../packages/src/assertPreparedSigningIntentMatchesRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,2BAA2B,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAqPhH,eAAO,MAAM,yCAAyC,0CAInD;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,2BAA2B,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,KAAG,IAQH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,aAAa,EACb,sBAAsB,EACtB,kCAAkC,EAClC,+BAA+B,EAC/B,+BAA+B,EAC/B,sCAAsC,EACtC,oCAAoC,EACpC,8BAA8B,EAC9B,oCAAoC,EACpC,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,EAC7B,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,2BAA2B,EAC3B,YAAY,EACZ,0BAA0B,EAC1B,2BAA2B,EAC3B,aAAa,EACb,2BAA2B,EAC3B,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,iCAAiC,EACjC,8BAA8B,EAC9B,uBAAuB,EACvB,mCAAmC,EACnC,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,sCAAsC,EACtC,uCAAuC,EACvC,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAA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C,CAC3F,GAAG,OAAO,CAAC,wCAAwC,CAAC;IAqB/C,YAAY,CAAC,EACjB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,EAAE,uBAAuB,CACxB,8BAA8B,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC,CACvE,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgB3B,yBAAyB,CAAC,EAC9B,cAAc,EACd,SAAS,EACT,UAAU,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,EAAE,uBAAuB,CACxB,8BAA8B,CAAC,IAAI,CAAC,gCAAgC,EAAE,WAAW,CAAC,CAAC,CACpF,GAAG,OAAO,CAAC,iCAAiC,CAAC;IAkBxC,iBAAiB,CAAC,EACtB,cAAc,EACd,WAAW,EACX,cAAc,EACd,SAAS,EACT,aAAa,EACb,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,EAAE,uBAAuB,CACxB,8BAA8B,CAAC,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC,CAC5E,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAuBhC,iBAAiB,CAAC,EACtB,cAAc,EACd,WAAW,EACX,GAAG,EACH,UAAU,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,EAAE,uBAAuB,CACxB,8BAA8B,CAAC,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC,CAC5E,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAkBvC"}
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,8BAA8B,E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