@tatumio/bsc 2.0.1-alpha.389 → 2.0.1-alpha.391
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
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tatumio/bsc",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.391",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@tatumio/shared-testing-evm-based": "2.0.1-alpha.
|
|
9
|
-
"@tatumio/shared-testing-common": "2.0.1-alpha.
|
|
10
|
-
"@tatumio/api-client": "2.0.1-alpha.
|
|
8
|
+
"@tatumio/shared-testing-evm-based": "2.0.1-alpha.391",
|
|
9
|
+
"@tatumio/shared-testing-common": "2.0.1-alpha.391",
|
|
10
|
+
"@tatumio/api-client": "2.0.1-alpha.391",
|
|
11
11
|
"axios": "^0.26.0",
|
|
12
12
|
"form-data": "^4.0.0",
|
|
13
|
-
"@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.
|
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.
|
|
13
|
+
"@tatumio/shared-blockchain-evm-based": "2.0.1-alpha.391",
|
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.391",
|
|
15
15
|
"bignumber.js": "^9.0.2",
|
|
16
16
|
"lodash": "^4.17.21",
|
|
17
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
|
18
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.
|
|
17
|
+
"@tatumio/shared-core": "2.0.1-alpha.391",
|
|
18
|
+
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.391",
|
|
19
19
|
"ethereumjs-wallet": "^1.0.2",
|
|
20
20
|
"bip39": "^3.0.2",
|
|
21
21
|
"web3": "^1.7.4",
|
package/src/lib/bsc.sdk.d.ts
CHANGED
|
@@ -232,9 +232,9 @@ export declare const TatumBscSDK: (args: SDKArguments) => {
|
|
|
232
232
|
smartContractGetAddress: typeof BlockchainUtilsService.scGetContractAddress;
|
|
233
233
|
};
|
|
234
234
|
virtualAccount: {
|
|
235
|
-
send: (body: Omit<import("@tatumio/api-client").TransferBsc, "
|
|
235
|
+
send: (body: Omit<import("@tatumio/api-client").TransferBsc, "privateKey"> & Partial<import("@tatumio/api-client").SignatureId & {
|
|
236
236
|
index: number;
|
|
237
|
-
}> & Partial<Pick<import("@tatumio/api-client").TransferBsc, "
|
|
237
|
+
}> & Partial<Pick<import("@tatumio/api-client").TransferBsc, "privateKey">> & Partial<{
|
|
238
238
|
mnemonic: string;
|
|
239
239
|
}>) => Promise<(void | {
|
|
240
240
|
id?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TransferBsc } from '@tatumio/api-client';
|
|
2
|
-
import {
|
|
2
|
+
import { PrivateKeyOrSignatureId } from '@tatumio/shared-blockchain-abstract';
|
|
3
3
|
import { EvmBasedWeb3 } from '@tatumio/shared-blockchain-evm-based';
|
|
4
4
|
import { Blockchain } from '@tatumio/shared-core';
|
|
5
|
-
declare type TransferVirtualAccountBsc =
|
|
5
|
+
declare type TransferVirtualAccountBsc = PrivateKeyOrSignatureId<TransferBsc>;
|
|
6
6
|
declare type VirtualAccountResponse = {
|
|
7
7
|
id?: string;
|
|
8
8
|
txId?: string;
|
|
@@ -10,7 +10,7 @@ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
|
|
|
10
10
|
const bsc_tx_1 = require("./bsc.tx");
|
|
11
11
|
const sendBscVirtualAccountTransaction = (body, web3) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
12
|
const txService = (0, bsc_tx_1.bscTxService)({ blockchain: shared_core_1.Blockchain.BSC, web3 });
|
|
13
|
-
const { mnemonic, index,
|
|
13
|
+
const { mnemonic, index, privateKey, gasLimit, gasPrice, nonce } = body, withdrawal = tslib_1.__rest(body, ["mnemonic", "index", "privateKey", "gasLimit", "gasPrice", "nonce"]);
|
|
14
14
|
const { amount, address } = withdrawal;
|
|
15
15
|
let fromPrivKey;
|
|
16
16
|
let txData;
|
|
@@ -18,7 +18,7 @@ const sendBscVirtualAccountTransaction = (body, web3) => tslib_1.__awaiter(void
|
|
|
18
18
|
fromPrivKey = (yield shared_blockchain_evm_based_1.evmBasedUtils.generatePrivateKeyFromMnemonic(shared_core_1.Blockchain.BSC, body.mnemonic, body.index));
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
|
-
fromPrivKey = body.
|
|
21
|
+
fromPrivKey = body.privateKey;
|
|
22
22
|
}
|
|
23
23
|
const account = yield api_client_1.AccountService.getAccountByAccountId(body.senderAccountId);
|
|
24
24
|
const fee = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bsc.virtualAccount.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/bsc/src/lib/services/bsc.virtualAccount.ts"],"names":[],"mappings":";;;;AAAA,oDAS4B;AAC5B,oFAG4C;AAC5C,sFAAkF;AAClF,sDAAwF;AACxF,wEAAoC;AACpC,qCAAuC;AAKvC,MAAM,gCAAgC,GAAG,CACvC,IAA+B,EAC/B,IAAkB,EACe,EAAE;IACnC,MAAM,SAAS,GAAG,IAAA,qBAAY,EAAC,EAAE,UAAU,EAAE,wBAAU,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IACpE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bsc.virtualAccount.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/bsc/src/lib/services/bsc.virtualAccount.ts"],"names":[],"mappings":";;;;AAAA,oDAS4B;AAC5B,oFAG4C;AAC5C,sFAAkF;AAClF,sDAAwF;AACxF,wEAAoC;AACpC,qCAAuC;AAKvC,MAAM,gCAAgC,GAAG,CACvC,IAA+B,E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