@dynamic-labs-wallet/tron 1.1.35 → 1.1.36
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/index.cjs +6 -2
- package/index.esm.js +7 -3
- package/package.json +2 -2
- package/src/client/client.d.ts +6 -2
- package/src/client/client.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -910,7 +910,7 @@ function _ts_generator(thisArg, body) {
|
|
|
910
910
|
* matching what tronweb / TronLink expose. We return it as 0x-prefixed
|
|
911
911
|
* so it round-trips cleanly through `importPrivateKey`.
|
|
912
912
|
*/ function exportPrivateKey(param) {
|
|
913
|
-
var accountAddress = param.accountAddress, _param_password = param.password, password = _param_password === void 0 ? undefined : _param_password, signedSessionId = param.signedSessionId, mfaToken = param.mfaToken, elevatedAccessToken = param.elevatedAccessToken, traceContext = param.traceContext;
|
|
913
|
+
var accountAddress = param.accountAddress, _param_password = param.password, password = _param_password === void 0 ? undefined : _param_password, signedSessionId = param.signedSessionId, mfaToken = param.mfaToken, elevatedAccessToken = param.elevatedAccessToken, approvalQuorum = param.approvalQuorum, proposalId = param.proposalId, traceContext = param.traceContext;
|
|
914
914
|
var _this = this;
|
|
915
915
|
return _async_to_generator(function() {
|
|
916
916
|
var derivedPrivateKey, hex, error;
|
|
@@ -932,6 +932,8 @@ function _ts_generator(thisArg, body) {
|
|
|
932
932
|
signedSessionId: signedSessionId,
|
|
933
933
|
mfaToken: mfaToken,
|
|
934
934
|
elevatedAccessToken: elevatedAccessToken,
|
|
935
|
+
approvalQuorum: approvalQuorum,
|
|
936
|
+
proposalId: proposalId,
|
|
935
937
|
traceContext: traceContext
|
|
936
938
|
})
|
|
937
939
|
];
|
|
@@ -947,6 +949,9 @@ function _ts_generator(thisArg, body) {
|
|
|
947
949
|
];
|
|
948
950
|
case 2:
|
|
949
951
|
error = _state.sent();
|
|
952
|
+
// Not a failure: the export needs approvals, and the caller needs the
|
|
953
|
+
// reason and proposalId to continue.
|
|
954
|
+
if (_instanceof(error, browser.SigningConsentRequiredError)) throw error;
|
|
950
955
|
_this.logger.error(ERROR_EXPORT_PRIVATE_KEY, error);
|
|
951
956
|
throw new Error(ERROR_EXPORT_PRIVATE_KEY);
|
|
952
957
|
case 3:
|
|
@@ -1114,7 +1119,6 @@ function _ts_generator(thisArg, body) {
|
|
|
1114
1119
|
];
|
|
1115
1120
|
case 1:
|
|
1116
1121
|
wallets = _state.sent();
|
|
1117
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1118
1122
|
return [
|
|
1119
1123
|
2,
|
|
1120
1124
|
wallets.filter(function(wallet) {
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicWalletClient, ERROR_PASSWORD_MISMATCH, ERROR_MULTIPLE_WALLETS_PER_CHAIN, getMPCChainConfig } from '@dynamic-labs-wallet/browser';
|
|
1
|
+
import { DynamicWalletClient, ERROR_PASSWORD_MISMATCH, ERROR_MULTIPLE_WALLETS_PER_CHAIN, getMPCChainConfig, SigningConsentRequiredError } from '@dynamic-labs-wallet/browser';
|
|
2
2
|
import { SignMessageRawSignHashFunctionEnum } from '@dynamic-labs/sdk-api-core';
|
|
3
3
|
import * as sdkApiCore from '@dynamic-labs/sdk-api-core';
|
|
4
4
|
export { sdkApiCore };
|
|
@@ -891,7 +891,7 @@ function _ts_generator(thisArg, body) {
|
|
|
891
891
|
* matching what tronweb / TronLink expose. We return it as 0x-prefixed
|
|
892
892
|
* so it round-trips cleanly through `importPrivateKey`.
|
|
893
893
|
*/ function exportPrivateKey(param) {
|
|
894
|
-
var accountAddress = param.accountAddress, _param_password = param.password, password = _param_password === void 0 ? undefined : _param_password, signedSessionId = param.signedSessionId, mfaToken = param.mfaToken, elevatedAccessToken = param.elevatedAccessToken, traceContext = param.traceContext;
|
|
894
|
+
var accountAddress = param.accountAddress, _param_password = param.password, password = _param_password === void 0 ? undefined : _param_password, signedSessionId = param.signedSessionId, mfaToken = param.mfaToken, elevatedAccessToken = param.elevatedAccessToken, approvalQuorum = param.approvalQuorum, proposalId = param.proposalId, traceContext = param.traceContext;
|
|
895
895
|
var _this = this;
|
|
896
896
|
return _async_to_generator(function() {
|
|
897
897
|
var derivedPrivateKey, hex, error;
|
|
@@ -913,6 +913,8 @@ function _ts_generator(thisArg, body) {
|
|
|
913
913
|
signedSessionId: signedSessionId,
|
|
914
914
|
mfaToken: mfaToken,
|
|
915
915
|
elevatedAccessToken: elevatedAccessToken,
|
|
916
|
+
approvalQuorum: approvalQuorum,
|
|
917
|
+
proposalId: proposalId,
|
|
916
918
|
traceContext: traceContext
|
|
917
919
|
})
|
|
918
920
|
];
|
|
@@ -928,6 +930,9 @@ function _ts_generator(thisArg, body) {
|
|
|
928
930
|
];
|
|
929
931
|
case 2:
|
|
930
932
|
error = _state.sent();
|
|
933
|
+
// Not a failure: the export needs approvals, and the caller needs the
|
|
934
|
+
// reason and proposalId to continue.
|
|
935
|
+
if (_instanceof(error, SigningConsentRequiredError)) throw error;
|
|
931
936
|
_this.logger.error(ERROR_EXPORT_PRIVATE_KEY, error);
|
|
932
937
|
throw new Error(ERROR_EXPORT_PRIVATE_KEY);
|
|
933
938
|
case 3:
|
|
@@ -1095,7 +1100,6 @@ function _ts_generator(thisArg, body) {
|
|
|
1095
1100
|
];
|
|
1096
1101
|
case 1:
|
|
1097
1102
|
wallets = _state.sent();
|
|
1098
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1099
1103
|
return [
|
|
1100
1104
|
2,
|
|
1101
1105
|
wallets.filter(function(wallet) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/tron",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/browser": "1.1.
|
|
7
|
+
"@dynamic-labs-wallet/browser": "1.1.36",
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.50.0",
|
|
9
9
|
"@noble/hashes": "1.7.1",
|
|
10
10
|
"bs58": "^6.0.0"
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicWalletClient, type EcdsaKeygenResult, type EcdsaPublicKey, type Ed25519KeygenResult, type RequestWithElevatedAccessToken, type ThresholdSignatureScheme, type TraceContext, type BaseSignParams } from '@dynamic-labs-wallet/browser';
|
|
1
|
+
import { DynamicWalletClient, type EcdsaKeygenResult, type EcdsaPublicKey, type Ed25519KeygenResult, type RequestWithElevatedAccessToken, type ThresholdSignatureScheme, type TraceContext, type BaseSignParams, type ExportApprovalQuorumRequest } from '@dynamic-labs-wallet/browser';
|
|
2
2
|
import type { TronTransaction } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wallet client for TRON (SLIP-44 coin type 195, secp256k1 / ECDSA).
|
|
@@ -92,11 +92,15 @@ export declare class DynamicTronWalletClient extends DynamicWalletClient {
|
|
|
92
92
|
* matching what tronweb / TronLink expose. We return it as 0x-prefixed
|
|
93
93
|
* so it round-trips cleanly through `importPrivateKey`.
|
|
94
94
|
*/
|
|
95
|
-
exportPrivateKey({ accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, traceContext, }: RequestWithElevatedAccessToken<{
|
|
95
|
+
exportPrivateKey({ accountAddress, password, signedSessionId, mfaToken, elevatedAccessToken, approvalQuorum, proposalId, traceContext, }: RequestWithElevatedAccessToken<{
|
|
96
96
|
accountAddress: string;
|
|
97
97
|
password?: string;
|
|
98
98
|
signedSessionId: string;
|
|
99
99
|
mfaToken?: string;
|
|
100
|
+
/** The initiator's signed export Intent, from `prepareExportIntent`. */
|
|
101
|
+
approvalQuorum?: ExportApprovalQuorumRequest;
|
|
102
|
+
/** The approved export proposal being redeemed, from the consent error the export call raised. */
|
|
103
|
+
proposalId?: string;
|
|
100
104
|
traceContext?: TraceContext;
|
|
101
105
|
}>): Promise<string>;
|
|
102
106
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAInB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAInB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,cAAc,EAGnB,KAAK,2BAA2B,EACjC,MAAM,8BAA8B,CAAC;AAUtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAanD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,SAAS,UAAU;IAE5B;;OAEG;IACG,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,EACpB,OAAO,EACP,eAAe,EACf,YAAY,EACZ,iBAAiB,GAClB,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;QACjC,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,CAAC,EAAE,YAAY,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,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