@dynamic-labs-wallet/browser-wallet-client 1.1.77 → 1.1.79
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 +138 -118
- package/index.esm.js +139 -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,128 @@ 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 isStellarTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'STELLAR';
|
|
30
|
+
const isBtcTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'BTC';
|
|
31
|
+
const assertMatches = (matches, message)=>{
|
|
32
|
+
if (!matches) throw new Error(message);
|
|
33
|
+
};
|
|
34
|
+
const hasLifetime = (lifetime, refreshable)=>{
|
|
35
|
+
if (refreshable === undefined) return lifetime === undefined;
|
|
36
|
+
const keys = lifetime && typeof lifetime === 'object' ? Object.keys(lifetime) : [];
|
|
37
|
+
return keys.length === 1 && lifetime.refreshable === refreshable;
|
|
38
|
+
};
|
|
39
|
+
const hasMatchingMetadata = (intent, request)=>{
|
|
40
|
+
const sameAddress = request.chainName === 'EVM' ? intent.accountAddress.toLowerCase() === request.accountAddress.toLowerCase() : intent.accountAddress === request.accountAddress;
|
|
41
|
+
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;
|
|
42
|
+
};
|
|
43
|
+
const hasValidSvmHeader = (intent)=>{
|
|
44
|
+
const { header, staticAccountKeys } = intent.operation;
|
|
45
|
+
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;
|
|
46
|
+
};
|
|
47
|
+
const hasValidSvmInstructions = (intent)=>{
|
|
48
|
+
const { instructions, staticAccountKeys } = intent.operation;
|
|
49
|
+
const isIndex = (value)=>Number.isInteger(value) && value >= 0 && value < staticAccountKeys.length;
|
|
50
|
+
return instructions.every((instruction)=>isIndex(instruction.programIdIndex) && instruction.accountKeyIndexes.every(isIndex) && isHex(instruction.data));
|
|
51
|
+
};
|
|
52
|
+
const assertSvmTransactionMatchesRequest = (intent, request)=>{
|
|
53
|
+
var _request_chainId;
|
|
54
|
+
const { operation } = intent;
|
|
55
|
+
const isBase58 = (value)=>/^[1-9A-HJ-NP-Za-km-z]+$/.test(value);
|
|
56
|
+
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');
|
|
57
|
+
};
|
|
58
|
+
// The intent describes the network in decimal; a request may name it in hexadecimal.
|
|
59
|
+
const toDecimalChainId = (chainId)=>chainId && /^0x[\da-f]+$/i.test(chainId) ? BigInt(chainId).toString() : chainId;
|
|
60
|
+
const assertTronTransactionMatchesRequest = (intent, request)=>{
|
|
61
|
+
const { operation } = intent;
|
|
62
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
63
|
+
// the approved operation, so the contract fields are not re-derived here.
|
|
64
|
+
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');
|
|
65
|
+
};
|
|
66
|
+
const assertStellarTransactionMatchesRequest = (intent, request)=>{
|
|
67
|
+
const { operation } = intent;
|
|
68
|
+
assertMatches(request.chainName === 'STELLAR' && Boolean(request.chainId) && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.source === request.accountAddress, 'Prepared Stellar transaction signing intent is malformed');
|
|
69
|
+
};
|
|
70
|
+
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
71
|
+
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
72
|
+
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
73
|
+
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));
|
|
74
|
+
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
75
|
+
var _request_bitcoinConfig;
|
|
76
|
+
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
77
|
+
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
78
|
+
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');
|
|
79
|
+
};
|
|
80
|
+
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
81
|
+
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
82
|
+
const { operation, limits } = intent;
|
|
83
|
+
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
84
|
+
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
85
|
+
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
86
|
+
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
87
|
+
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
88
|
+
var _request_refreshLimits;
|
|
89
|
+
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
90
|
+
}), 'Transaction signing limits do not match request');
|
|
91
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
92
|
+
// the approved operation, so the transaction fields are not re-derived here.
|
|
93
|
+
};
|
|
94
|
+
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
95
|
+
if (request.kind !== 'transaction') {
|
|
96
|
+
throw new Error('Unsupported transaction signing intent');
|
|
97
|
+
}
|
|
98
|
+
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
99
|
+
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
100
|
+
if (isStellarTransactionIntent(intent)) return assertStellarTransactionMatchesRequest(intent, request);
|
|
101
|
+
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
102
|
+
if (!isEvmTransactionIntent(intent)) {
|
|
103
|
+
throw new Error('Unsupported transaction signing intent');
|
|
104
|
+
}
|
|
105
|
+
return assertEvmTransactionMatchesRequest(intent, request);
|
|
106
|
+
};
|
|
107
|
+
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
108
|
+
const { operation } = intent;
|
|
109
|
+
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
110
|
+
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
111
|
+
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
112
|
+
if (operation.kind === 'message') {
|
|
113
|
+
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (operation.kind === 'typedData') {
|
|
117
|
+
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (operation.kind === 'eip7702Auth') {
|
|
121
|
+
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');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const rawSign = operation.rawSign;
|
|
125
|
+
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');
|
|
126
|
+
};
|
|
127
|
+
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
128
|
+
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
129
|
+
if (isTransactionIntent(intent)) {
|
|
130
|
+
assertTransactionIntentMatchesRequest(intent, request);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
assertExactOperationMatchesRequest({
|
|
134
|
+
intent,
|
|
135
|
+
request,
|
|
136
|
+
preparedPayload
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
|
|
18
140
|
function _object_without_properties_loose(source, excluded) {
|
|
19
141
|
if (source == null) return {};
|
|
20
142
|
var target = {};
|
|
@@ -1868,9 +1990,23 @@ class DynamicWalletClient extends IframeManager {
|
|
|
1868
1990
|
})));
|
|
1869
1991
|
}
|
|
1870
1992
|
async prepareSigningIntent(request) {
|
|
1871
|
-
return this.withHandler((handler)=>
|
|
1993
|
+
return this.withHandler(async (handler)=>{
|
|
1994
|
+
const requestWithChain = _extends({}, request, {
|
|
1872
1995
|
chainName: this.chainName
|
|
1873
|
-
})
|
|
1996
|
+
});
|
|
1997
|
+
const intent = await handler.prepareSigningIntent(requestWithChain);
|
|
1998
|
+
// Refuse intents that drop or change the wallet the request named.
|
|
1999
|
+
let preparedPayload;
|
|
2000
|
+
if (intent.operation.kind !== 'transaction') {
|
|
2001
|
+
preparedPayload = intent.operation.payload;
|
|
2002
|
+
}
|
|
2003
|
+
assertPreparedSigningIntentMatchesRequest({
|
|
2004
|
+
intent,
|
|
2005
|
+
preparedPayload,
|
|
2006
|
+
request: requestWithChain
|
|
2007
|
+
});
|
|
2008
|
+
return intent;
|
|
2009
|
+
});
|
|
1874
2010
|
}
|
|
1875
2011
|
async resumeSigningIntent(request) {
|
|
1876
2012
|
return this.withHandler((handler)=>handler.resumeSigningIntent(_extends({}, request, {
|
|
@@ -2394,122 +2530,6 @@ class DynamicWalletClient extends IframeManager {
|
|
|
2394
2530
|
}
|
|
2395
2531
|
}
|
|
2396
2532
|
|
|
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
2533
|
Object.defineProperty(exports, "AuthMode", {
|
|
2514
2534
|
enumerable: true,
|
|
2515
2535
|
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,128 @@ 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 isStellarTransactionIntent = (intent)=>intent.operation.kind === 'transaction' && intent.operation.chainName === 'STELLAR';
|
|
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(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 assertStellarTransactionMatchesRequest = (intent, request)=>{
|
|
66
|
+
const { operation } = intent;
|
|
67
|
+
assertMatches(request.chainName === 'STELLAR' && Boolean(request.chainId) && operation.chainId === request.chainId && request.refreshLimits === undefined && !request.refreshableNonce && intent.limits === undefined && hasLifetime(intent.lifetime, 'expiration') && operation.source === request.accountAddress, 'Prepared Stellar transaction signing intent is malformed');
|
|
68
|
+
};
|
|
69
|
+
const BTC_HASH = /^[0-9a-f]{64}$/;
|
|
70
|
+
const DECIMAL = /^(0|[1-9]\d*)$/;
|
|
71
|
+
const HEX_BYTES = /^(?:[0-9a-f]{2})*$/;
|
|
72
|
+
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));
|
|
73
|
+
const assertBtcTransactionMatchesRequest = (intent, request)=>{
|
|
74
|
+
var _request_bitcoinConfig;
|
|
75
|
+
// Wallet-service re-derives the transaction from the PSBT it signs and rejects any
|
|
76
|
+
// mismatch with the approved operation, so the outputs and hashes are not re-derived here.
|
|
77
|
+
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');
|
|
78
|
+
};
|
|
79
|
+
const assertEvmTransactionMatchesRequest = (intent, request)=>{
|
|
80
|
+
if (request.chainName !== 'EVM') throw new Error('Unsupported transaction signing intent');
|
|
81
|
+
const { operation, limits } = intent;
|
|
82
|
+
if (!limits) throw new Error('Prepared transaction signing intent is malformed');
|
|
83
|
+
assertMatches(hasLifetime(intent.lifetime, request.refreshableNonce ? 'nonce' : undefined), 'Transaction lifetime does not match request');
|
|
84
|
+
assertMatches(operation.from === intent.accountAddress.toLowerCase(), 'Transaction signer does not match request');
|
|
85
|
+
assertMatches(!request.chainId || operation.chainId === request.chainId, 'Transaction chain does not match request');
|
|
86
|
+
assertMatches(!request.refreshLimits || limitKeys.every((key)=>{
|
|
87
|
+
var _request_refreshLimits;
|
|
88
|
+
return limits[key] === ((_request_refreshLimits = request.refreshLimits) == null ? void 0 : _request_refreshLimits[key]);
|
|
89
|
+
}), 'Transaction signing limits do not match request');
|
|
90
|
+
// Wallet-service parses the transaction it signs and rejects any mismatch with
|
|
91
|
+
// the approved operation, so the transaction fields are not re-derived here.
|
|
92
|
+
};
|
|
93
|
+
const assertTransactionIntentMatchesRequest = (intent, request)=>{
|
|
94
|
+
if (request.kind !== 'transaction') {
|
|
95
|
+
throw new Error('Unsupported transaction signing intent');
|
|
96
|
+
}
|
|
97
|
+
if (isSvmTransactionIntent(intent)) return assertSvmTransactionMatchesRequest(intent, request);
|
|
98
|
+
if (isTronTransactionIntent(intent)) return assertTronTransactionMatchesRequest(intent, request);
|
|
99
|
+
if (isStellarTransactionIntent(intent)) return assertStellarTransactionMatchesRequest(intent, request);
|
|
100
|
+
if (isBtcTransactionIntent(intent)) return assertBtcTransactionMatchesRequest(intent, request);
|
|
101
|
+
if (!isEvmTransactionIntent(intent)) {
|
|
102
|
+
throw new Error('Unsupported transaction signing intent');
|
|
103
|
+
}
|
|
104
|
+
return assertEvmTransactionMatchesRequest(intent, request);
|
|
105
|
+
};
|
|
106
|
+
const assertExactOperationMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
107
|
+
const { operation } = intent;
|
|
108
|
+
assertMatches(preparedPayload !== undefined && operation.payload === preparedPayload, 'Prepared signing intent payload does not match request');
|
|
109
|
+
assertMatches(intent.limits === undefined, 'Exact signing intent cannot include refresh limits');
|
|
110
|
+
assertMatches(hasLifetime(intent.lifetime, undefined), 'Exact signing intent cannot include a lifetime');
|
|
111
|
+
if (operation.kind === 'message') {
|
|
112
|
+
assertMatches(request.kind === 'message' && operation.message === request.message, 'Prepared signing intent message does not match request');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (operation.kind === 'typedData') {
|
|
116
|
+
assertMatches(request.kind === 'typedData' && request.chainName === 'EVM' && Boolean(request.typedData) && operation.typedData === request.typedData, 'Prepared signing intent typed data does not match request');
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (operation.kind === 'eip7702Auth') {
|
|
120
|
+
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');
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const rawSign = operation.rawSign;
|
|
124
|
+
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');
|
|
125
|
+
};
|
|
126
|
+
const assertPreparedSigningIntentMatchesRequest = ({ intent, request, preparedPayload })=>{
|
|
127
|
+
assertMatches(hasMatchingMetadata(intent, request), 'Prepared signing intent does not match request');
|
|
128
|
+
if (isTransactionIntent(intent)) {
|
|
129
|
+
assertTransactionIntentMatchesRequest(intent, request);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
assertExactOperationMatchesRequest({
|
|
133
|
+
intent,
|
|
134
|
+
request,
|
|
135
|
+
preparedPayload
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
17
139
|
function _object_without_properties_loose(source, excluded) {
|
|
18
140
|
if (source == null) return {};
|
|
19
141
|
var target = {};
|
|
@@ -1867,9 +1989,23 @@ class DynamicWalletClient extends IframeManager {
|
|
|
1867
1989
|
})));
|
|
1868
1990
|
}
|
|
1869
1991
|
async prepareSigningIntent(request) {
|
|
1870
|
-
return this.withHandler((handler)=>
|
|
1992
|
+
return this.withHandler(async (handler)=>{
|
|
1993
|
+
const requestWithChain = _extends({}, request, {
|
|
1871
1994
|
chainName: this.chainName
|
|
1872
|
-
})
|
|
1995
|
+
});
|
|
1996
|
+
const intent = await handler.prepareSigningIntent(requestWithChain);
|
|
1997
|
+
// Refuse intents that drop or change the wallet the request named.
|
|
1998
|
+
let preparedPayload;
|
|
1999
|
+
if (intent.operation.kind !== 'transaction') {
|
|
2000
|
+
preparedPayload = intent.operation.payload;
|
|
2001
|
+
}
|
|
2002
|
+
assertPreparedSigningIntentMatchesRequest({
|
|
2003
|
+
intent,
|
|
2004
|
+
preparedPayload,
|
|
2005
|
+
request: requestWithChain
|
|
2006
|
+
});
|
|
2007
|
+
return intent;
|
|
2008
|
+
});
|
|
1873
2009
|
}
|
|
1874
2010
|
async resumeSigningIntent(request) {
|
|
1875
2011
|
return this.withHandler((handler)=>handler.resumeSigningIntent(_extends({}, request, {
|
|
@@ -2393,120 +2529,4 @@ class DynamicWalletClient extends IframeManager {
|
|
|
2393
2529
|
}
|
|
2394
2530
|
}
|
|
2395
2531
|
|
|
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
2532
|
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.79",
|
|
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.79",
|
|
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;AA4QhH,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":"","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