@onekeyfe/hd-core 1.2.2-alpha.13 → 1.2.2-alpha.15
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/__tests__/device-lifecycle-events.test.ts +6 -8
- package/__tests__/open-wallet-session.test.ts +0 -53
- package/__tests__/protocol-v2.test.ts +35 -0
- package/__tests__/sol-sign-offchain-message.test.ts +73 -0
- package/dist/api/UploadPortfolio.d.ts +1 -0
- package/dist/api/UploadPortfolio.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/uiPromiseRegistry.d.ts +1 -1
- package/dist/device/DeviceCommands.d.ts +4 -4
- package/dist/index.d.ts +19 -12
- package/dist/index.js +73 -34
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +3 -4
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/solSignOffchainMessage.d.ts +2 -0
- package/dist/types/api/solSignOffchainMessage.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/package.json +4 -4
- package/src/api/UploadPortfolio.ts +5 -4
- package/src/api/solana/SolSignOffchainMessage.ts +63 -4
- package/src/core/index.ts +2 -3
- package/src/data/messages/messages-protocol-v2.json +8 -5
- package/src/data/messages/messages.json +8 -5
- package/src/protocols/protocol-v2/walletSession.ts +2 -7
- package/src/types/api/protocolV2.ts +3 -4
- package/src/types/api/solSignOffchainMessage.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -13203,7 +13203,8 @@ var nested$2 = {
|
|
|
13203
13203
|
},
|
|
13204
13204
|
SolanaOffChainMessageVersion: {
|
|
13205
13205
|
values: {
|
|
13206
|
-
MESSAGE_VERSION_0: 0
|
|
13206
|
+
MESSAGE_VERSION_0: 0,
|
|
13207
|
+
MESSAGE_VERSION_1: 1
|
|
13207
13208
|
}
|
|
13208
13209
|
},
|
|
13209
13210
|
SolanaOffChainMessageFormat: {
|
|
@@ -13236,14 +13237,16 @@ var nested$2 = {
|
|
|
13236
13237
|
},
|
|
13237
13238
|
message_format: {
|
|
13238
13239
|
type: "SolanaOffChainMessageFormat",
|
|
13239
|
-
id: 4
|
|
13240
|
-
options: {
|
|
13241
|
-
"default": "V0_RESTRICTED_ASCII"
|
|
13242
|
-
}
|
|
13240
|
+
id: 4
|
|
13243
13241
|
},
|
|
13244
13242
|
application_domain: {
|
|
13245
13243
|
type: "bytes",
|
|
13246
13244
|
id: 5
|
|
13245
|
+
},
|
|
13246
|
+
required_signers: {
|
|
13247
|
+
rule: "repeated",
|
|
13248
|
+
type: "bytes",
|
|
13249
|
+
id: 7
|
|
13247
13250
|
}
|
|
13248
13251
|
}
|
|
13249
13252
|
},
|
|
@@ -36027,7 +36030,8 @@ var nested = {
|
|
|
36027
36030
|
},
|
|
36028
36031
|
SolanaOffChainMessageVersion: {
|
|
36029
36032
|
values: {
|
|
36030
|
-
MESSAGE_VERSION_0: 0
|
|
36033
|
+
MESSAGE_VERSION_0: 0,
|
|
36034
|
+
MESSAGE_VERSION_1: 1
|
|
36031
36035
|
}
|
|
36032
36036
|
},
|
|
36033
36037
|
SolanaOffChainMessageFormat: {
|
|
@@ -36115,10 +36119,7 @@ var nested = {
|
|
|
36115
36119
|
},
|
|
36116
36120
|
message_format: {
|
|
36117
36121
|
type: "SolanaOffChainMessageFormat",
|
|
36118
|
-
id: 4
|
|
36119
|
-
options: {
|
|
36120
|
-
"default": "V0_RESTRICTED_ASCII"
|
|
36121
|
-
}
|
|
36122
|
+
id: 4
|
|
36122
36123
|
},
|
|
36123
36124
|
application_domain: {
|
|
36124
36125
|
type: "bytes",
|
|
@@ -36127,6 +36128,11 @@ var nested = {
|
|
|
36127
36128
|
source_fingerprint: {
|
|
36128
36129
|
type: "uint32",
|
|
36129
36130
|
id: 6
|
|
36131
|
+
},
|
|
36132
|
+
required_signers: {
|
|
36133
|
+
rule: "repeated",
|
|
36134
|
+
type: "bytes",
|
|
36135
|
+
id: 7
|
|
36130
36136
|
}
|
|
36131
36137
|
}
|
|
36132
36138
|
},
|
|
@@ -41811,7 +41817,7 @@ const selectDeviceSession = (device, expectedPassphraseState, deriveCardano, onS
|
|
|
41811
41817
|
return getDeviceSession(device, buildDeviceSessionGetRequest());
|
|
41812
41818
|
});
|
|
41813
41819
|
function getProtocolV2WalletSession(device, options) {
|
|
41814
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
41820
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
41815
41821
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41816
41822
|
const forceWalletSelection = (options === null || options === void 0 ? void 0 : options.forceWalletSelection) === true || (options === null || options === void 0 ? void 0 : options.initSession) === true;
|
|
41817
41823
|
const readCurrentAttachPinSession = (options === null || options === void 0 ? void 0 : options.readCurrentAttachPinSession) === true;
|
|
@@ -41882,7 +41888,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
41882
41888
|
return keepAttachPin ? Object.assign(session, { viaAttachPin: true }) : session;
|
|
41883
41889
|
});
|
|
41884
41890
|
const rejectMismatchedAttachPinWallet = () => __awaiter(this, void 0, void 0, function* () {
|
|
41885
|
-
var
|
|
41891
|
+
var _m;
|
|
41886
41892
|
const features = yield refreshProtocolV2DeviceStatus(device);
|
|
41887
41893
|
markWalletStatusRefreshed();
|
|
41888
41894
|
if (features.unlockedAttachPin !== true) {
|
|
@@ -41891,10 +41897,10 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
41891
41897
|
try {
|
|
41892
41898
|
yield device.lockDevice();
|
|
41893
41899
|
}
|
|
41894
|
-
catch (
|
|
41900
|
+
catch (_o) {
|
|
41895
41901
|
}
|
|
41896
41902
|
if (options === null || options === void 0 ? void 0 : options.rejectAttachPinForMainWallet) {
|
|
41897
|
-
(
|
|
41903
|
+
(_m = device.clearStandardInternalState) === null || _m === void 0 ? void 0 : _m.call(device);
|
|
41898
41904
|
device.clearInternalState();
|
|
41899
41905
|
}
|
|
41900
41906
|
else {
|
|
@@ -41903,11 +41909,11 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
41903
41909
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceCheckUnlockTypeError);
|
|
41904
41910
|
});
|
|
41905
41911
|
const lockAttachPinBeforePassphraseSelection = () => __awaiter(this, void 0, void 0, function* () {
|
|
41906
|
-
var
|
|
41912
|
+
var _p;
|
|
41907
41913
|
if (readCurrentAttachPinSession || (options === null || options === void 0 ? void 0 : options.onlyMainPin)) {
|
|
41908
41914
|
return;
|
|
41909
41915
|
}
|
|
41910
|
-
if (((
|
|
41916
|
+
if (((_p = device.features) === null || _p === void 0 ? void 0 : _p.unlockedAttachPin) !== true) {
|
|
41911
41917
|
return;
|
|
41912
41918
|
}
|
|
41913
41919
|
yield rejectMismatchedAttachPinWallet();
|
|
@@ -41928,8 +41934,8 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
41928
41934
|
}
|
|
41929
41935
|
});
|
|
41930
41936
|
const selectStandardWallet = (forceMainPin = false) => __awaiter(this, void 0, void 0, function* () {
|
|
41931
|
-
var
|
|
41932
|
-
if (((
|
|
41937
|
+
var _q;
|
|
41938
|
+
if (((_q = device.features) === null || _q === void 0 ? void 0 : _q.passphraseProtection) === true) {
|
|
41933
41939
|
yield selectMainPin();
|
|
41934
41940
|
yield askDevicePassphrase(device, {
|
|
41935
41941
|
passphrase: '',
|
|
@@ -41994,9 +42000,6 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
41994
42000
|
throw error;
|
|
41995
42001
|
}
|
|
41996
42002
|
resumed = false;
|
|
41997
|
-
if (((_g = device.features) === null || _g === void 0 ? void 0 : _g.unlockedAttachPin) === true) {
|
|
41998
|
-
response = yield getDeviceSession(device, sessionGetRequest());
|
|
41999
|
-
}
|
|
42000
42003
|
}
|
|
42001
42004
|
}
|
|
42002
42005
|
else if (expectedPassphraseState) {
|
|
@@ -42025,7 +42028,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
42025
42028
|
}
|
|
42026
42029
|
catch (error) {
|
|
42027
42030
|
if (options === null || options === void 0 ? void 0 : options.onlyMainPin) {
|
|
42028
|
-
(
|
|
42031
|
+
(_g = device.clearStandardInternalState) === null || _g === void 0 ? void 0 : _g.call(device);
|
|
42029
42032
|
}
|
|
42030
42033
|
else {
|
|
42031
42034
|
device.clearInternalState();
|
|
@@ -42040,7 +42043,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
42040
42043
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.WalletSessionInvalid);
|
|
42041
42044
|
}
|
|
42042
42045
|
if (options === null || options === void 0 ? void 0 : options.onlyMainPin) {
|
|
42043
|
-
(
|
|
42046
|
+
(_h = device.clearStandardInternalState) === null || _h === void 0 ? void 0 : _h.call(device);
|
|
42044
42047
|
yield selectStandardWallet(true);
|
|
42045
42048
|
response = yield getDeviceSession(device, sessionGetRequest());
|
|
42046
42049
|
}
|
|
@@ -42055,7 +42058,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
42055
42058
|
}
|
|
42056
42059
|
catch (error) {
|
|
42057
42060
|
if (options === null || options === void 0 ? void 0 : options.onlyMainPin) {
|
|
42058
|
-
(
|
|
42061
|
+
(_j = device.clearStandardInternalState) === null || _j === void 0 ? void 0 : _j.call(device);
|
|
42059
42062
|
}
|
|
42060
42063
|
else {
|
|
42061
42064
|
device.clearInternalState();
|
|
@@ -42078,7 +42081,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
42078
42081
|
if (sessionIsAttachPinWallet(response)) {
|
|
42079
42082
|
response = yield askEmptyPassphraseAndGet({ deriveCardano: true, keepAttachPin: true });
|
|
42080
42083
|
}
|
|
42081
|
-
else if (((
|
|
42084
|
+
else if (((_k = device.features) === null || _k === void 0 ? void 0 : _k.passphraseProtection) === false) {
|
|
42082
42085
|
response = yield getDeviceSession(device, buildDeviceSessionGetRequest());
|
|
42083
42086
|
}
|
|
42084
42087
|
else if (options === null || options === void 0 ? void 0 : options.onlyMainPin) {
|
|
@@ -42095,7 +42098,7 @@ function getProtocolV2WalletSession(device, options) {
|
|
|
42095
42098
|
}
|
|
42096
42099
|
catch (error) {
|
|
42097
42100
|
if (options === null || options === void 0 ? void 0 : options.onlyMainPin) {
|
|
42098
|
-
(
|
|
42101
|
+
(_l = device.clearStandardInternalState) === null || _l === void 0 ? void 0 : _l.call(device);
|
|
42099
42102
|
}
|
|
42100
42103
|
else {
|
|
42101
42104
|
device.clearInternalState();
|
|
@@ -55408,16 +55411,16 @@ const FILESYSTEM_FILE_WRITE_MESSAGE_TYPE = 60805;
|
|
|
55408
55411
|
const PORTFOLIO_UPDATE_MESSAGE_TYPE = 61400;
|
|
55409
55412
|
class UploadPortfolio extends FileWrite {
|
|
55410
55413
|
init() {
|
|
55411
|
-
const { packageBase64, timeoutMs } = this.payload;
|
|
55414
|
+
const { packageBase64, timeoutMs, uiMode = 'silent' } = this.payload;
|
|
55412
55415
|
const packageBytes = decodeCanonicalBase64({
|
|
55413
55416
|
value: packageBase64,
|
|
55414
55417
|
parameterName: 'packageBase64',
|
|
55415
55418
|
maxBytes: PORTFOLIO_PACKAGE_MAX_BYTES,
|
|
55416
55419
|
});
|
|
55417
|
-
this.payload = Object.assign(Object.assign({}, this.payload), { path: PORTFOLIO_PENDING_PATH, offset: 0, data: packageBytes, chunkSize: PORTFOLIO_CHUNK_SIZE, overwrite: true, append: false, emitProgress:
|
|
55420
|
+
this.payload = Object.assign(Object.assign({}, this.payload), { path: PORTFOLIO_PENDING_PATH, offset: 0, data: packageBytes, chunkSize: PORTFOLIO_CHUNK_SIZE, overwrite: true, append: false, emitProgress: uiMode === 'progress', timeoutMs });
|
|
55418
55421
|
super.init();
|
|
55419
55422
|
this.unlockPolicy = 'none';
|
|
55420
|
-
this.protocolV2UiMode = 'none';
|
|
55423
|
+
this.protocolV2UiMode = uiMode === 'progress' ? 'auto' : 'none';
|
|
55421
55424
|
}
|
|
55422
55425
|
run() {
|
|
55423
55426
|
const _super = Object.create(null, {
|
|
@@ -59463,6 +59466,29 @@ class SolSignTransaction extends BaseMethod {
|
|
|
59463
59466
|
}
|
|
59464
59467
|
}
|
|
59465
59468
|
|
|
59469
|
+
const SOLANA_PUBLIC_KEY_LENGTH = 32;
|
|
59470
|
+
const SOLANA_APPLICATION_DOMAIN_LENGTH = 32;
|
|
59471
|
+
const MAX_REQUIRED_SIGNERS = 10;
|
|
59472
|
+
const normalizeRequiredSigners = (requiredSigners) => {
|
|
59473
|
+
if (!requiredSigners)
|
|
59474
|
+
return undefined;
|
|
59475
|
+
if (requiredSigners.length > MAX_REQUIRED_SIGNERS) {
|
|
59476
|
+
throw invalidParameter(`Parameter [requiredSigners] supports at most ${MAX_REQUIRED_SIGNERS} entries.`);
|
|
59477
|
+
}
|
|
59478
|
+
const normalized = requiredSigners.map((signer, index) => {
|
|
59479
|
+
if (typeof signer !== 'string' ||
|
|
59480
|
+
!isHexString(addHexPrefix(signer), SOLANA_PUBLIC_KEY_LENGTH)) {
|
|
59481
|
+
throw invalidParameter(`Parameter [requiredSigners][${index}] must be a ${SOLANA_PUBLIC_KEY_LENGTH}-byte hex public key.`);
|
|
59482
|
+
}
|
|
59483
|
+
return stripHexPrefix(signer).toLowerCase();
|
|
59484
|
+
});
|
|
59485
|
+
for (let index = 1; index < normalized.length; index += 1) {
|
|
59486
|
+
if (normalized[index - 1] >= normalized[index]) {
|
|
59487
|
+
throw invalidParameter('Parameter [requiredSigners] must be strictly sorted and unique.');
|
|
59488
|
+
}
|
|
59489
|
+
}
|
|
59490
|
+
return normalized;
|
|
59491
|
+
};
|
|
59466
59492
|
class SolSignOffchainMessage extends BaseMethod {
|
|
59467
59493
|
getSupportedProtocols() {
|
|
59468
59494
|
return ['V1', 'V2'];
|
|
@@ -59477,15 +59503,29 @@ class SolSignOffchainMessage extends BaseMethod {
|
|
|
59477
59503
|
{ name: 'messageVersion', type: 'number', required: false },
|
|
59478
59504
|
{ name: 'messageFormat', type: 'number', required: false },
|
|
59479
59505
|
{ name: 'applicationDomainHex', type: 'hexString', required: false },
|
|
59506
|
+
{ name: 'sourceFingerprint', type: 'number', required: false },
|
|
59507
|
+
{ name: 'requiredSigners', type: 'array', required: false, allowEmpty: true },
|
|
59480
59508
|
]);
|
|
59481
|
-
const { path, messageHex, messageVersion, messageFormat, applicationDomainHex } = this.payload;
|
|
59509
|
+
const { path, messageHex, messageVersion, messageFormat, applicationDomainHex, sourceFingerprint, requiredSigners, } = this.payload;
|
|
59482
59510
|
const addressN = validatePath(path, 3);
|
|
59511
|
+
if (sourceFingerprint !== undefined &&
|
|
59512
|
+
(!Number.isInteger(sourceFingerprint) ||
|
|
59513
|
+
sourceFingerprint < 0 ||
|
|
59514
|
+
sourceFingerprint > 0xffffffff)) {
|
|
59515
|
+
throw invalidParameter('Parameter [sourceFingerprint] must be a uint32 number.');
|
|
59516
|
+
}
|
|
59517
|
+
if (applicationDomainHex !== undefined &&
|
|
59518
|
+
!isHexString(addHexPrefix(applicationDomainHex), SOLANA_APPLICATION_DOMAIN_LENGTH)) {
|
|
59519
|
+
throw invalidParameter('Parameter [applicationDomainHex] must be 32 bytes.');
|
|
59520
|
+
}
|
|
59483
59521
|
this.params = {
|
|
59484
59522
|
address_n: addressN,
|
|
59485
59523
|
message: stripHexPrefix(messageHex),
|
|
59486
59524
|
message_version: messageVersion !== null && messageVersion !== void 0 ? messageVersion : undefined,
|
|
59487
59525
|
message_format: messageFormat !== null && messageFormat !== void 0 ? messageFormat : undefined,
|
|
59488
|
-
application_domain: applicationDomainHex
|
|
59526
|
+
application_domain: applicationDomainHex ? stripHexPrefix(applicationDomainHex) : undefined,
|
|
59527
|
+
source_fingerprint: sourceFingerprint !== null && sourceFingerprint !== void 0 ? sourceFingerprint : undefined,
|
|
59528
|
+
required_signers: normalizeRequiredSigners(requiredSigners),
|
|
59489
59529
|
};
|
|
59490
59530
|
}
|
|
59491
59531
|
getVersionRange() {
|
|
@@ -66347,10 +66387,9 @@ function isMissingDetectedProtocolV2Error(method, error) {
|
|
|
66347
66387
|
typedError.message.includes('Device protocol has not been detected'));
|
|
66348
66388
|
}
|
|
66349
66389
|
function isProtocolV2PeerRemovedPairingError(method, error) {
|
|
66350
|
-
const errorCode = error === null || error === void 0 ? void 0 : error.errorCode;
|
|
66351
66390
|
return (method.payload.connectProtocol === 'V2' &&
|
|
66352
|
-
(
|
|
66353
|
-
|
|
66391
|
+
(error === null || error === void 0 ? void 0 : error.errorCode) ===
|
|
66392
|
+
hdShared.HardwareErrorCode.BlePeerRemovedPairingInformation);
|
|
66354
66393
|
}
|
|
66355
66394
|
const BLE_ACQUIRE_DEADLINE_MS = 60 * 1000;
|
|
66356
66395
|
function raceBleAcquire(acquirePromise, abortSignal) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletSession.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/walletSession.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAuBlD,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,0DAGjE;AAED,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,qCAGjE;AAED,wBAAsB,qCAAqC,CAAC,MAAM,EAAE,MAAM,oBAgBzE;AA8JD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;;;;
|
|
1
|
+
{"version":3,"file":"walletSession.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/walletSession.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAuBlD,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,0DAGjE;AAED,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,qCAGjE;AAED,wBAAsB,qCAAqC,CAAC,MAAM,EAAE,MAAM,oBAgBzE;AA8JD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;;;;GA6XF;AAED,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,MAAM,EAC/B,aAAa,CAAC,EAAE,OAAO;;;;;;GAOxB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { CommonParams, Response } from '../params';
|
|
2
2
|
import type { OnboardingStatus, Success } from '@onekeyfe/hd-transport';
|
|
3
3
|
import type { DeviceRebootParams } from '../../api/protocol-v2/helpers';
|
|
4
|
+
import type { UploadPortfolioParams } from '../../api/UploadPortfolio';
|
|
4
5
|
import type { DeviceUploadWallpaperParams, DeviceUploadWallpaperResponse } from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
5
6
|
import type { DeviceUploadNftParams, DeviceUploadNftResponse } from '../../api/protocol-v2/DeviceUploadNft';
|
|
6
7
|
export type { DeviceRebootParams, RebootTypeInput } from '../../api/protocol-v2/helpers';
|
|
8
|
+
export type { UploadPortfolioParams } from '../../api/UploadPortfolio';
|
|
7
9
|
export type { DeviceUploadWallpaperParams, DeviceUploadWallpaperResponse, } from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
8
10
|
export type { DeviceUploadNftParams, DeviceUploadNftResponse, } from '../../api/protocol-v2/DeviceUploadNft';
|
|
9
11
|
export type FileInfo = {
|
|
@@ -23,10 +25,7 @@ export declare function deviceReboot(connectId: string, params: CommonParams & D
|
|
|
23
25
|
export declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
24
26
|
export declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
25
27
|
export declare function deviceUploadNft(connectId: string, params: CommonParams & DeviceUploadNftParams): Response<DeviceUploadNftResponse>;
|
|
26
|
-
export declare function uploadPortfolio(connectId: string, params: {
|
|
27
|
-
packageBase64: string;
|
|
28
|
-
timeoutMs?: number | string;
|
|
29
|
-
}): Response<FileInfo & {
|
|
28
|
+
export declare function uploadPortfolio(connectId: string, params: UploadPortfolioParams): Response<FileInfo & {
|
|
30
29
|
portfolioUpdated: true;
|
|
31
30
|
}>;
|
|
32
31
|
//# sourceMappingURL=protocolV2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocolV2.d.ts","sourceRoot":"","sources":["../../../src/types/api/protocolV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,K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C;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG,YAAY,GAAG;IAEpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,wBAAwB,GAChC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,kBAAkB,GACxC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,YAAY,GACpB,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE9B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,2BAA2B,GACjD,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,qBAAqB,GAC3C,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,qBAAqB,GAC5B,QAAQ,CAAC,QAAQ,GAAG;IAAE,gBAAgB,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -10,6 +10,8 @@ export type SolSignOffchainMessageParams = {
|
|
|
10
10
|
messageVersion?: SolanaOffChainMessageVersion;
|
|
11
11
|
messageFormat?: SolanaOffChainMessageFormat;
|
|
12
12
|
applicationDomainHex?: string;
|
|
13
|
+
sourceFingerprint?: number;
|
|
14
|
+
requiredSigners?: string[];
|
|
13
15
|
};
|
|
14
16
|
export declare function solSignOffchainMessage(connectId: string, deviceId: string, params: CommonParams & SolSignOffchainMessageParams): Response<SolSignOffchainMessageResponse>;
|
|
15
17
|
//# sourceMappingURL=solSignOffchainMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solSignOffchainMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/solSignOffchainMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,4BAA4B,CAAC;IAC9C,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"solSignOffchainMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/solSignOffchainMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,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