@ledgerhq/coin-hedera 1.15.0-nightly.20251126023856 → 1.15.0-nightly.20251127023715
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 +10 -8
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +6 -2
- package/lib/api/index.js.map +1 -1
- package/lib/bridge/broadcast.js +1 -1
- package/lib/bridge/broadcast.js.map +1 -1
- package/lib/bridge/buildOptimisticOperation.d.ts.map +1 -1
- package/lib/bridge/buildOptimisticOperation.js +80 -15
- package/lib/bridge/buildOptimisticOperation.js.map +1 -1
- package/lib/bridge/estimateMaxSpendable.js +5 -2
- package/lib/bridge/estimateMaxSpendable.js.map +1 -1
- package/lib/bridge/getTransactionStatus.d.ts.map +1 -1
- package/lib/bridge/getTransactionStatus.js +70 -13
- package/lib/bridge/getTransactionStatus.js.map +1 -1
- package/lib/bridge/index.js +1 -1
- package/lib/bridge/index.js.map +1 -1
- package/lib/bridge/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/prepareTransaction.js +40 -7
- package/lib/bridge/prepareTransaction.js.map +1 -1
- package/lib/bridge/signOperation.d.ts.map +1 -1
- package/lib/bridge/signOperation.js +19 -2
- package/lib/bridge/signOperation.js.map +1 -1
- package/lib/bridge/synchronisation.d.ts +2 -0
- package/lib/bridge/synchronisation.d.ts.map +1 -1
- package/lib/bridge/synchronisation.js +101 -30
- package/lib/bridge/synchronisation.js.map +1 -1
- package/lib/bridge/utils.d.ts +35 -2
- package/lib/bridge/utils.d.ts.map +1 -1
- package/lib/bridge/utils.js +215 -16
- package/lib/bridge/utils.js.map +1 -1
- package/lib/constants.d.ts +22 -2
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +42 -2
- package/lib/constants.js.map +1 -1
- package/lib/deviceTransactionConfig.d.ts +1 -1
- package/lib/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/deviceTransactionConfig.js +8 -0
- package/lib/deviceTransactionConfig.js.map +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +2 -1
- package/lib/errors.js.map +1 -1
- package/lib/logic/craftTransaction.d.ts +4 -4
- package/lib/logic/craftTransaction.d.ts.map +1 -1
- package/lib/logic/craftTransaction.js +46 -5
- package/lib/logic/craftTransaction.js.map +1 -1
- package/lib/logic/estimateFees.d.ts +2 -4
- package/lib/logic/estimateFees.d.ts.map +1 -1
- package/lib/logic/estimateFees.js +45 -5
- package/lib/logic/estimateFees.js.map +1 -1
- package/lib/logic/listOperations.d.ts.map +1 -1
- package/lib/logic/listOperations.js +7 -3
- package/lib/logic/listOperations.js.map +1 -1
- package/lib/logic/utils.d.ts +24 -2
- package/lib/logic/utils.d.ts.map +1 -1
- package/lib/logic/utils.js +66 -13
- package/lib/logic/utils.js.map +1 -1
- package/lib/network/api.d.ts +12 -1
- package/lib/network/api.d.ts.map +1 -1
- package/lib/network/api.js +91 -19
- package/lib/network/api.js.map +1 -1
- package/lib/network/rpc.d.ts.map +1 -1
- package/lib/network/rpc.js +1 -0
- package/lib/network/rpc.js.map +1 -1
- package/lib/network/thirdweb.d.ts +21 -0
- package/lib/network/thirdweb.d.ts.map +1 -0
- package/lib/network/thirdweb.js +72 -0
- package/lib/network/thirdweb.js.map +1 -0
- package/lib/network/utils.d.ts +4 -1
- package/lib/network/utils.d.ts.map +1 -1
- package/lib/network/utils.js +53 -1
- package/lib/network/utils.js.map +1 -1
- package/lib/test/bridgeDatasetTest.d.ts.map +1 -1
- package/lib/test/bridgeDatasetTest.js +4 -4
- package/lib/test/bridgeDatasetTest.js.map +1 -1
- package/lib/test/fixtures/account.fixture.js +1 -1
- package/lib/test/fixtures/account.fixture.js.map +1 -1
- package/lib/test/fixtures/common.fixture.d.ts +12 -0
- package/lib/test/fixtures/common.fixture.d.ts.map +1 -0
- package/lib/test/fixtures/common.fixture.js +66 -0
- package/lib/test/fixtures/common.fixture.js.map +1 -0
- package/lib/test/fixtures/currency.fixture.d.ts +3 -1
- package/lib/test/fixtures/currency.fixture.d.ts.map +1 -1
- package/lib/test/fixtures/currency.fixture.js +63 -16
- package/lib/test/fixtures/currency.fixture.js.map +1 -1
- package/lib/test/fixtures/mirror.fixture.d.ts +3 -1
- package/lib/test/fixtures/mirror.fixture.d.ts.map +1 -1
- package/lib/test/fixtures/mirror.fixture.js +12 -1
- package/lib/test/fixtures/mirror.fixture.js.map +1 -1
- package/lib/test/fixtures/thirdweb.fixture.d.ts +3 -0
- package/lib/test/fixtures/thirdweb.fixture.d.ts.map +1 -0
- package/lib/test/fixtures/thirdweb.fixture.js +34 -0
- package/lib/test/fixtures/thirdweb.fixture.js.map +1 -0
- package/lib/transaction.d.ts.map +1 -1
- package/lib/transaction.js +2 -0
- package/lib/transaction.js.map +1 -1
- package/lib/types/alpaca.d.ts +5 -1
- package/lib/types/alpaca.d.ts.map +1 -1
- package/lib/types/bridge.d.ts +6 -1
- package/lib/types/bridge.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/logic.d.ts +39 -0
- package/lib/types/logic.d.ts.map +1 -0
- package/lib/types/logic.js +3 -0
- package/lib/types/logic.js.map +1 -0
- package/lib/types/mirror.d.ts +29 -0
- package/lib/types/mirror.d.ts.map +1 -1
- package/lib/types/thirdweb.d.ts +34 -0
- package/lib/types/thirdweb.d.ts.map +1 -0
- package/lib/types/thirdweb.js +3 -0
- package/lib/types/thirdweb.js.map +1 -0
- package/lib-es/api/index.d.ts.map +1 -1
- package/lib-es/api/index.js +7 -3
- package/lib-es/api/index.js.map +1 -1
- package/lib-es/bridge/broadcast.js +2 -2
- package/lib-es/bridge/broadcast.js.map +1 -1
- package/lib-es/bridge/buildOptimisticOperation.d.ts.map +1 -1
- package/lib-es/bridge/buildOptimisticOperation.js +83 -18
- package/lib-es/bridge/buildOptimisticOperation.js.map +1 -1
- package/lib-es/bridge/estimateMaxSpendable.js +5 -2
- package/lib-es/bridge/estimateMaxSpendable.js.map +1 -1
- package/lib-es/bridge/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/bridge/getTransactionStatus.js +73 -16
- package/lib-es/bridge/getTransactionStatus.js.map +1 -1
- package/lib-es/bridge/index.js +2 -2
- package/lib-es/bridge/index.js.map +1 -1
- package/lib-es/bridge/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/prepareTransaction.js +42 -9
- package/lib-es/bridge/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/signOperation.d.ts.map +1 -1
- package/lib-es/bridge/signOperation.js +21 -4
- package/lib-es/bridge/signOperation.js.map +1 -1
- package/lib-es/bridge/synchronisation.d.ts +2 -0
- package/lib-es/bridge/synchronisation.d.ts.map +1 -1
- package/lib-es/bridge/synchronisation.js +97 -27
- package/lib-es/bridge/synchronisation.js.map +1 -1
- package/lib-es/bridge/utils.d.ts +35 -2
- package/lib-es/bridge/utils.d.ts.map +1 -1
- package/lib-es/bridge/utils.js +211 -16
- package/lib-es/bridge/utils.js.map +1 -1
- package/lib-es/constants.d.ts +22 -2
- package/lib-es/constants.d.ts.map +1 -1
- package/lib-es/constants.js +38 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/deviceTransactionConfig.d.ts +1 -1
- package/lib-es/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/deviceTransactionConfig.js +8 -0
- package/lib-es/deviceTransactionConfig.js.map +1 -1
- package/lib-es/errors.d.ts +3 -0
- package/lib-es/errors.d.ts.map +1 -1
- package/lib-es/errors.js +1 -0
- package/lib-es/errors.js.map +1 -1
- package/lib-es/logic/craftTransaction.d.ts +4 -4
- package/lib-es/logic/craftTransaction.d.ts.map +1 -1
- package/lib-es/logic/craftTransaction.js +48 -7
- package/lib-es/logic/craftTransaction.js.map +1 -1
- package/lib-es/logic/estimateFees.d.ts +2 -4
- package/lib-es/logic/estimateFees.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.js +47 -7
- package/lib-es/logic/estimateFees.js.map +1 -1
- package/lib-es/logic/listOperations.d.ts.map +1 -1
- package/lib-es/logic/listOperations.js +7 -3
- package/lib-es/logic/listOperations.js.map +1 -1
- package/lib-es/logic/utils.d.ts +24 -2
- package/lib-es/logic/utils.d.ts.map +1 -1
- package/lib-es/logic/utils.js +63 -13
- package/lib-es/logic/utils.js.map +1 -1
- package/lib-es/network/api.d.ts +12 -1
- package/lib-es/network/api.d.ts.map +1 -1
- package/lib-es/network/api.js +91 -19
- package/lib-es/network/api.js.map +1 -1
- package/lib-es/network/rpc.d.ts.map +1 -1
- package/lib-es/network/rpc.js +1 -0
- package/lib-es/network/rpc.js.map +1 -1
- package/lib-es/network/thirdweb.d.ts +21 -0
- package/lib-es/network/thirdweb.d.ts.map +1 -0
- package/lib-es/network/thirdweb.js +66 -0
- package/lib-es/network/thirdweb.js.map +1 -0
- package/lib-es/network/utils.d.ts +4 -1
- package/lib-es/network/utils.d.ts.map +1 -1
- package/lib-es/network/utils.js +49 -0
- package/lib-es/network/utils.js.map +1 -1
- package/lib-es/test/bridgeDatasetTest.d.ts.map +1 -1
- package/lib-es/test/bridgeDatasetTest.js +4 -4
- package/lib-es/test/bridgeDatasetTest.js.map +1 -1
- package/lib-es/test/fixtures/account.fixture.js +2 -2
- package/lib-es/test/fixtures/account.fixture.js.map +1 -1
- package/lib-es/test/fixtures/common.fixture.d.ts +12 -0
- package/lib-es/test/fixtures/common.fixture.d.ts.map +1 -0
- package/lib-es/test/fixtures/common.fixture.js +57 -0
- package/lib-es/test/fixtures/common.fixture.js.map +1 -0
- package/lib-es/test/fixtures/currency.fixture.d.ts +3 -1
- package/lib-es/test/fixtures/currency.fixture.d.ts.map +1 -1
- package/lib-es/test/fixtures/currency.fixture.js +59 -14
- package/lib-es/test/fixtures/currency.fixture.js.map +1 -1
- package/lib-es/test/fixtures/mirror.fixture.d.ts +3 -1
- package/lib-es/test/fixtures/mirror.fixture.d.ts.map +1 -1
- package/lib-es/test/fixtures/mirror.fixture.js +9 -0
- package/lib-es/test/fixtures/mirror.fixture.js.map +1 -1
- package/lib-es/test/fixtures/thirdweb.fixture.d.ts +3 -0
- package/lib-es/test/fixtures/thirdweb.fixture.d.ts.map +1 -0
- package/lib-es/test/fixtures/thirdweb.fixture.js +30 -0
- package/lib-es/test/fixtures/thirdweb.fixture.js.map +1 -0
- package/lib-es/transaction.d.ts.map +1 -1
- package/lib-es/transaction.js +2 -0
- package/lib-es/transaction.js.map +1 -1
- package/lib-es/types/alpaca.d.ts +5 -1
- package/lib-es/types/alpaca.d.ts.map +1 -1
- package/lib-es/types/bridge.d.ts +6 -1
- package/lib-es/types/bridge.d.ts.map +1 -1
- package/lib-es/types/index.d.ts +2 -0
- package/lib-es/types/index.d.ts.map +1 -1
- package/lib-es/types/index.js +2 -0
- package/lib-es/types/index.js.map +1 -1
- package/lib-es/types/logic.d.ts +39 -0
- package/lib-es/types/logic.d.ts.map +1 -0
- package/lib-es/types/logic.js +2 -0
- package/lib-es/types/logic.js.map +1 -0
- package/lib-es/types/mirror.d.ts +29 -0
- package/lib-es/types/mirror.d.ts.map +1 -1
- package/lib-es/types/thirdweb.d.ts +34 -0
- package/lib-es/types/thirdweb.d.ts.map +1 -0
- package/lib-es/types/thirdweb.js +2 -0
- package/lib-es/types/thirdweb.js.map +1 -0
- package/package.json +9 -8
- package/src/api/index.integ.test.ts +11 -8
- package/src/api/index.ts +10 -3
- package/src/bridge/broadcast.ts +2 -2
- package/src/bridge/buildOptimisticOperation.integration.test.ts +70 -19
- package/src/bridge/buildOptimisticOperation.ts +98 -20
- package/src/bridge/estimateMaxSpendable.ts +5 -5
- package/src/bridge/getTransactionStatus.test.ts +57 -12
- package/src/bridge/getTransactionStatus.ts +88 -15
- package/src/bridge/index.ts +2 -2
- package/src/bridge/js-estimateMaxSpendable.integration.test.ts +12 -9
- package/src/bridge/prepareTransaction.test.ts +3 -1
- package/src/bridge/prepareTransaction.ts +45 -10
- package/src/bridge/signOperation.ts +23 -5
- package/src/bridge/synchronisation.test.ts +67 -0
- package/src/bridge/synchronisation.ts +114 -34
- package/src/bridge/utils.integration.test.ts +486 -180
- package/src/bridge/utils.test.ts +404 -0
- package/src/bridge/utils.ts +330 -27
- package/src/constants.ts +47 -2
- package/src/deviceTransactionConfig.ts +10 -1
- package/src/errors.ts +3 -0
- package/src/logic/craftTransaction.test.ts +49 -9
- package/src/logic/craftTransaction.ts +76 -11
- package/src/logic/estimateFees.test.ts +180 -31
- package/src/logic/estimateFees.ts +68 -7
- package/src/logic/getAssetFromToken.test.ts +2 -2
- package/src/logic/getBalance.test.ts +18 -57
- package/src/logic/getTokenFromAsset.test.ts +2 -2
- package/src/logic/listOperations.ts +9 -5
- package/src/logic/utils.test.ts +157 -69
- package/src/logic/utils.ts +75 -13
- package/src/network/api.test.ts +211 -3
- package/src/network/api.ts +118 -24
- package/src/network/rpc.test.ts +1 -0
- package/src/network/rpc.ts +1 -0
- package/src/network/thirdweb.test.ts +188 -0
- package/src/network/thirdweb.ts +101 -0
- package/src/network/utils.test.ts +364 -164
- package/src/network/utils.ts +83 -1
- package/src/test/bridgeDatasetTest.ts +4 -5
- package/src/test/fixtures/account.fixture.ts +2 -2
- package/src/test/fixtures/common.fixture.ts +74 -0
- package/src/test/fixtures/currency.fixture.ts +66 -14
- package/src/test/fixtures/mirror.fixture.ts +23 -1
- package/src/test/fixtures/thirdweb.fixture.ts +33 -0
- package/src/transaction.ts +2 -0
- package/src/types/alpaca.ts +8 -1
- package/src/types/bridge.ts +6 -1
- package/src/types/index.ts +2 -0
- package/src/types/logic.ts +44 -0
- package/src/types/mirror.ts +35 -0
- package/src/types/thirdweb.ts +36 -0
package/src/network/utils.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import BigNumber from "bignumber.js";
|
|
2
2
|
import { AccountId } from "@hashgraph/sdk";
|
|
3
|
+
import { getCryptoAssetsStore } from "@ledgerhq/cryptoassets/state";
|
|
3
4
|
import type { Operation, OperationType } from "@ledgerhq/types-live";
|
|
4
|
-
import
|
|
5
|
+
import { apiClient } from "./api";
|
|
6
|
+
import type {
|
|
7
|
+
HederaMirrorTokenTransfer,
|
|
8
|
+
HederaMirrorCoinTransfer,
|
|
9
|
+
HederaThirdwebTransaction,
|
|
10
|
+
HederaThirdwebDecodedTransferParams,
|
|
11
|
+
OperationERC20,
|
|
12
|
+
HederaERC20TokenBalance,
|
|
13
|
+
} from "../types";
|
|
14
|
+
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
15
|
+
import { SUPPORTED_ERC20_TOKENS } from "../constants";
|
|
5
16
|
|
|
6
17
|
function isValidRecipient(accountId: AccountId, recipients: string[]): boolean {
|
|
7
18
|
if (accountId.shard.eq(0) && accountId.realm.eq(0)) {
|
|
@@ -56,3 +67,74 @@ export function parseTransfers(
|
|
|
56
67
|
recipients,
|
|
57
68
|
};
|
|
58
69
|
}
|
|
70
|
+
|
|
71
|
+
export async function getERC20BalancesForAccount(
|
|
72
|
+
evmAccountId: string,
|
|
73
|
+
supportedTokenIds = SUPPORTED_ERC20_TOKENS.map(token => token.id),
|
|
74
|
+
): Promise<HederaERC20TokenBalance[]> {
|
|
75
|
+
const availableTokens: TokenCurrency[] = [];
|
|
76
|
+
|
|
77
|
+
for (const erc20TokenId of supportedTokenIds) {
|
|
78
|
+
const calToken = await getCryptoAssetsStore().findTokenById(erc20TokenId);
|
|
79
|
+
|
|
80
|
+
if (calToken) {
|
|
81
|
+
availableTokens.push(calToken);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const promises = availableTokens.map(async erc20token => {
|
|
86
|
+
const balance = await apiClient.getERC20Balance(evmAccountId, erc20token.contractAddress);
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
balance,
|
|
90
|
+
token: erc20token,
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const balances = await Promise.all(promises);
|
|
95
|
+
|
|
96
|
+
return balances;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const getERC20Operations = async (
|
|
100
|
+
latestERC20Transactions: HederaThirdwebTransaction[],
|
|
101
|
+
): Promise<OperationERC20[]> => {
|
|
102
|
+
const latestERC20Operations: OperationERC20[] = [];
|
|
103
|
+
|
|
104
|
+
for (const thirdwebTransaction of latestERC20Transactions) {
|
|
105
|
+
const tokenId = thirdwebTransaction.address;
|
|
106
|
+
const token = await getCryptoAssetsStore().findTokenByAddressInCurrency(tokenId, "hedera");
|
|
107
|
+
|
|
108
|
+
if (!token) continue;
|
|
109
|
+
|
|
110
|
+
const hash = thirdwebTransaction.transactionHash;
|
|
111
|
+
const contractCallResult = await apiClient.getContractCallResult(hash);
|
|
112
|
+
const mirrorTransaction = await apiClient.findTransactionByContractCall(
|
|
113
|
+
contractCallResult.timestamp,
|
|
114
|
+
contractCallResult.contract_id,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
if (!mirrorTransaction) continue;
|
|
118
|
+
|
|
119
|
+
latestERC20Operations.push({
|
|
120
|
+
thirdwebTransaction,
|
|
121
|
+
mirrorTransaction,
|
|
122
|
+
contractCallResult,
|
|
123
|
+
token,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return latestERC20Operations;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export function parseThirdwebTransactionParams(
|
|
131
|
+
transaction: HederaThirdwebTransaction,
|
|
132
|
+
): HederaThirdwebDecodedTransferParams | null {
|
|
133
|
+
const { from, to, value } = transaction.decoded.params;
|
|
134
|
+
|
|
135
|
+
if (typeof from !== "string" || typeof to !== "string" || typeof value !== "string") {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return { from, to, value };
|
|
140
|
+
}
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
InvalidAddressBecauseDestinationIsAlsoSource,
|
|
6
6
|
AmountRequired,
|
|
7
7
|
} from "@ledgerhq/errors";
|
|
8
|
-
|
|
9
8
|
import { HEDERA_TRANSACTION_MODES } from "../constants";
|
|
10
9
|
import { fromTransactionRaw } from "../transaction";
|
|
11
10
|
import type { Transaction } from "../types";
|
|
@@ -42,10 +41,10 @@ export const hedera: CurrenciesData<Transaction> = {
|
|
|
42
41
|
{
|
|
43
42
|
name: "Recipient and sender must not be the same",
|
|
44
43
|
transaction: fromTransactionRaw({
|
|
44
|
+
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
45
45
|
family: "hedera",
|
|
46
46
|
recipient: "0.0.751515",
|
|
47
47
|
amount: "100000000",
|
|
48
|
-
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
49
48
|
}),
|
|
50
49
|
expectedStatus: {
|
|
51
50
|
errors: {
|
|
@@ -57,10 +56,10 @@ export const hedera: CurrenciesData<Transaction> = {
|
|
|
57
56
|
{
|
|
58
57
|
name: "Amount Required",
|
|
59
58
|
transaction: fromTransactionRaw({
|
|
59
|
+
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
60
60
|
family: "hedera",
|
|
61
61
|
recipient: "0.0.751515",
|
|
62
62
|
amount: "0",
|
|
63
|
-
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
64
63
|
}),
|
|
65
64
|
expectedStatus: {
|
|
66
65
|
errors: {
|
|
@@ -72,10 +71,10 @@ export const hedera: CurrenciesData<Transaction> = {
|
|
|
72
71
|
{
|
|
73
72
|
name: "Not enough balance",
|
|
74
73
|
transaction: fromTransactionRaw({
|
|
74
|
+
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
75
75
|
family: "hedera",
|
|
76
76
|
recipient: "0.0.751515",
|
|
77
77
|
amount: "1000000000000000",
|
|
78
|
-
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
79
78
|
}),
|
|
80
79
|
expectedStatus: {
|
|
81
80
|
errors: {
|
|
@@ -87,10 +86,10 @@ export const hedera: CurrenciesData<Transaction> = {
|
|
|
87
86
|
{
|
|
88
87
|
name: "Send max",
|
|
89
88
|
transaction: fromTransactionRaw({
|
|
89
|
+
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
90
90
|
family: "hedera",
|
|
91
91
|
recipient: "0.0.751515",
|
|
92
92
|
amount: "1000000000000000",
|
|
93
|
-
mode: HEDERA_TRANSACTION_MODES.Send,
|
|
94
93
|
useAllAmount: true,
|
|
95
94
|
}),
|
|
96
95
|
expectedStatus: (account, _, status) => {
|
|
@@ -6,11 +6,11 @@ import type {
|
|
|
6
6
|
HederaResourcesRaw,
|
|
7
7
|
} from "../../types";
|
|
8
8
|
import type { TokenAccount } from "@ledgerhq/types-live";
|
|
9
|
-
import { getMockedCurrency,
|
|
9
|
+
import { getMockedCurrency, getMockedHTSTokenCurrency } from "./currency.fixture";
|
|
10
10
|
import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
11
11
|
|
|
12
12
|
const defaultMockedCurrency = getMockedCurrency();
|
|
13
|
-
const defaultMockedTokenCurrency =
|
|
13
|
+
const defaultMockedTokenCurrency = getMockedHTSTokenCurrency();
|
|
14
14
|
const defaultMockAccountId = "js:2:hedera:0.0.1234567:hederaBip44";
|
|
15
15
|
const defaultMockTokenAccountId = `${defaultMockAccountId}+${defaultMockedTokenCurrency.id}`;
|
|
16
16
|
const defaultBalance = new BigNumber(100000000);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
import type network from "@ledgerhq/live-network";
|
|
3
|
+
import type { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
4
|
+
import { getMockedThirdwebTransaction } from "./thirdweb.fixture";
|
|
5
|
+
import type { ERC20OperationFields, OperationERC20 } from "../../types";
|
|
6
|
+
|
|
7
|
+
export const getMockResponse = (data: unknown): Awaited<ReturnType<typeof network>> => ({
|
|
8
|
+
data,
|
|
9
|
+
status: 200,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const getMockERC20Operation = ({
|
|
13
|
+
hash,
|
|
14
|
+
from,
|
|
15
|
+
to,
|
|
16
|
+
token,
|
|
17
|
+
}: {
|
|
18
|
+
hash: string;
|
|
19
|
+
from: string;
|
|
20
|
+
to: string;
|
|
21
|
+
token: TokenCurrency;
|
|
22
|
+
}): OperationERC20 => ({
|
|
23
|
+
thirdwebTransaction: getMockedThirdwebTransaction({
|
|
24
|
+
transactionHash: hash,
|
|
25
|
+
blockHash: "0xBLOCK",
|
|
26
|
+
decoded: {
|
|
27
|
+
name: "Transfer",
|
|
28
|
+
signature: "Transfer(address,address,uint256)",
|
|
29
|
+
params: {
|
|
30
|
+
from,
|
|
31
|
+
to,
|
|
32
|
+
value: "1000000",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
mirrorTransaction: {
|
|
37
|
+
transaction_hash: hash,
|
|
38
|
+
consensus_timestamp: "1234567890.000000000",
|
|
39
|
+
transaction_id: "0.0.123@1234567890.000",
|
|
40
|
+
charged_tx_fee: 100000,
|
|
41
|
+
memo_base64: "",
|
|
42
|
+
} as any,
|
|
43
|
+
contractCallResult: {
|
|
44
|
+
timestamp: "1234567890.000000000",
|
|
45
|
+
contract_id: "0.0.TOKEN",
|
|
46
|
+
gas_consumed: 50000,
|
|
47
|
+
gas_limit: 100000,
|
|
48
|
+
gas_used: 50000,
|
|
49
|
+
} as any,
|
|
50
|
+
token,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const getMockERC20Fields = (
|
|
54
|
+
overrides?: Partial<ERC20OperationFields>,
|
|
55
|
+
): ERC20OperationFields => ({
|
|
56
|
+
date: new Date("2024-01-15T10:00:00Z"),
|
|
57
|
+
type: "OUT",
|
|
58
|
+
fee: new BigNumber(100000),
|
|
59
|
+
value: new BigNumber(1000000),
|
|
60
|
+
senders: ["0.0.SENDER"],
|
|
61
|
+
recipients: ["0.0.RECIPIENT"],
|
|
62
|
+
blockHeight: 12345,
|
|
63
|
+
blockHash: "0xBLOCK",
|
|
64
|
+
extra: {
|
|
65
|
+
consensusTimestamp: "1234567890.000000000",
|
|
66
|
+
transactionId: "0.0.123@1234567890.000",
|
|
67
|
+
gasConsumed: 50000,
|
|
68
|
+
gasLimit: 100000,
|
|
69
|
+
gasUsed: 50000,
|
|
70
|
+
},
|
|
71
|
+
standard: "erc20",
|
|
72
|
+
hasFailed: false,
|
|
73
|
+
...overrides,
|
|
74
|
+
});
|
|
@@ -32,11 +32,11 @@ export const getMockedCurrency = (overrides?: Partial<CryptoCurrency>): CryptoCu
|
|
|
32
32
|
const HARDCODED_HEDERA_TOKENS: TokenCurrency[] = [
|
|
33
33
|
{
|
|
34
34
|
type: "TokenCurrency",
|
|
35
|
-
id: "hedera/hts/
|
|
35
|
+
id: "hedera/hts/usd_coin_0.0.456858",
|
|
36
36
|
contractAddress: "0.0.456858",
|
|
37
37
|
parentCurrency: getMockedCurrency(),
|
|
38
38
|
tokenType: "hts",
|
|
39
|
-
name: "
|
|
39
|
+
name: "USD Coin",
|
|
40
40
|
ticker: "USDC",
|
|
41
41
|
delisted: false,
|
|
42
42
|
disableCountervalue: false,
|
|
@@ -50,19 +50,37 @@ const HARDCODED_HEDERA_TOKENS: TokenCurrency[] = [
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
type: "TokenCurrency",
|
|
53
|
-
id: "hedera/hts/
|
|
53
|
+
id: "hedera/hts/xpack_0.0.7243470",
|
|
54
54
|
contractAddress: "0.0.7243470",
|
|
55
55
|
parentCurrency: getMockedCurrency(),
|
|
56
56
|
tokenType: "hts",
|
|
57
|
-
name: "
|
|
58
|
-
ticker: "
|
|
57
|
+
name: "xPACK",
|
|
58
|
+
ticker: "XPACK",
|
|
59
59
|
delisted: false,
|
|
60
60
|
disableCountervalue: false,
|
|
61
61
|
units: [
|
|
62
62
|
{
|
|
63
|
-
name: "
|
|
64
|
-
code: "
|
|
65
|
-
magnitude:
|
|
63
|
+
name: "XPACK",
|
|
64
|
+
code: "XPACK",
|
|
65
|
+
magnitude: 6,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "TokenCurrency",
|
|
71
|
+
id: "hedera/erc20/audd_0x39ceba2b467fa987546000eb5d1373acf1f3a2e1",
|
|
72
|
+
contractAddress: "0x39ceba2b467fa987546000eb5d1373acf1f3a2e1",
|
|
73
|
+
parentCurrency: getMockedCurrency(),
|
|
74
|
+
tokenType: "erc20",
|
|
75
|
+
name: "AUDD",
|
|
76
|
+
ticker: "AUDD",
|
|
77
|
+
delisted: false,
|
|
78
|
+
disableCountervalue: false,
|
|
79
|
+
units: [
|
|
80
|
+
{
|
|
81
|
+
name: "AUDD",
|
|
82
|
+
code: "AUDD",
|
|
83
|
+
magnitude: 6,
|
|
66
84
|
},
|
|
67
85
|
],
|
|
68
86
|
},
|
|
@@ -85,19 +103,53 @@ export const getTokenCurrencyFromCAL = (
|
|
|
85
103
|
};
|
|
86
104
|
};
|
|
87
105
|
|
|
88
|
-
export const
|
|
106
|
+
export const getTokenCurrencyFromCALByType = (
|
|
107
|
+
type: "hts" | "erc20",
|
|
108
|
+
overrides?: Partial<TokenCurrency>,
|
|
109
|
+
): TokenCurrency => {
|
|
110
|
+
const token = HARDCODED_HEDERA_TOKENS.find(t => t.tokenType === type);
|
|
111
|
+
|
|
112
|
+
invariant(token, `token of type ${type} not found in CAL`);
|
|
113
|
+
|
|
89
114
|
return {
|
|
90
|
-
|
|
115
|
+
...token,
|
|
116
|
+
...overrides,
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const getMockedHTSTokenCurrency = (overrides?: Partial<TokenCurrency>): TokenCurrency => {
|
|
121
|
+
return {
|
|
122
|
+
id: "hedera/hts/test1_0.0.1234567",
|
|
91
123
|
contractAddress: "0.0.1001",
|
|
92
124
|
parentCurrency: getMockedCurrency(),
|
|
93
125
|
tokenType: "hts",
|
|
94
|
-
name: "Test token",
|
|
95
|
-
ticker: "
|
|
126
|
+
name: "Test HTS token",
|
|
127
|
+
ticker: "TEST1",
|
|
128
|
+
type: "TokenCurrency",
|
|
129
|
+
units: [
|
|
130
|
+
{
|
|
131
|
+
name: "Test HTS",
|
|
132
|
+
code: "TEST1",
|
|
133
|
+
magnitude: 8,
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
...overrides,
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const getMockedERC20TokenCurrency = (overrides?: Partial<TokenCurrency>): TokenCurrency => {
|
|
141
|
+
return {
|
|
142
|
+
id: "hedera/erc20/_0x915fe7c00730c08708581e30e27d9c0605be40bd",
|
|
143
|
+
contractAddress: "0x915fe7c00730c08708581e30e27d9c0605be40bd",
|
|
144
|
+
parentCurrency: getMockedCurrency(),
|
|
145
|
+
tokenType: "erc20",
|
|
146
|
+
name: "Test ERC20 token",
|
|
147
|
+
ticker: "TEST2",
|
|
96
148
|
type: "TokenCurrency",
|
|
97
149
|
units: [
|
|
98
150
|
{
|
|
99
|
-
name: "Test",
|
|
100
|
-
code: "
|
|
151
|
+
name: "Test ERC20",
|
|
152
|
+
code: "TEST2",
|
|
101
153
|
magnitude: 8,
|
|
102
154
|
},
|
|
103
155
|
],
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
|
+
HederaMirrorCoinTransfer,
|
|
3
|
+
HederaMirrorToken,
|
|
4
|
+
HederaMirrorTokenTransfer,
|
|
5
|
+
} from "../../types";
|
|
2
6
|
|
|
3
7
|
export const getMockedMirrorToken = (overrides?: Partial<HederaMirrorToken>): HederaMirrorToken => {
|
|
4
8
|
return {
|
|
@@ -12,3 +16,21 @@ export const getMockedMirrorToken = (overrides?: Partial<HederaMirrorToken>): He
|
|
|
12
16
|
...overrides,
|
|
13
17
|
};
|
|
14
18
|
};
|
|
19
|
+
|
|
20
|
+
export const createMirrorCoinTransfer = (
|
|
21
|
+
account: string,
|
|
22
|
+
amount: number,
|
|
23
|
+
): HederaMirrorCoinTransfer => ({
|
|
24
|
+
account,
|
|
25
|
+
amount,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const createMirrorTokenTransfer = (
|
|
29
|
+
account: string,
|
|
30
|
+
amount: number,
|
|
31
|
+
tokenId: string,
|
|
32
|
+
): HederaMirrorTokenTransfer => ({
|
|
33
|
+
token_id: tokenId,
|
|
34
|
+
account,
|
|
35
|
+
amount,
|
|
36
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ERC20_TRANSFER_EVENT_TOPIC } from "../../constants";
|
|
2
|
+
import type { HederaThirdwebTransaction } from "../../types";
|
|
3
|
+
|
|
4
|
+
export const getMockedThirdwebTransaction = (
|
|
5
|
+
overrides?: Partial<HederaThirdwebTransaction>,
|
|
6
|
+
): HederaThirdwebTransaction => {
|
|
7
|
+
return {
|
|
8
|
+
address: "0x0000000000000000000000000000000000000002",
|
|
9
|
+
blockHash: "0x0000000000000000000000000000000000000002",
|
|
10
|
+
blockNumber: 1,
|
|
11
|
+
blockTimestamp: 1234123,
|
|
12
|
+
chainId: "295",
|
|
13
|
+
data: "0x0000000000000000000000000000000000000002",
|
|
14
|
+
decoded: {
|
|
15
|
+
name: "test",
|
|
16
|
+
params: {
|
|
17
|
+
from: "0x0000000000000000000000000000000000000001",
|
|
18
|
+
to: "0x0000000000000000000000000000000000000002",
|
|
19
|
+
value: "10000",
|
|
20
|
+
},
|
|
21
|
+
signature: "abc",
|
|
22
|
+
},
|
|
23
|
+
logIndex: 1,
|
|
24
|
+
topics: [
|
|
25
|
+
ERC20_TRANSFER_EVENT_TOPIC,
|
|
26
|
+
"0x0000000000000000000000000000000000000001",
|
|
27
|
+
"0x0000000000000000000000000000000000000002",
|
|
28
|
+
],
|
|
29
|
+
transactionHash: "0x0000000000000000000000000000000000000003",
|
|
30
|
+
transactionIndex: 2,
|
|
31
|
+
...overrides,
|
|
32
|
+
};
|
|
33
|
+
};
|
package/src/transaction.ts
CHANGED
|
@@ -44,6 +44,7 @@ export function fromTransactionRaw(tr: TransactionRaw): Transaction {
|
|
|
44
44
|
...commonGeneric,
|
|
45
45
|
...commonHedera,
|
|
46
46
|
mode: tr.mode,
|
|
47
|
+
...(tr.gasLimit && { gasLimit: new BigNumber(tr.gasLimit) }),
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -70,6 +71,7 @@ export function toTransactionRaw(t: Transaction): TransactionRaw {
|
|
|
70
71
|
...commonGeneric,
|
|
71
72
|
...commonHedera,
|
|
72
73
|
mode: t.mode,
|
|
74
|
+
...(t.gasLimit && { gasLimit: t.gasLimit.toString() }),
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
77
|
|
package/src/types/alpaca.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import type { StringMemo } from "@ledgerhq/coin-framework/api/types";
|
|
1
|
+
import type { StringMemo, TxDataNotSupported } from "@ledgerhq/coin-framework/api/types";
|
|
2
2
|
|
|
3
3
|
export type HederaMemo = StringMemo;
|
|
4
|
+
|
|
5
|
+
export type HederaTxData =
|
|
6
|
+
| TxDataNotSupported
|
|
7
|
+
| {
|
|
8
|
+
type: "erc20";
|
|
9
|
+
gasLimit: bigint;
|
|
10
|
+
};
|
package/src/types/bridge.ts
CHANGED
|
@@ -26,6 +26,7 @@ export type Transaction = TransactionCommon & {
|
|
|
26
26
|
} & (
|
|
27
27
|
| {
|
|
28
28
|
mode: HEDERA_TRANSACTION_MODES.Send;
|
|
29
|
+
gasLimit?: BigNumber;
|
|
29
30
|
properties?: never;
|
|
30
31
|
}
|
|
31
32
|
| {
|
|
@@ -45,6 +46,7 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
45
46
|
} & (
|
|
46
47
|
| {
|
|
47
48
|
mode: HEDERA_TRANSACTION_MODES.Send;
|
|
49
|
+
gasLimit?: string;
|
|
48
50
|
properties?: never;
|
|
49
51
|
}
|
|
50
52
|
| {
|
|
@@ -59,7 +61,7 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
59
61
|
|
|
60
62
|
export type TransactionTokenAssociate = Extract<
|
|
61
63
|
Transaction,
|
|
62
|
-
{ mode:
|
|
64
|
+
{ mode: HEDERA_TRANSACTION_MODES.TokenAssociate }
|
|
63
65
|
>;
|
|
64
66
|
|
|
65
67
|
export type TransactionStatus = TransactionStatusCommon;
|
|
@@ -89,6 +91,9 @@ export type HederaOperationExtra = {
|
|
|
89
91
|
transactionId?: string;
|
|
90
92
|
associatedTokenId?: string;
|
|
91
93
|
pagingToken?: string;
|
|
94
|
+
gasConsumed?: number;
|
|
95
|
+
gasLimit?: number;
|
|
96
|
+
gasUsed?: number;
|
|
92
97
|
memo?: string | null;
|
|
93
98
|
};
|
|
94
99
|
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type BigNumber from "bignumber.js";
|
|
2
|
+
import type { TransactionIntent } from "@ledgerhq/coin-framework/api/types";
|
|
3
|
+
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
4
|
+
import type { OperationType } from "@ledgerhq/types-live";
|
|
5
|
+
import type { HederaOperationExtra } from "./bridge";
|
|
6
|
+
import type { HEDERA_OPERATION_TYPES } from "../constants";
|
|
7
|
+
import type { HederaMirrorContractCallResult, HederaMirrorTransaction } from "./mirror";
|
|
8
|
+
import type { HederaThirdwebTransaction } from "./thirdweb";
|
|
9
|
+
|
|
10
|
+
export type EstimateFeesParams =
|
|
11
|
+
| {
|
|
12
|
+
currency: CryptoCurrency;
|
|
13
|
+
operationType: Exclude<HEDERA_OPERATION_TYPES, HEDERA_OPERATION_TYPES.ContractCall>;
|
|
14
|
+
}
|
|
15
|
+
| {
|
|
16
|
+
operationType: typeof HEDERA_OPERATION_TYPES.ContractCall;
|
|
17
|
+
txIntent: TransactionIntent;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export interface EstimateFeesResult {
|
|
21
|
+
tinybars: BigNumber;
|
|
22
|
+
gas?: BigNumber;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface OperationERC20 {
|
|
26
|
+
thirdwebTransaction: HederaThirdwebTransaction;
|
|
27
|
+
mirrorTransaction: HederaMirrorTransaction;
|
|
28
|
+
contractCallResult: HederaMirrorContractCallResult;
|
|
29
|
+
token: TokenCurrency;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ERC20OperationFields {
|
|
33
|
+
date: Date;
|
|
34
|
+
type: OperationType;
|
|
35
|
+
fee: BigNumber;
|
|
36
|
+
value: BigNumber;
|
|
37
|
+
senders: string[];
|
|
38
|
+
recipients: string[];
|
|
39
|
+
blockHeight: number;
|
|
40
|
+
blockHash: string;
|
|
41
|
+
extra: HederaOperationExtra;
|
|
42
|
+
standard: "erc20";
|
|
43
|
+
hasFailed: false;
|
|
44
|
+
}
|
package/src/types/mirror.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
import type { TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
3
|
+
|
|
1
4
|
type FreezeStatus = "NOT_APPLICABLE" | "FROZEN" | "UNFROZEN";
|
|
2
5
|
|
|
3
6
|
type KycStatus = "NOT_APPLICABLE" | "GRANTED" | "REVOKED";
|
|
@@ -19,7 +22,9 @@ export interface HederaMirrorTransaction {
|
|
|
19
22
|
token_transfers: HederaMirrorTokenTransfer[];
|
|
20
23
|
charged_tx_fee: number;
|
|
21
24
|
transaction_hash: string;
|
|
25
|
+
transaction_id: string;
|
|
22
26
|
consensus_timestamp: string;
|
|
27
|
+
entity_id: string | null;
|
|
23
28
|
result: string;
|
|
24
29
|
name: string;
|
|
25
30
|
memo_base64?: string;
|
|
@@ -68,3 +73,33 @@ export interface HederaMirrorTransactionsResponse {
|
|
|
68
73
|
next: string | null;
|
|
69
74
|
};
|
|
70
75
|
}
|
|
76
|
+
|
|
77
|
+
export interface HederaMirrorNetworkFees {
|
|
78
|
+
fees: {
|
|
79
|
+
gas: number;
|
|
80
|
+
transaction_type: "ContractCall" | "ContractCreate" | "EthereumTransaction";
|
|
81
|
+
}[];
|
|
82
|
+
timestamp: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface HederaMirrorContractCallResult {
|
|
86
|
+
contract_id: string;
|
|
87
|
+
block_gas_used: number;
|
|
88
|
+
gas_consumed: number;
|
|
89
|
+
gas_limit: number;
|
|
90
|
+
gas_used: number;
|
|
91
|
+
timestamp: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface HederaERC20TokenBalance {
|
|
95
|
+
token: TokenCurrency;
|
|
96
|
+
balance: BigNumber;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface HederaMirrorContractCallEstimate {
|
|
100
|
+
result: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface HederaMirrorContractCallBalance {
|
|
104
|
+
result: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface HederaThirdwebDecodedTransferParams {
|
|
2
|
+
from: string;
|
|
3
|
+
to: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface HederaThirdwebTransaction {
|
|
8
|
+
address: string;
|
|
9
|
+
blockHash: string;
|
|
10
|
+
blockNumber: number;
|
|
11
|
+
blockTimestamp: number;
|
|
12
|
+
chainId: string;
|
|
13
|
+
data: string;
|
|
14
|
+
decoded: {
|
|
15
|
+
name: string;
|
|
16
|
+
params: Record<string, unknown>;
|
|
17
|
+
signature: string;
|
|
18
|
+
};
|
|
19
|
+
logIndex: number;
|
|
20
|
+
topics: string[];
|
|
21
|
+
transactionHash: string;
|
|
22
|
+
transactionIndex: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface HederaThirdwebPagination {
|
|
26
|
+
limit: number;
|
|
27
|
+
page: number;
|
|
28
|
+
totalCount: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HederaThirdwebContractEventsResponse {
|
|
32
|
+
result: {
|
|
33
|
+
events: HederaThirdwebTransaction[];
|
|
34
|
+
pagination: HederaThirdwebPagination;
|
|
35
|
+
};
|
|
36
|
+
}
|