@portal-hq/utils 4.5.1 → 4.7.0

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.
@@ -26,6 +26,9 @@ exports.EVM_CHAIN_IDS = {
26
26
  OPTIMISM_MAINNET: 'eip155:10',
27
27
  ARBITRUM_MAINNET: 'eip155:42161',
28
28
  AVALANCHE_MAINNET: 'eip155:43114',
29
+ MONAD_MAINNET: 'eip155:143',
30
+ MONAD_TESTNET: 'eip155:10143',
31
+ BSC_MAINNET: 'eip155:56',
29
32
  };
30
33
  exports.SOLANA_CHAIN_IDS = {
31
34
  SOLANA_MAINNET: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
@@ -48,6 +51,9 @@ exports.FRIENDLY_CHAIN_NAME_TO_CAIP2 = {
48
51
  optimism: exports.EVM_CHAIN_IDS.OPTIMISM_MAINNET,
49
52
  arbitrum: exports.EVM_CHAIN_IDS.ARBITRUM_MAINNET,
50
53
  avalanche: exports.EVM_CHAIN_IDS.AVALANCHE_MAINNET,
54
+ monad: exports.EVM_CHAIN_IDS.MONAD_MAINNET,
55
+ 'monad-testnet': exports.EVM_CHAIN_IDS.MONAD_TESTNET,
56
+ bsc: exports.EVM_CHAIN_IDS.BSC_MAINNET,
51
57
  // Solana chains
52
58
  solana: exports.SOLANA_CHAIN_IDS.SOLANA_MAINNET,
53
59
  'solana-devnet': exports.SOLANA_CHAIN_IDS.SOLANA_DEVNET,
@@ -19,6 +19,7 @@ var PortalRequestMethod;
19
19
  PortalRequestMethod["EthSendRawTransaction"] = "eth_sendRawTransaction";
20
20
  PortalRequestMethod["EthSign"] = "eth_sign";
21
21
  PortalRequestMethod["EthSignTransaction"] = "eth_signTransaction";
22
+ PortalRequestMethod["EthSignUserOperation"] = "eth_signUserOperation";
22
23
  PortalRequestMethod["EthSignTypedDataV3"] = "eth_signTypedData_v3";
23
24
  PortalRequestMethod["EthSignTypedDataV4"] = "eth_signTypedData_v4";
24
25
  PortalRequestMethod["PersonalSign"] = "personal_sign";
@@ -77,6 +77,12 @@ const parseRequest = (method, params) => __awaiter(void 0, void 0, void 0, funct
77
77
  data: requestData,
78
78
  };
79
79
  }
80
+ case 'eth_signUserOperation': {
81
+ return {
82
+ method,
83
+ data: txParam0,
84
+ };
85
+ }
80
86
  case 'eth_sign':
81
87
  case 'personal_sign':
82
88
  case 'eth_signTypedData_v3':
@@ -19,6 +19,7 @@ var Events;
19
19
  Events["GetSigningShareMetadata"] = "Get Signing Share Metadata";
20
20
  Events["GetSources"] = "Get Sources";
21
21
  Events["GetTransactions"] = "Get Transactions";
22
+ Events["GetTransactionHistory"] = "Get Transaction History";
22
23
  Events["PrepareClientEject"] = "Prepare Client Eject";
23
24
  Events["SimulateTransaction"] = "Simulate Transaction";
24
25
  Events["EvaluateTransaction"] = "Evaluate Transaction";
@@ -62,5 +63,14 @@ var Events;
62
63
  Events["EvmAccountType7702BuildAuthorizationList"] = "Evm Account Type 7702 BuildAuthorizationList";
63
64
  Events["EvmAccountType7702BuildUpgradeTx"] = "Evm Account Type 7702 BuildUpgradeTx";
64
65
  Events["EvmAccountType7702Upgrade"] = "Evm Account Type 7702 Upgrade";
66
+ Events["NoahInitiateKyc"] = "Noah Initiate KYC";
67
+ Events["NoahInitiatePayin"] = "Noah Initiate Payin";
68
+ Events["NoahSimulatePayin"] = "Noah Simulate Payin";
69
+ Events["NoahGetPayoutCountries"] = "Noah Get Payout Countries";
70
+ Events["NoahGetPayoutChannels"] = "Noah Get Payout Channels";
71
+ Events["NoahGetPayoutChannelForm"] = "Noah Get Payout Channel Form";
72
+ Events["NoahGetPayoutQuote"] = "Noah Get Payout Quote";
73
+ Events["NoahInitiatePayout"] = "Noah Initiate Payout";
74
+ Events["NoahGetPaymentMethods"] = "Noah Get Payment Methods";
65
75
  })(Events || (Events = {}));
