Skip to content

Commit 09fbd98

Browse files
author
Egor Komarov
committed
feat: add optional libraries map to API parameters
1 parent 43c0bdb commit 09fbd98

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "everscale-inpage-provider",
3-
"version": "0.6.2",
3+
"version": "0.6.3",
44
"description": "Web3-like interface to the Everscale blockchain",
55
"repository": "https://github.com/broxus/everscale-inpage-provider",
66
"main": "dist/index.js",

src/api.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ export type ProviderApi<Addr = Address> = {
463463
* - If `number`, uses the specified number as a signature id.
464464
*/
465465
withSignatureId?: boolean | number;
466+
467+
/**
468+
* Optional libraries map
469+
**/
470+
libraries?: { [K: string]: string };
466471
};
467472
output: {
468473
/**
@@ -1719,6 +1724,10 @@ export type ProviderApi<Addr = Address> = {
17191724
* - If `number`, uses the specified number as a signature id.
17201725
*/
17211726
withSignatureId?: boolean | number;
1727+
/**
1728+
* Optional libraries map
1729+
**/
1730+
libraries?: { [K: string]: string };
17221731
};
17231732
output: {
17241733
/**

src/contract.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class Contract<Abi> {
107107
},
108108
},
109109
) as unknown as ContractMethods<Abi>;
110-
110+
111111
this._getters = new Proxy(
112112
{},
113113
{
@@ -888,6 +888,7 @@ class ContractMethodImpl implements ContractMethod<any, any> {
888888
params: this.params,
889889
},
890890
withSignatureId: args.withSignatureId,
891+
libraries: args.libraries,
891892
});
892893

893894
if (output == null || code != 0) {
@@ -1027,6 +1028,7 @@ class ContractGetterImpl implements ContractGetter<any, any> {
10271028
params: this.params,
10281029
},
10291030
withSignatureId: args.withSignatureId,
1031+
libraries: args.libraries,
10301032
});
10311033

10321034
if (output == null || code != 0) {
@@ -1173,6 +1175,10 @@ export type CallParams = {
11731175
* - If `number`, uses the specified number as a signature id.
11741176
*/
11751177
withSignatureId?: boolean | number;
1178+
/**
1179+
* Optional libraries map
1180+
**/
1181+
libraries?: { [K: string]: string };
11761182
};
11771183

11781184
/**
@@ -1190,6 +1196,10 @@ export type RunGetterParams = {
11901196
* - If `number`, uses the specified number as a signature id.
11911197
*/
11921198
withSignatureId?: boolean | number;
1199+
/**
1200+
* Optional libraries map
1201+
**/
1202+
libraries?: { [K: string]: string };
11931203
};
11941204

11951205
/**

0 commit comments

Comments
 (0)