@pushchain/core 6.0.19 → 6.0.20
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PushChain } from './push-chain/push-chain';
|
|
2
2
|
export type { ConversionQuote } from './constants/tokens';
|
|
3
|
-
export type { UniversalSigner, UniversalAccount, UniversalSignerSkeleton, DerivedExecutorAccount, ResolvedAccount, ResolvedControllerAccounts, AccountType, AccountRole, } from './universal/universal.types';
|
|
3
|
+
export type { UniversalSigner, UniversalAccount, UniversalSignerSkeleton, SignAuthorizationParams, SignedAuthorization, DerivedExecutorAccount, ResolvedAccount, ResolvedControllerAccounts, AccountType, AccountRole, } from './universal/universal.types';
|
|
4
4
|
export type { ChainTarget, ChainSource, UniversalTo, TransactionRouteType, UniversalExecuteParams, UniversalOutboundTxRequest, PreparedUniversalTx, CascadedTxResponse, CascadeHopInfo, CascadeTrackOptions, CascadeProgressEvent, CascadeCompletionResult, MultiChainTxResponse, OutboundTxDetails, WaitForOutboundOptions, SvmGatewayAccountMeta, SvmExecutePayloadFields, AccountStatus, UEAStatus, RescueFundsParams, } from './orchestrator/orchestrator.types';
|
|
5
5
|
export { parseUEAVersion } from './orchestrator/orchestrator.types';
|
|
6
6
|
export { TransactionRoute, detectRoute, isChainTarget } from './orchestrator/route-detector';
|
|
@@ -115,7 +115,6 @@ function sendPushTx(ctx, execute, eventBuffer, transformFn) {
|
|
|
115
115
|
'separate, non-atomic transactions (if one call reverts, earlier calls ' +
|
|
116
116
|
'remain committed).');
|
|
117
117
|
}
|
|
118
|
-
const PUSH_CHAIN_GAS_LIMIT = BigInt(500000);
|
|
119
118
|
const MAX_NONCE_RETRIES = 3;
|
|
120
119
|
let nonce = yield ctx.pushClient.publicClient.getTransactionCount({
|
|
121
120
|
address: ctx.universalSigner.account.address,
|
|
@@ -134,7 +133,6 @@ function sendPushTx(ctx, execute, eventBuffer, transformFn) {
|
|
|
134
133
|
value: call.value,
|
|
135
134
|
signer: ctx.universalSigner,
|
|
136
135
|
nonce,
|
|
137
|
-
gas: PUSH_CHAIN_GAS_LIMIT,
|
|
138
136
|
});
|
|
139
137
|
txSent = true;
|
|
140
138
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletClient } from 'viem';
|
|
2
2
|
import { TypedDataDomain, TypedData } from '../../constants';
|
|
3
|
-
import { EthersV5SignerType, EthersV6SignerType, UniversalAccount, UniversalSigner, UniversalSignerSkeleton, ViemSignerType } from '../universal.types';
|
|
3
|
+
import { EthersV5SignerType, EthersV6SignerType, SignAuthorizationParams, SignedAuthorization, UniversalAccount, UniversalSigner, UniversalSignerSkeleton, ViemSignerType } from '../universal.types';
|
|
4
4
|
import { Keypair } from '@solana/web3.js';
|
|
5
5
|
import { CHAIN, LIBRARY } from '../../constants/enums';
|
|
6
6
|
/**
|
|
@@ -37,6 +37,7 @@ export declare function toUniversalFromKeypair(clientOrAccount: WalletClient | K
|
|
|
37
37
|
export declare function construct(account: UniversalAccount, options: {
|
|
38
38
|
signMessage: (data: Uint8Array) => Promise<Uint8Array>;
|
|
39
39
|
signAndSendTransaction: (unsignedTx: Uint8Array) => Promise<Uint8Array>;
|
|
40
|
+
signAuthorization?: (params: SignAuthorizationParams) => Promise<SignedAuthorization>;
|
|
40
41
|
signTypedData?: ({ domain, types, primaryType, message, }: {
|
|
41
42
|
domain: TypedDataDomain;
|
|
42
43
|
types: TypedData;
|
|
@@ -308,19 +308,23 @@ function toUniversalFromKeypair(clientOrAccount_1, _a) {
|
|
|
308
308
|
}
|
|
309
309
|
// `signTypedData` is only mandatory for EVM Signers. For Solana, this is not necessary.
|
|
310
310
|
function construct(account, options) {
|
|
311
|
-
const { signMessage, signAndSendTransaction, signTypedData } = options;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
const { signMessage, signAndSendTransaction, signTypedData, signAuthorization, } = options;
|
|
312
|
+
const isSolana = account.chain === enums_1.CHAIN.SOLANA_MAINNET ||
|
|
313
|
+
account.chain === enums_1.CHAIN.SOLANA_TESTNET ||
|
|
314
|
+
account.chain === enums_1.CHAIN.SOLANA_DEVNET;
|
|
315
|
+
if (signTypedData && isSolana) {
|
|
316
316
|
throw new Error('Typed data signing is not supported for Solana');
|
|
317
317
|
}
|
|
318
|
+
if (signAuthorization && isSolana) {
|
|
319
|
+
throw new Error('EIP-7702 authorization is not supported for Solana');
|
|
320
|
+
}
|
|
318
321
|
return {
|
|
319
322
|
signerId: 'CustomGeneratedSigner',
|
|
320
323
|
account,
|
|
321
324
|
signMessage,
|
|
322
325
|
signAndSendTransaction,
|
|
323
326
|
signTypedData,
|
|
327
|
+
signAuthorization,
|
|
324
328
|
};
|
|
325
329
|
}
|
|
326
330
|
function toUniversal(signer) {
|