66
76
  exports.default = Events;
@@ -1 +1 @@
1
- { "version": "4.5.1" }
1
+ { "version": "4.7.0" }
@@ -23,6 +23,9 @@ export const EVM_CHAIN_IDS = {
23
23
  OPTIMISM_MAINNET: 'eip155:10',
24
24
  ARBITRUM_MAINNET: 'eip155:42161',
25
25
  AVALANCHE_MAINNET: 'eip155:43114',
26
+ MONAD_MAINNET: 'eip155:143',
27
+ MONAD_TESTNET: 'eip155:10143',
28
+ BSC_MAINNET: 'eip155:56',
26
29
  };
27
30
  export const SOLANA_CHAIN_IDS = {
28
31
  SOLANA_MAINNET: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
@@ -45,6 +48,9 @@ export const FRIENDLY_CHAIN_NAME_TO_CAIP2 = {
45
48
  optimism: EVM_CHAIN_IDS.OPTIMISM_MAINNET,
46
49
  arbitrum: EVM_CHAIN_IDS.ARBITRUM_MAINNET,
47
50
  avalanche: EVM_CHAIN_IDS.AVALANCHE_MAINNET,
51
+ monad: EVM_CHAIN_IDS.MONAD_MAINNET,
52
+ 'monad-testnet': EVM_CHAIN_IDS.MONAD_TESTNET,
53
+ bsc: EVM_CHAIN_IDS.BSC_MAINNET,
48
54
  // Solana chains
49
55
  solana: SOLANA_CHAIN_IDS.SOLANA_MAINNET,
50
56
  'solana-devnet': SOLANA_CHAIN_IDS.SOLANA_DEVNET,
@@ -16,6 +16,7 @@ export var PortalRequestMethod;
16
16
  PortalRequestMethod["EthSendRawTransaction"] = "eth_sendRawTransaction";
17
17
  PortalRequestMethod["EthSign"] = "eth_sign";
18
18
  PortalRequestMethod["EthSignTransaction"] = "eth_signTransaction";
19
+ PortalRequestMethod["EthSignUserOperation"] = "eth_signUserOperation";
19
20
  PortalRequestMethod["EthSignTypedDataV3"] = "eth_signTypedData_v3";
20
21
  PortalRequestMethod["EthSignTypedDataV4"] = "eth_signTypedData_v4";
21
22
  PortalRequestMethod["PersonalSign"] = "personal_sign";
@@ -70,6 +70,12 @@ export const parseRequest = (method, params) => __awaiter(void 0, void 0, void 0
70
70
  data: requestData,
71
71
  };
72
72
  }
73
+ case 'eth_signUserOperation': {
74
+ return {
75
+ method,
76
+ data: txParam0,
77
+ };
78
+ }
73
79
  case 'eth_sign':
74
80
  case 'personal_sign':
75
81
  case 'eth_signTypedData_v3':
@@ -17,6 +17,7 @@ var Events;
17
17
  Events["GetSigningShareMetadata"] = "Get Signing Share Metadata";
18
18
  Events["GetSources"] = "Get Sources";
19
19
  Events["GetTransactions"] = "Get Transactions";
20
+ Events["GetTransactionHistory"] = "Get Transaction History";
20
21
  Events["PrepareClientEject"] = "Prepare Client Eject";
21
22
  Events["SimulateTransaction"] = "Simulate Transaction";
22
23
  Events["EvaluateTransaction"] = "Evaluate Transaction";
@@ -60,5 +61,14 @@ var Events;
60
61
  Events["EvmAccountType7702BuildAuthorizationList"] = "Evm Account Type 7702 BuildAuthorizationList";
61
62
  Events["EvmAccountType7702BuildUpgradeTx"] = "Evm Account Type 7702 BuildUpgradeTx";
62
63
  Events["EvmAccountType7702Upgrade"] = "Evm Account Type 7702 Upgrade";
64
+ Events["NoahInitiateKyc"] = "Noah Initiate KYC";
65
+ Events["NoahInitiatePayin"] = "Noah Initiate Payin";
66
+ Events["NoahSimulatePayin"] = "Noah Simulate Payin";
67
+ Events["NoahGetPayoutCountries"] = "Noah Get Payout Countries";
68
+ Events["NoahGetPayoutChannels"] = "Noah Get Payout Channels";
69
+ Events["NoahGetPayoutChannelForm"] = "Noah Get Payout Channel Form";
70
+ Events["NoahGetPayoutQuote"] = "Noah Get Payout Quote";
71
+ Events["NoahInitiatePayout"] = "Noah Initiate Payout";
72
+ Events["NoahGetPaymentMethods"] = "Noah Get Payment Methods";
63
73
  })(Events || (Events = {}));
