@cryptorubic/web3 1.1.0-alpha-stellar.36 → 1.1.0-alpha-stellar.37
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/package.json
CHANGED
|
@@ -40,6 +40,7 @@ export declare class StellarAdapter extends AbstractAdapter<StellarClient, Stell
|
|
|
40
40
|
simulateTransaction(config: StellarTransactionConfig): Promise<string>;
|
|
41
41
|
getTransactionStatus(srcTxHash: string): Promise<TxStatus>;
|
|
42
42
|
getMinWeiBalance(userAddress: string): Promise<BigNumber>;
|
|
43
|
+
getFeeFromTransaction(xdr: string): BigNumber;
|
|
43
44
|
callContractMethod<T extends Web3PrimitiveType = string>(_contractAddress: string, _contractAbi: Abi | undefined, _methodName: string, _methodArguments?: {
|
|
44
45
|
value: string;
|
|
45
46
|
type: string;
|
|
@@ -209,6 +209,10 @@ class StellarAdapter extends abstract_adapter_1.AbstractAdapter {
|
|
|
209
209
|
return new bignumber_js_1.default(0);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
+
getFeeFromTransaction(xdr) {
|
|
213
|
+
const parsedTranssaction = stellar_sdk_1.TransactionBuilder.fromXDR(xdr, stellar_sdk_1.Networks.PUBLIC);
|
|
214
|
+
return new bignumber_js_1.default(parsedTranssaction.fee);
|
|
215
|
+
}
|
|
212
216
|
async callContractMethod(_contractAddress, _contractAbi = [], _methodName, _methodArguments = [], _options) {
|
|
213
217
|
throw new Error('Method call is not supported');
|
|
214
218
|
}
|