@hawksightco/hawk-sdk 0.0.27 → 0.0.29
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/dist/src/classes/HawkAPI.d.ts +3 -0
- package/dist/src/classes/HawkAPI.d.ts.map +1 -1
- package/dist/src/classes/HawkAPI.js +2 -0
- package/dist/src/classes/Search.d.ts +72 -0
- package/dist/src/classes/Search.d.ts.map +1 -0
- package/dist/src/classes/Search.js +136 -0
- package/dist/src/classes/Transaction.d.ts +14 -0
- package/dist/src/classes/Transaction.d.ts.map +1 -1
- package/dist/src/classes/Transaction.js +31 -16
- package/dist/src/types.d.ts +7 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { TxGenerator } from "./TxGenerator";
|
|
|
4
4
|
import { Util } from "./Util";
|
|
5
5
|
import { TxGeneratorAutomations } from "./TxGeneratorAutomations";
|
|
6
6
|
import { GeneralUtility } from "./GeneralUtility";
|
|
7
|
+
import { Search } from "./Search";
|
|
7
8
|
/**
|
|
8
9
|
* HawkAPI is a central gateway class that aggregates access to various functional modules
|
|
9
10
|
* for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
|
|
@@ -27,6 +28,8 @@ export declare class HawkAPI {
|
|
|
27
28
|
readonly txGenerator: TxGenerator;
|
|
28
29
|
/** TxGeneratorAutomations module for automating and optimizing transaction creation processes. */
|
|
29
30
|
readonly txGeneratorAutomation: TxGeneratorAutomations;
|
|
31
|
+
/** Search module (token search only for now...) */
|
|
32
|
+
readonly search: Search;
|
|
30
33
|
/**
|
|
31
34
|
* Initializes a new instance of the HawkAPI class with a specified API URL.
|
|
32
35
|
* @param url The base URL for the HawkSight API services, defaulted to "https://api2.hawksight.co" if not specified.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HawkAPI.d.ts","sourceRoot":"","sources":["../../../src/classes/HawkAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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oC;CAW/D"}
|
|
@@ -8,6 +8,7 @@ const Util_1 = require("./Util");
|
|
|
8
8
|
const TxGeneratorAutomations_1 = require("./TxGeneratorAutomations");
|
|
9
9
|
const Client_1 = require("./Client");
|
|
10
10
|
const GeneralUtility_1 = require("./GeneralUtility");
|
|
11
|
+
const Search_1 = require("./Search");
|
|
11
12
|
/**
|
|
12
13
|
* HawkAPI is a central gateway class that aggregates access to various functional modules
|
|
13
14
|
* for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
|
|
@@ -31,6 +32,7 @@ class HawkAPI {
|
|
|
31
32
|
this.util = new Util_1.Util(client);
|
|
32
33
|
this.txGenerator = new TxGenerator_1.TxGenerator(client, this.generalUtility);
|
|
33
34
|
this.txGeneratorAutomation = new TxGeneratorAutomations_1.TxGeneratorAutomations(client, this.generalUtility);
|
|
35
|
+
this.search = new Search_1.Search(url);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
exports.HawkAPI = HawkAPI;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Token } from "../types";
|
|
2
|
+
export declare class Search {
|
|
3
|
+
protected readonly url: string;
|
|
4
|
+
private tokenIndices?;
|
|
5
|
+
private tokens?;
|
|
6
|
+
private _loaded;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the token indices and tokens have been loaded.
|
|
9
|
+
*
|
|
10
|
+
* @returns {boolean} True if the token indices and tokens have been loaded, false otherwise.
|
|
11
|
+
*/
|
|
12
|
+
get loaded(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Constructs a new instance of the Search class.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} url - The base URL for the API.
|
|
17
|
+
*/
|
|
18
|
+
constructor(url: string);
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves tokens that match the given keyword.
|
|
21
|
+
*
|
|
22
|
+
* This method searches for tokens that match the provided keyword.
|
|
23
|
+
* If the token indices or tokens are not yet loaded, it logs a warning and returns an empty array.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} keyword - The keyword to search for.
|
|
26
|
+
* @returns {Token[]} An array of tokens that match the given keyword.
|
|
27
|
+
*/
|
|
28
|
+
token(keyword: string): Token[];
|
|
29
|
+
/**
|
|
30
|
+
* Loads the token indices and tokens.
|
|
31
|
+
*
|
|
32
|
+
* This method loads the token indices and tokens if they are not already loaded.
|
|
33
|
+
* It also sets up a periodic update to refresh the token indices and tokens every minute.
|
|
34
|
+
*
|
|
35
|
+
* @returns {Promise<void>} A promise that resolves when the initial load is complete.
|
|
36
|
+
*/
|
|
37
|
+
load(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves and updates the token indices and tokens if necessary.
|
|
40
|
+
*
|
|
41
|
+
* This method checks if the current token indices and tokens are undefined.
|
|
42
|
+
* If they are, it fetches the token indices and tokens from the API.
|
|
43
|
+
* It then compares the hash of the current token indices with the hash from the server.
|
|
44
|
+
* If the hashes do not match, it updates the token indices and tokens.
|
|
45
|
+
*
|
|
46
|
+
* @private
|
|
47
|
+
* @returns {Promise<void>} A promise that resolves when the token indices and tokens are updated.
|
|
48
|
+
*/
|
|
49
|
+
private getTokenIndices;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves all tokens from the API.
|
|
52
|
+
*
|
|
53
|
+
* This method makes a GET request to the API to fetch all tokens.
|
|
54
|
+
*
|
|
55
|
+
* @private
|
|
56
|
+
* @returns {Promise<Token[]>} A promise that resolves to an array of tokens.
|
|
57
|
+
*/
|
|
58
|
+
private getAllTokens;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves the search indices from the API based on the provided key and optional hash.
|
|
61
|
+
*
|
|
62
|
+
* This method makes a GET request to the API to fetch the search indices for the specified key.
|
|
63
|
+
* If a hash is provided, it includes the hash in the request to check for updated indices.
|
|
64
|
+
*
|
|
65
|
+
* @private
|
|
66
|
+
* @param {string} key - The key to identify the search indices.
|
|
67
|
+
* @param {string} [hash] - Optional hash to validate against the current hash of the indices.
|
|
68
|
+
* @returns {Promise<SearchIndices>} A promise that resolves to the search indices for the specified key.
|
|
69
|
+
*/
|
|
70
|
+
private getSearchIndices;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=Search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/classes/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAGhD,qBAAa,MAAM;IAmBf,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAjBhC,OAAO,CAAC,YAAY,CAAC,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAC,CAAU;IACzB,OAAO,CAAC,OAAO,CAAkB;IAEjC;;;;OAIG;IACH,IAAI,MAAM,IAAI,OAAO,CAAwB;IAE7C;;;;OAIG;gBAEkB,GAAG,EAAE,MAAM;IAGhC;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE;IAa/B;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B;;;;;;;;;;OAUG;YACW,eAAe;IAgB7B;;;;;;;OAOG;YACW,YAAY;IAI1B;;;;;;;;;;OAUG;YACW,gBAAgB;CAO/B"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Search = void 0;
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
17
|
+
class Search {
|
|
18
|
+
/**
|
|
19
|
+
* Checks if the token indices and tokens have been loaded.
|
|
20
|
+
*
|
|
21
|
+
* @returns {boolean} True if the token indices and tokens have been loaded, false otherwise.
|
|
22
|
+
*/
|
|
23
|
+
get loaded() { return this._loaded; }
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new instance of the Search class.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} url - The base URL for the API.
|
|
28
|
+
*/
|
|
29
|
+
constructor(url) {
|
|
30
|
+
this.url = url;
|
|
31
|
+
this._loaded = false;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves tokens that match the given keyword.
|
|
35
|
+
*
|
|
36
|
+
* This method searches for tokens that match the provided keyword.
|
|
37
|
+
* If the token indices or tokens are not yet loaded, it logs a warning and returns an empty array.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} keyword - The keyword to search for.
|
|
40
|
+
* @returns {Token[]} An array of tokens that match the given keyword.
|
|
41
|
+
*/
|
|
42
|
+
token(keyword) {
|
|
43
|
+
if (this.tokenIndices === undefined || this.tokens === undefined) {
|
|
44
|
+
console.warn("Token list still loading...");
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
const indices = this.tokenIndices.indices[keyword.toLowerCase()];
|
|
48
|
+
const result = [];
|
|
49
|
+
for (const index in indices) {
|
|
50
|
+
result.push(this.tokens[index]);
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Loads the token indices and tokens.
|
|
56
|
+
*
|
|
57
|
+
* This method loads the token indices and tokens if they are not already loaded.
|
|
58
|
+
* It also sets up a periodic update to refresh the token indices and tokens every minute.
|
|
59
|
+
*
|
|
60
|
+
* @returns {Promise<void>} A promise that resolves when the initial load is complete.
|
|
61
|
+
*/
|
|
62
|
+
load() {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
if (!this.loaded) {
|
|
65
|
+
this._loaded = true;
|
|
66
|
+
const update = () => __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
yield this.getTokenIndices();
|
|
68
|
+
setTimeout(update, 60 * 1000);
|
|
69
|
+
});
|
|
70
|
+
yield update();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves and updates the token indices and tokens if necessary.
|
|
76
|
+
*
|
|
77
|
+
* This method checks if the current token indices and tokens are undefined.
|
|
78
|
+
* If they are, it fetches the token indices and tokens from the API.
|
|
79
|
+
* It then compares the hash of the current token indices with the hash from the server.
|
|
80
|
+
* If the hashes do not match, it updates the token indices and tokens.
|
|
81
|
+
*
|
|
82
|
+
* @private
|
|
83
|
+
* @returns {Promise<void>} A promise that resolves when the token indices and tokens are updated.
|
|
84
|
+
*/
|
|
85
|
+
getTokenIndices() {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
if (this.tokenIndices === undefined) {
|
|
88
|
+
this.tokenIndices = yield this.getSearchIndices('tokens');
|
|
89
|
+
}
|
|
90
|
+
if (this.tokens === undefined) {
|
|
91
|
+
this.tokens = yield this.getAllTokens();
|
|
92
|
+
}
|
|
93
|
+
const tokenIndices = yield this.getSearchIndices('tokens', this.tokenIndices.hash);
|
|
94
|
+
// If hash doesn't match, it means there's a new token.
|
|
95
|
+
if (tokenIndices.hash !== this.tokenIndices.hash) {
|
|
96
|
+
this.tokenIndices = yield this.getSearchIndices('tokens');
|
|
97
|
+
this.tokens = yield this.getAllTokens();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves all tokens from the API.
|
|
103
|
+
*
|
|
104
|
+
* This method makes a GET request to the API to fetch all tokens.
|
|
105
|
+
*
|
|
106
|
+
* @private
|
|
107
|
+
* @returns {Promise<Token[]>} A promise that resolves to an array of tokens.
|
|
108
|
+
*/
|
|
109
|
+
getAllTokens() {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
return (yield axios_1.default.get(`${this.url}/tokens?all=true`)).data;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Retrieves the search indices from the API based on the provided key and optional hash.
|
|
116
|
+
*
|
|
117
|
+
* This method makes a GET request to the API to fetch the search indices for the specified key.
|
|
118
|
+
* If a hash is provided, it includes the hash in the request to check for updated indices.
|
|
119
|
+
*
|
|
120
|
+
* @private
|
|
121
|
+
* @param {string} key - The key to identify the search indices.
|
|
122
|
+
* @param {string} [hash] - Optional hash to validate against the current hash of the indices.
|
|
123
|
+
* @returns {Promise<SearchIndices>} A promise that resolves to the search indices for the specified key.
|
|
124
|
+
*/
|
|
125
|
+
getSearchIndices(key, hash) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
if (hash !== undefined) {
|
|
128
|
+
return (yield axios_1.default.get(`${this.url}/searchIndices?key=${key}&hash=${hash}`)).data;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return (yield axios_1.default.get(`${this.url}/searchIndices?key=${key}`)).data;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.Search = Search;
|
|
@@ -65,6 +65,20 @@ export declare class Transaction {
|
|
|
65
65
|
* Add priority fee instructions (compute budget)
|
|
66
66
|
*/
|
|
67
67
|
addPriorityFeeIx(connection: web3.Connection, priorityLevel: client.PriorityLevel, computeUnitLimit: number, maxPriorityFee?: number): Promise<web3.TransactionInstruction[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Gets the compute unit limit from a transaction simulation.
|
|
70
|
+
*
|
|
71
|
+
* This function simulates a transaction and calculates the compute unit limit
|
|
72
|
+
* based on the simulation results. If an additional compute limit is provided,
|
|
73
|
+
* it is added to the units consumed in the simulation. Otherwise, the units
|
|
74
|
+
* consumed are increased by 10%.
|
|
75
|
+
*
|
|
76
|
+
* @param {web3.Connection} connection - The connection object to the Solana cluster.
|
|
77
|
+
* @param {number} [additionalComputeLimit] - Optional additional compute limit to add to the units consumed.
|
|
78
|
+
* @returns {Promise<number>} - A promise that resolves to the total compute unit limit.
|
|
79
|
+
* @throws {Error} - Throws an error if the transaction simulation fails.
|
|
80
|
+
*/
|
|
81
|
+
getComputeUnitLimit(connection: web3.Connection, additionalComputeLimit?: number): Promise<number>;
|
|
68
82
|
/**
|
|
69
83
|
* Simulate transaction
|
|
70
84
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/classes/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,qBAAa,WAAW;IA+CpB,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B;IACxD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS;IACjC,OAAO,CAAC,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE;IAC/C,OAAO,CAAC,cAAc;IAlDxB,2FAA2F;IAC3F,OAAO,CAAC,UAAU,CAA0B;IAC5C,IAAI,SAAS,IAAI,IAAI,CAAC,kBAAkB,CAEvC;IAED,+DAA+D;IAC/D,OAAO,CAAC,qBAAqB,CAA4B;IACzD,IAAI,o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,UAAU,EAC3B,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,MAAM,CAAC;IAiBlB;;;;;OAKG;IACG,mBAAmB,CACvB,UAAU,EAAE,IAAI,CAAC,UAAU,GAC1B,OAAO,CAAC,4BAA4B,CAAC;IAsCxC;;OAEG;IACH,gBAAgB,CACd,eAAe,EAAE,IAAI,CAAC,8BAA8B,GACnD,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,oBAAoB,CAAC;IAcvD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAgBpC;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAgBpC;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAW7B"}
|
|
@@ -70,16 +70,6 @@ class Transaction {
|
|
|
70
70
|
* @param alts Address lookup tables that optimize account address storage
|
|
71
71
|
*/
|
|
72
72
|
constructor(txMetadataResponse, payerKey, latestBlockhash, alts, generalUtility) {
|
|
73
|
-
// // Construct compute instructions
|
|
74
|
-
// const computeIxs = txMetadataResponse.computeBudgetInstructions.map(ix => {
|
|
75
|
-
// return new web3.TransactionInstruction({
|
|
76
|
-
// keys: ix.accounts.map(meta => {
|
|
77
|
-
// return { pubkey: new web3.PublicKey(meta.pubkey), isSigner: meta.isSigner, isWritable: meta.isWritable };
|
|
78
|
-
// }),
|
|
79
|
-
// programId: new web3.PublicKey(ix.programId),
|
|
80
|
-
// data: Buffer.from(ix.data, 'base64'),
|
|
81
|
-
// });
|
|
82
|
-
// });
|
|
83
73
|
this.txMetadataResponse = txMetadataResponse;
|
|
84
74
|
this.payerKey = payerKey;
|
|
85
75
|
this.latestBlockhash = latestBlockhash;
|
|
@@ -106,12 +96,6 @@ class Transaction {
|
|
|
106
96
|
this._txMessage = txMessage;
|
|
107
97
|
this._versionedTransaction = versionedTransaction;
|
|
108
98
|
this.requiredSigners = this.getRequiredSigners();
|
|
109
|
-
// // Commented to allow payer to be a non required signer within the transaction
|
|
110
|
-
// if (typeof this.requiredSigners[payerKey.toString()] !== "boolean") {
|
|
111
|
-
// throw new Error(
|
|
112
|
-
// `Warning: The payer ${payerKey} is not one of the required signers of this transaction.`
|
|
113
|
-
// );
|
|
114
|
-
// }
|
|
115
99
|
}
|
|
116
100
|
/**
|
|
117
101
|
* Signs the transaction with provided signers.
|
|
@@ -199,6 +183,37 @@ class Transaction {
|
|
|
199
183
|
return priorityFeeIxs;
|
|
200
184
|
});
|
|
201
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Gets the compute unit limit from a transaction simulation.
|
|
188
|
+
*
|
|
189
|
+
* This function simulates a transaction and calculates the compute unit limit
|
|
190
|
+
* based on the simulation results. If an additional compute limit is provided,
|
|
191
|
+
* it is added to the units consumed in the simulation. Otherwise, the units
|
|
192
|
+
* consumed are increased by 10%.
|
|
193
|
+
*
|
|
194
|
+
* @param {web3.Connection} connection - The connection object to the Solana cluster.
|
|
195
|
+
* @param {number} [additionalComputeLimit] - Optional additional compute limit to add to the units consumed.
|
|
196
|
+
* @returns {Promise<number>} - A promise that resolves to the total compute unit limit.
|
|
197
|
+
* @throws {Error} - Throws an error if the transaction simulation fails.
|
|
198
|
+
*/
|
|
199
|
+
getComputeUnitLimit(connection, additionalComputeLimit) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const simulation = yield this.simulateTransaction(connection);
|
|
202
|
+
if (simulation.err !== null) {
|
|
203
|
+
if (simulation.logs === null) {
|
|
204
|
+
console.log(simulation.err);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
for (const log of simulation.logs) {
|
|
208
|
+
console.log(log);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
throw new Error(`Transaction simulation error. See logs above.`);
|
|
212
|
+
}
|
|
213
|
+
const totalUnitLimit = additionalComputeLimit ? simulation.unitsConsumed + additionalComputeLimit : Math.round(simulation.unitsConsumed * 1.1);
|
|
214
|
+
return totalUnitLimit;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
202
217
|
/**
|
|
203
218
|
* Simulate transaction
|
|
204
219
|
*
|
package/dist/src/types.d.ts
CHANGED
|
@@ -264,4 +264,11 @@ export type SimulatedTransactionResponse = {
|
|
|
264
264
|
unitsConsumed: number;
|
|
265
265
|
returnData?: web3.TransactionReturnData | null;
|
|
266
266
|
};
|
|
267
|
+
/**
|
|
268
|
+
* Type definition for search indices and their associated hash.
|
|
269
|
+
*/
|
|
270
|
+
export type SearchIndices = {
|
|
271
|
+
hash: string;
|
|
272
|
+
indices: Record<string, Record<number, 1>>;
|
|
273
|
+
};
|
|
267
274
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CA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