@xchainjs/xchain-radix 2.0.5 → 2.0.7
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/lib/client.d.ts +0 -2
- package/lib/index.esm.js +4 -4
- package/lib/index.js +4 -4
- package/package.json +4 -4
package/lib/client.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Curve, PrivateKey } from '@radixdlt/radix-engine-toolkit';
|
|
4
2
|
import { AssetInfo, BaseXChainClient, Fees, Network, PreparedTx, TxHistoryParams, XChainClientParams } from '@xchainjs/xchain-client';
|
|
5
3
|
import { Address, TokenAsset } from '@xchainjs/xchain-util';
|
package/lib/index.esm.js
CHANGED
|
@@ -3871,8 +3871,8 @@ class Client extends BaseXChainClient {
|
|
|
3871
3871
|
* @returns {Address} A promise resolving to the current address.
|
|
3872
3872
|
* A phrase is needed to create a wallet and to derive an address from it.
|
|
3873
3873
|
*/
|
|
3874
|
-
getAddressAsync(
|
|
3875
|
-
return __awaiter(this,
|
|
3874
|
+
getAddressAsync() {
|
|
3875
|
+
return __awaiter(this, arguments, void 0, function* (index = 0) {
|
|
3876
3876
|
const networkId = this.getRadixNetwork();
|
|
3877
3877
|
const radixPrivateKey = this.getRadixPrivateKey(index);
|
|
3878
3878
|
const address = yield LTSRadixEngineToolkit.Derive.virtualAccountAddress(radixPrivateKey.publicKey(), networkId);
|
|
@@ -4122,8 +4122,8 @@ class Client extends BaseXChainClient {
|
|
|
4122
4122
|
* @returns A signed transaction hex
|
|
4123
4123
|
*/
|
|
4124
4124
|
transfer(params) {
|
|
4125
|
-
var _a;
|
|
4126
4125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4126
|
+
var _a;
|
|
4127
4127
|
const walletIndex = (_a = params.walletIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4128
4128
|
const intent = yield this.prepareTx(params)
|
|
4129
4129
|
.then((response) => response.rawUnsignedTx)
|
|
@@ -4160,8 +4160,8 @@ class Client extends BaseXChainClient {
|
|
|
4160
4160
|
* @returns a PreparedTx
|
|
4161
4161
|
*/
|
|
4162
4162
|
prepareTx(params) {
|
|
4163
|
-
var _a;
|
|
4164
4163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4164
|
+
var _a;
|
|
4165
4165
|
const walletIndex = (_a = params.walletIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4166
4166
|
const from = yield this.getAddressAsync();
|
|
4167
4167
|
const transferAmmount = params.amount.amount().toNumber() / Math.pow(10, XRD_DECIMAL);
|
package/lib/index.js
CHANGED
|
@@ -3873,8 +3873,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
3873
3873
|
* @returns {Address} A promise resolving to the current address.
|
|
3874
3874
|
* A phrase is needed to create a wallet and to derive an address from it.
|
|
3875
3875
|
*/
|
|
3876
|
-
getAddressAsync(
|
|
3877
|
-
return __awaiter(this,
|
|
3876
|
+
getAddressAsync() {
|
|
3877
|
+
return __awaiter(this, arguments, void 0, function* (index = 0) {
|
|
3878
3878
|
const networkId = this.getRadixNetwork();
|
|
3879
3879
|
const radixPrivateKey = this.getRadixPrivateKey(index);
|
|
3880
3880
|
const address = yield radixEngineToolkit.LTSRadixEngineToolkit.Derive.virtualAccountAddress(radixPrivateKey.publicKey(), networkId);
|
|
@@ -4124,8 +4124,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
4124
4124
|
* @returns A signed transaction hex
|
|
4125
4125
|
*/
|
|
4126
4126
|
transfer(params) {
|
|
4127
|
-
var _a;
|
|
4128
4127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4128
|
+
var _a;
|
|
4129
4129
|
const walletIndex = (_a = params.walletIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4130
4130
|
const intent = yield this.prepareTx(params)
|
|
4131
4131
|
.then((response) => response.rawUnsignedTx)
|
|
@@ -4162,8 +4162,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
4162
4162
|
* @returns a PreparedTx
|
|
4163
4163
|
*/
|
|
4164
4164
|
prepareTx(params) {
|
|
4165
|
-
var _a;
|
|
4166
4165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4166
|
+
var _a;
|
|
4167
4167
|
const walletIndex = (_a = params.walletIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4168
4168
|
const from = yield this.getAddressAsync();
|
|
4169
4169
|
const transferAmmount = params.amount.amount().toNumber() / Math.pow(10, XRD_DECIMAL);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-radix",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Custom Radix client and utilities used by XChainJS clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"XRD",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@radixdlt/babylon-gateway-api-sdk": "^1.4.1",
|
|
42
42
|
"@radixdlt/radix-engine-toolkit": "^1.0.3",
|
|
43
43
|
"@scure/base": "^1.2.6",
|
|
44
|
-
"@xchainjs/xchain-client": "2.0.
|
|
45
|
-
"@xchainjs/xchain-crypto": "1.0.
|
|
46
|
-
"@xchainjs/xchain-util": "2.0.
|
|
44
|
+
"@xchainjs/xchain-client": "2.0.7",
|
|
45
|
+
"@xchainjs/xchain-crypto": "1.0.5",
|
|
46
|
+
"@xchainjs/xchain-util": "2.0.4",
|
|
47
47
|
"bip32": "^4.0.0",
|
|
48
48
|
"bip39": "^3.1.0",
|
|
49
49
|
"ed25519-hd-key": "^1.3.0"
|