64
74
  export default Events;
@@ -1 +1 @@
1
- { "version": "4.5.1" }
1
+ { "version": "4.7.0" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/utils",
3
- "version": "4.5.1",
3
+ "version": "4.7.0",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
@@ -26,5 +26,5 @@
26
26
  "ts-jest": "^29.0.3",
27
27
  "typescript": "^4.8.4"
28
28
  },
29
- "gitHead": "7f010a0c86c95b2d28daa1b6640519bb9a22920a"
29
+ "gitHead": "3125e96a72c384e33229138b63ff3791818b0833"
30
30
  }
@@ -28,6 +28,9 @@ export const EVM_CHAIN_IDS = {
28
28
  OPTIMISM_MAINNET: 'eip155:10',
29
29
  ARBITRUM_MAINNET: 'eip155:42161',
30
30
  AVALANCHE_MAINNET: 'eip155:43114',
31
+ MONAD_MAINNET: 'eip155:143',
32
+ MONAD_TESTNET: 'eip155:10143',
33
+ BSC_MAINNET: 'eip155:56',
31
34
  } as const
32
35
 
33
36
  export const SOLANA_CHAIN_IDS = {
@@ -58,6 +61,9 @@ export const FRIENDLY_CHAIN_NAME_TO_CAIP2 = {
58
61
  optimism: EVM_CHAIN_IDS.OPTIMISM_MAINNET,
59
62
  arbitrum: EVM_CHAIN_IDS.ARBITRUM_MAINNET,
60
63
  avalanche: EVM_CHAIN_IDS.AVALANCHE_MAINNET,
64
+ monad: EVM_CHAIN_IDS.MONAD_MAINNET,
65
+ 'monad-testnet': EVM_CHAIN_IDS.MONAD_TESTNET,
66
+ bsc: EVM_CHAIN_IDS.BSC_MAINNET,
61
67
  // Solana chains
62
68
  solana: SOLANA_CHAIN_IDS.SOLANA_MAINNET,
63
69
  'solana-devnet': SOLANA_CHAIN_IDS.SOLANA_DEVNET,
@@ -1,31 +1,34 @@
1
1
  import PortalConnect from '@portal-hq/connect'
2
+ import { BackupMethodsUpperCase } from '@portal-hq/core/src/mpc'
2
3
  import {
4
+ AssetsResponse,
5
+ BroadcastBitcoinP2wpkhTransactionResponse,
6
+ BroadcastParam,
7
+ BuildBitcoinP2wpkhTransactionResponse,
3
8
  BuildEip155TransactionResponse,
4
9
  BuildSolanaTransactionResponse,
5
- BuildBitcoinP2wpkhTransactionResponse,
6
- BroadcastParam,
7
- BroadcastBitcoinP2wpkhTransactionResponse,
8
10
  FundParams,
9
11
  FundResponse,
10
- YieldXyzGetYieldsRequest,
11
- YieldXyzGetYieldsResponse,
12
12
  YieldXyzEnterRequest,
13
13
  YieldXyzEnterYieldResponse,
14
14
  YieldXyzExitRequest,
15
15
  YieldXyzExitResponse,
16
- YieldXyzManageYieldRequest,
17
- YieldXyzManageYieldResponse,
18
16
  YieldXyzGetBalancesRequest,
19
17
  YieldXyzGetBalancesResponse,
20
18
  YieldXyzGetHistoricalActionsRequest,
21
19
  YieldXyzGetHistoricalActionsResponse,
20
+ YieldXyzGetTransactionResponse,
21
+ YieldXyzGetYieldDefaultsRequest,
22
+ YieldXyzGetYieldDefaultsResponse,
23
+ YieldXyzGetYieldValidatorsResponse,
24
+ YieldXyzGetYieldsRequest,
25
+ YieldXyzGetYieldsResponse,
26
+ YieldXyzManageYieldRequest,
27
+ YieldXyzManageYieldResponse,
22
28
  YieldXyzTrackTransactionRequest,
23
29
  YieldXyzTrackTransactionResponse,
24
- YieldXyzGetTransactionResponse,
25
- AssetsResponse,
26
30
  } from '@portal-hq/core/types'
27
31
 
28
- import { EvaluateTransactionOperationType } from '../types'
29
32
  import type {
30
33
  AddressesByNamespace,
31
34
  BackupSharePairMetadata,
@@ -35,6 +38,8 @@ import type {
35
38
  Dapp,
36
39
  EvaluateTransactionParam,
37
40
  GenerateResponse,
41
+ GetTransactionHistoryParams,
42
+ GetTransactionHistoryResponse,
38
43
  GetTransactionsOrder,
39
44
  NFT,
40
45
  Network,
@@ -51,7 +56,7 @@ import type {
51
56
  } from '../../types'
52
57
  import PortalRequests from '../PortalRequests'
53
58
  import { HttpRequester } from '../requesters'
54
- import { BackupMethodsUpperCase } from '@portal-hq/core/src/mpc'
59
+ import { EvaluateTransactionOperationType } from '../types'
55
60
 
56
61
  export type EventHandler = (data: any) => void
57
62
 
@@ -99,6 +104,7 @@ export enum PortalRequestMethod {
99
104
  EthSendRawTransaction = 'eth_sendRawTransaction',
100
105
  EthSign = 'eth_sign',
101
106
  EthSignTransaction = 'eth_signTransaction',
107
+ EthSignUserOperation = 'eth_signUserOperation',
102
108
  EthSignTypedDataV3 = 'eth_signTypedData_v3',
103
109
  EthSignTypedDataV4 = 'eth_signTypedData_v4',
104
110
  PersonalSign = 'personal_sign',
@@ -247,6 +253,10 @@ export interface IPortalApi {
247
253
  order?: GetTransactionsOrder,
248
254
  traceId?: string,
249
255
  ): Promise<Transaction[]>
256
+ getTransactionHistory(
257
+ params: GetTransactionHistoryParams,
258
+ traceId?: string,
259
+ ): Promise<GetTransactionHistoryResponse>
250
260
  prepareClientEject(
251
261
  walletId: string,
252
262
  backupMethod: BackupMethodsUpperCase,
@@ -276,6 +286,7 @@ export interface IPortalApi {
276
286
  | 'ICLOUD'
277
287
  | 'PASSKEY'
278
288
  | 'PASSWORD'
289
+ | 'FIREBASE'
279
290
  | 'UNKNOWN',
280
291
  ): Promise<void>
281
292
  storedClientBackupShareKey(
@@ -284,6 +295,7 @@ export interface IPortalApi {
284
295
  | 'CUSTOM'
285
296
  | 'GDRIVE'
286
297
  | 'ICLOUD'
298
+ | 'FIREBASE'
287
299
  | 'PASSKEY'
288
300
  | 'PASSWORD'
289
301
  | 'UNKNOWN',
@@ -314,6 +326,12 @@ export interface IPortalApi {
314
326
  submitTransactionHash(
315
327
  request: YieldXyzTrackTransactionRequest,
316
328
  ): Promise<YieldXyzTrackTransactionResponse>
329
+ getYieldDefaults(
330
+ request?: YieldXyzGetYieldDefaultsRequest,
331
+ ): Promise<YieldXyzGetYieldDefaultsResponse>
332
+ getYieldValidators(
333
+ yieldId: string,
334
+ ): Promise<YieldXyzGetYieldValidatorsResponse>
317
335
  getAssets(chainId: string): Promise<AssetsResponse>
318
336
  buildBitcoinP2wpkhTransaction(
319
337
  chainId: string,
@@ -543,3 +561,10 @@ export class PasswordStorage implements Storage {
543
561
  })
544
562
  }
545
563
  }
564
+ export type BackupMethod =
565
+ | 'PASSWORD'
566
+ | 'PASSKEY'
567
+ | 'GDRIVE'
568
+ | 'ICLOUD'
569
+ | 'CUSTOM'
570
+ | 'FIREBASE'
@@ -3,6 +3,7 @@ import {
3
3
  type OutgoingRequest,
4
4
  type OutgoingRequestData,
5
5
  type SignableTransactionData,
6
+ type UserOperation,
6
7
  } from '../../types'
7
8
  import { convert } from '../currency'
8
9
 
@@ -95,6 +96,12 @@ export const parseRequest = async (
95
96
  data: requestData,
96
97
  }
97
98
  }
99
+ case 'eth_signUserOperation': {
100
+ return {
101
+ method,
102
+ data: txParam0 as UserOperation,
103
+ }
104
+ }
98
105
  case 'eth_sign':
99
106
  case 'personal_sign':
100
107
  case 'eth_signTypedData_v3':
@@ -17,6 +17,7 @@ enum Events {
17
17
  GetSigningShareMetadata = 'Get Signing Share Metadata',
18
18
  GetSources = 'Get Sources',
19
19
  GetTransactions = 'Get Transactions',
20
+ GetTransactionHistory = 'Get Transaction History',
20
21
  PrepareClientEject = 'Prepare Client Eject',
21
22
  SimulateTransaction = 'Simulate Transaction',
22
23
  EvaluateTransaction = 'Evaluate Transaction',
@@ -65,6 +66,16 @@ enum Events {
65
66
  EvmAccountType7702BuildAuthorizationList = 'Evm Account Type 7702 BuildAuthorizationList',
66
67
  EvmAccountType7702BuildUpgradeTx = 'Evm Account Type 7702 BuildUpgradeTx',
67
68
  EvmAccountType7702Upgrade = 'Evm Account Type 7702 Upgrade',
69
+
70
+ NoahInitiateKyc = 'Noah Initiate KYC',
71
+ NoahInitiatePayin = 'Noah Initiate Payin',
72
+ NoahSimulatePayin = 'Noah Simulate Payin',
73
+ NoahGetPayoutCountries = 'Noah Get Payout Countries',
74
+ NoahGetPayoutChannels = 'Noah Get Payout Channels',
75
+ NoahGetPayoutChannelForm = 'Noah Get Payout Channel Form',
76
+ NoahGetPayoutQuote = 'Noah Get Payout Quote',
77
+ NoahInitiatePayout = 'Noah Initiate Payout',
78
+ NoahGetPaymentMethods = 'Noah Get Payment Methods',
68
79
  }
69
80
 
70
81
  export default Events
package/src/index.ts CHANGED
@@ -91,6 +91,8 @@ export type {
91
91
  DappOnNetwork,
92
92
  DkgData,
93
93
  EvaluateTransactionParam,
94
+ GetTransactionHistoryParams,
95
+ GetTransactionHistoryResponse,
94
96
  GetTransactionsOrder,
95
97
  HttpOptions,
96
98
  HttpRequestOptions,
@@ -105,6 +107,9 @@ export type {
105
107
  SignableTransactionData,
106
108
  SigningRequestArguments,
107
109
  SigningResponse,
110
+ SolanaTransactionDetails,
108
111
  Transaction,
112
+ TransactionHistoryItem,
113
+ UserOperation,
109
114
  Shares,
110
115
  } from '../types'
@@ -1 +1 @@
1
- { "version": "4.5.1" }
1
+ { "version": "4.7.0" }
package/types.d.ts CHANGED
@@ -7,7 +7,10 @@ import {
7
7
 
8
8
  import { MpcStatuses } from './src/definitions'
9
9
 
10
- export type OutgoingRequestData = MessageData | SignableTransactionData
10
+ export type OutgoingRequestData =
11
+ | MessageData
12
+ | SignableTransactionData
13
+ | UserOperation
11
14
 
12
15
  export type ProgressCallback = (status: MpcStatus) => void | Promise<void>
13
16
 
@@ -320,6 +323,7 @@ export enum GetTransactionsOrder {
320
323
  DESC = 'desc',
321
324
  }
322
325
 
326
+ /** @deprecated Use TransactionHistoryItem instead */
323
327
  export interface Transaction {
324
328
  asset: string
325
329
  blockNum: string
@@ -343,6 +347,198 @@ export interface Transaction {
343
347
  value: number
344
348
  }
345
349
 
350
+ export type SolanaError =
351
+ | string
352
+ | {
353
+ code?: string | number
354
+ message?: string
355
+ data?: unknown
356
+ }
357
+ | null
358
+
359
+ export interface SolanaTransactionInstruction {
360
+ accounts: number[]
361
+ data: string
362
+ programIdIndex: number
363
+ stackHeight?: number
364
+ parsed?: unknown
365
+ program?: string
366
+ programId?: string
367
+ }
368
+
369
+ export interface SolanaTokenBalance {
370
+ accountIndex: number
371
+ mint: string
372
+ owner?: string
373
+ programId?: string
374
+ uiTokenAmount?: {
375
+ amount: string
376
+ decimals: number
377
+ uiAmount: number | null
378
+ uiAmountString: string
379
+ }
380
+ }
381
+
382
+ export interface SolanaInnerInstruction {
383
+ index: number
384
+ instructions: Array<{
385
+ accounts: number[]
386
+ data: string
387
+ programIdIndex: number
388
+ parsed?: unknown
389
+ }>
390
+ }
391
+
392
+ export interface SolanaReward {
393
+ pubkey: string
394
+ lamports: number
395
+ postBalance: number
396
+ rewardType: string | null
397
+ commission: number | null
398
+ }
399
+
400
+ interface BaseTransactionHistoryItem {
401
+ hash: string
402
+ from: string
403
+ to: string | null
404
+ value: string
405
+ blockNumber: string | null
406
+ blockTimestamp: number | null
407
+ status: string | null
408
+ chainId: string
409
+ }
410
+
411
+ export interface RegularTransaction extends BaseTransactionHistoryItem {
412
+ type: 'transaction'
413
+ asset?: string
414
+ tokenAddress?: string
415
+ tokenDecimals?: number
416
+ userOpHash?: never
417
+ entryPoint?: never
418
+ actualGasCost?: never
419
+ actualGasUsed?: never
420
+ }
421
+
422
+ export interface UserOperation {
423
+ sender: string
424
+ nonce: string
425
+ initCode: string
426
+ callData: string
427
+ callGasLimit: string
428
+ verificationGasLimit: string
429
+ preVerificationGas: string
430
+ maxFeePerGas: string
431
+ maxPriorityFeePerGas: string
432
+ paymasterAndData: string
433
+ signature: string
434
+ }
435
+
436
+ export interface UserOperationTransaction extends BaseTransactionHistoryItem {
437
+ type: 'userOperation'
438
+ to: null
439
+ value: '0'
440
+ userOpHash: string
441
+ entryPoint: string
442
+ actualGasCost?: string
443
+ actualGasUsed?: string
444
+ asset?: never
445
+ tokenAddress?: never
446
+ tokenDecimals?: never
447
+ }
448
+
449
+ export type TransactionHistoryItem =
450
+ | RegularTransaction
451
+ | UserOperationTransaction
452
+
453
+ export interface SolanaTransactionDetails {
454
+ blockTime: number
455
+ error: SolanaError
456
+ signature: string
457
+ status: string
458
+ tokenMint: string | null
459
+ transactionDetails: {
460
+ transaction: {
461
+ message: {
462
+ accountKeys: string[]
463
+ header: {
464
+ numRequiredSignatures: number
465
+ numReadonlySignedAccounts: number
466
+ numReadonlyUnsignedAccounts: number
467
+ }
468
+ instructions: SolanaTransactionInstruction[]
469
+ recentBlockhash: string
470
+ }
471
+ signatures: string[]
472
+ } | null
473
+ signatureDetails: {
474
+ blockTime: number
475
+ confirmationStatus: string
476
+ error: SolanaError
477
+ memo: string | null
478
+ signature: string
479
+ slot: number
480
+ } | null
481
+ metadata: {
482
+ blockTime: number | null
483
+ slot: number | null
484
+ error: SolanaError
485
+ fee: number | null
486
+ innerInstructions?: SolanaInnerInstruction[] | null
487
+ loadedAddresses?: {
488
+ readonly: string[]
489
+ writable: string[]
490
+ } | null
491
+ logMessages: string[] | null
492
+ postBalances: number[] | null
493
+ postTokenBalances?: SolanaTokenBalance[] | null
494
+ preBalances: number[] | null
495
+ preTokenBalances?: SolanaTokenBalance[] | null
496
+ rewards?: SolanaReward[] | null
497
+ status: {
498
+ Ok?: null | unknown
499
+ Err?: unknown
500
+ } | null
501
+ version: 'legacy' | number | null
502
+ } | null
503
+ } | null
504
+ }
505
+
506
+ export interface GetTransactionHistoryParams {
507
+ chainId: string
508
+ limit?: number
509
+ offset?: number
510
+ order?: 'asc' | 'desc'
511
+ address?: string
512
+ userOperations?: 'include' | 'only' | 'exclude'
513
+ }
514
+
515
+ export interface GetTransactionHistoryMetadata {
516
+ address: string
517
+ chainId: string
518
+ clientId: string
519
+ limit: number
520
+ offset: number
521
+ count: number
522
+ }
523
+
524
+ export interface SolanaTransactionsResponse {
525
+ data: {
526
+ transactions: SolanaTransactionDetails[]
527
+ }
528
+ metadata: GetTransactionHistoryMetadata
529
+ }
530
+
531
+ export interface UnifiedTransactionsResponse {
532
+ data: {
533
+ transactions: TransactionHistoryItem[]
534
+ }
535
+ metadata: GetTransactionHistoryMetadata
536
+ }
537
+
538
+ export type GetTransactionHistoryResponse =
539
+ | SolanaTransactionsResponse
540
+ | UnifiedTransactionsResponse
541
+
346
542
  export interface SimulateTransactionParam {
347
543
  to: string
348
544
  value?: string