@onekeyfe/hd-core 0.2.13 → 0.2.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/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/cardano/helper/auxiliaryData.d.ts.map +1 -1
- package/dist/api/cardano/helper/cardanoInputs.d.ts.map +1 -1
- package/dist/api/cardano/helper/cardanoOutputs.d.ts.map +1 -1
- package/dist/api/cardano/helper/certificate.d.ts.map +1 -1
- package/dist/api/cardano/helper/witnesses.d.ts.map +1 -1
- package/dist/api/device/DeviceUploadResource.d.ts.map +1 -1
- package/dist/api/index.d.ts +0 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/index.d.ts +15 -13
- package/dist/index.js +272 -222
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/cardano.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +0 -2
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/xrpSignTransaction.d.ts +15 -2
- package/dist/types/api/xrpSignTransaction.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/cardano/CardanoGetAddress.ts +1 -1
- package/src/api/cardano/CardanoGetPublicKey.ts +2 -2
- package/src/api/cardano/CardanoSignTransaction.ts +7 -2
- package/src/api/cardano/helper/auxiliaryData.ts +0 -4
- package/src/api/cardano/helper/cardanoInputs.ts +2 -0
- package/src/api/cardano/helper/cardanoOutputs.ts +1 -0
- package/src/api/cardano/helper/certificate.ts +2 -0
- package/src/api/cardano/helper/witnesses.ts +2 -0
- package/src/api/device/DeviceUploadResource.ts +1 -3
- package/src/api/index.ts +0 -1
- package/src/data/messages/messages.json +368 -281
- package/src/data-manager/DataManager.ts +5 -1
- package/src/inject.ts +0 -2
- package/src/types/api/cardano.ts +1 -0
- package/src/types/api/index.ts +0 -2
- package/src/types/api/nearGetAddress.ts +2 -2
- package/src/types/api/xrpSignTransaction.ts +16 -2
- package/dist/api/cardano/CardanoSignMessage.d.ts +0 -14
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +0 -1
- package/dist/types/api/cardanoSignMessage.d.ts +0 -16
- package/dist/types/api/cardanoSignMessage.d.ts.map +0 -1
- package/src/api/cardano/CardanoSignMessage.ts +0 -58
- package/src/types/api/cardanoSignMessage.ts +0 -22
package/dist/index.js
CHANGED
|
@@ -111,7 +111,6 @@ const inject = ({ call, cancel, dispose, eventEmitter, init, uiResponse, }) => {
|
|
|
111
111
|
cardanoGetAddress: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoGetAddress' })),
|
|
112
112
|
cardanoGetPublicKey: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoGetPublicKey' })),
|
|
113
113
|
cardanoSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoSignTransaction' })),
|
|
114
|
-
cardanoSignMessage: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoSignMessage' })),
|
|
115
114
|
};
|
|
116
115
|
return api;
|
|
117
116
|
};
|
|
@@ -2533,12 +2532,6 @@ var nested = {
|
|
|
2533
2532
|
POLICY_ID: 2
|
|
2534
2533
|
}
|
|
2535
2534
|
},
|
|
2536
|
-
CardanoTxOutputSerializationFormat: {
|
|
2537
|
-
values: {
|
|
2538
|
-
ARRAY_LEGACY: 0,
|
|
2539
|
-
MAP_BABBAGE: 1
|
|
2540
|
-
}
|
|
2541
|
-
},
|
|
2542
2535
|
CardanoCertificateType: {
|
|
2543
2536
|
values: {
|
|
2544
2537
|
STAKE_REGISTRATION: 0,
|
|
@@ -2557,21 +2550,14 @@ var nested = {
|
|
|
2557
2550
|
CardanoTxAuxiliaryDataSupplementType: {
|
|
2558
2551
|
values: {
|
|
2559
2552
|
NONE: 0,
|
|
2560
|
-
|
|
2561
|
-
}
|
|
2562
|
-
},
|
|
2563
|
-
CardanoGovernanceRegistrationFormat: {
|
|
2564
|
-
values: {
|
|
2565
|
-
CIP15: 0,
|
|
2566
|
-
CIP36: 1
|
|
2553
|
+
CATALYST_REGISTRATION_SIGNATURE: 1
|
|
2567
2554
|
}
|
|
2568
2555
|
},
|
|
2569
2556
|
CardanoTxSigningMode: {
|
|
2570
2557
|
values: {
|
|
2571
2558
|
ORDINARY_TRANSACTION: 0,
|
|
2572
2559
|
POOL_REGISTRATION_AS_OWNER: 1,
|
|
2573
|
-
MULTISIG_TRANSACTION: 2
|
|
2574
|
-
PLUTUS_TRANSACTION: 3
|
|
2560
|
+
MULTISIG_TRANSACTION: 2
|
|
2575
2561
|
}
|
|
2576
2562
|
},
|
|
2577
2563
|
CardanoTxWitnessType: {
|
|
@@ -2925,31 +2911,6 @@ var nested = {
|
|
|
2925
2911
|
rule: "required",
|
|
2926
2912
|
type: "uint32",
|
|
2927
2913
|
id: 4
|
|
2928
|
-
},
|
|
2929
|
-
datum_hash: {
|
|
2930
|
-
type: "bytes",
|
|
2931
|
-
id: 5
|
|
2932
|
-
},
|
|
2933
|
-
format: {
|
|
2934
|
-
type: "CardanoTxOutputSerializationFormat",
|
|
2935
|
-
id: 6,
|
|
2936
|
-
options: {
|
|
2937
|
-
"default": "ARRAY_LEGACY"
|
|
2938
|
-
}
|
|
2939
|
-
},
|
|
2940
|
-
inline_datum_size: {
|
|
2941
|
-
type: "uint32",
|
|
2942
|
-
id: 7,
|
|
2943
|
-
options: {
|
|
2944
|
-
"default": 0
|
|
2945
|
-
}
|
|
2946
|
-
},
|
|
2947
|
-
reference_script_size: {
|
|
2948
|
-
type: "uint32",
|
|
2949
|
-
id: 8,
|
|
2950
|
-
options: {
|
|
2951
|
-
"default": 0
|
|
2952
|
-
}
|
|
2953
2914
|
}
|
|
2954
2915
|
}
|
|
2955
2916
|
},
|
|
@@ -2984,24 +2945,6 @@ var nested = {
|
|
|
2984
2945
|
}
|
|
2985
2946
|
}
|
|
2986
2947
|
},
|
|
2987
|
-
CardanoTxInlineDatumChunk: {
|
|
2988
|
-
fields: {
|
|
2989
|
-
data: {
|
|
2990
|
-
rule: "required",
|
|
2991
|
-
type: "bytes",
|
|
2992
|
-
id: 1
|
|
2993
|
-
}
|
|
2994
|
-
}
|
|
2995
|
-
},
|
|
2996
|
-
CardanoTxReferenceScriptChunk: {
|
|
2997
|
-
fields: {
|
|
2998
|
-
data: {
|
|
2999
|
-
rule: "required",
|
|
3000
|
-
type: "bytes",
|
|
3001
|
-
id: 1
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
|
-
},
|
|
3005
2948
|
CardanoPoolOwner: {
|
|
3006
2949
|
fields: {
|
|
3007
2950
|
staking_key_path: {
|
|
@@ -3094,6 +3037,22 @@ var nested = {
|
|
|
3094
3037
|
type: "string",
|
|
3095
3038
|
id: 7
|
|
3096
3039
|
},
|
|
3040
|
+
owners: {
|
|
3041
|
+
rule: "repeated",
|
|
3042
|
+
type: "CardanoPoolOwner",
|
|
3043
|
+
id: 8,
|
|
3044
|
+
options: {
|
|
3045
|
+
deprecated: true
|
|
3046
|
+
}
|
|
3047
|
+
},
|
|
3048
|
+
relays: {
|
|
3049
|
+
rule: "repeated",
|
|
3050
|
+
type: "CardanoPoolRelayParameters",
|
|
3051
|
+
id: 9,
|
|
3052
|
+
options: {
|
|
3053
|
+
deprecated: true
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3097
3056
|
metadata: {
|
|
3098
3057
|
type: "CardanoPoolMetadataType",
|
|
3099
3058
|
id: 10
|
|
@@ -3136,10 +3095,6 @@ var nested = {
|
|
|
3136
3095
|
script_hash: {
|
|
3137
3096
|
type: "bytes",
|
|
3138
3097
|
id: 5
|
|
3139
|
-
},
|
|
3140
|
-
key_hash: {
|
|
3141
|
-
type: "bytes",
|
|
3142
|
-
id: 6
|
|
3143
3098
|
}
|
|
3144
3099
|
}
|
|
3145
3100
|
},
|
|
@@ -3161,33 +3116,16 @@ var nested = {
|
|
|
3161
3116
|
script_hash: {
|
|
3162
3117
|
type: "bytes",
|
|
3163
3118
|
id: 3
|
|
3164
|
-
},
|
|
3165
|
-
key_hash: {
|
|
3166
|
-
type: "bytes",
|
|
3167
|
-
id: 4
|
|
3168
3119
|
}
|
|
3169
3120
|
}
|
|
3170
3121
|
},
|
|
3171
|
-
|
|
3122
|
+
CardanoCatalystRegistrationParametersType: {
|
|
3172
3123
|
fields: {
|
|
3173
3124
|
voting_public_key: {
|
|
3174
3125
|
rule: "required",
|
|
3175
3126
|
type: "bytes",
|
|
3176
3127
|
id: 1
|
|
3177
3128
|
},
|
|
3178
|
-
weight: {
|
|
3179
|
-
rule: "required",
|
|
3180
|
-
type: "uint32",
|
|
3181
|
-
id: 2
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
},
|
|
3185
|
-
CardanoGovernanceRegistrationParametersType: {
|
|
3186
|
-
fields: {
|
|
3187
|
-
voting_public_key: {
|
|
3188
|
-
type: "bytes",
|
|
3189
|
-
id: 1
|
|
3190
|
-
},
|
|
3191
3129
|
staking_path: {
|
|
3192
3130
|
rule: "repeated",
|
|
3193
3131
|
type: "uint32",
|
|
@@ -3205,29 +3143,13 @@ var nested = {
|
|
|
3205
3143
|
rule: "required",
|
|
3206
3144
|
type: "uint64",
|
|
3207
3145
|
id: 4
|
|
3208
|
-
},
|
|
3209
|
-
format: {
|
|
3210
|
-
type: "CardanoGovernanceRegistrationFormat",
|
|
3211
|
-
id: 5,
|
|
3212
|
-
options: {
|
|
3213
|
-
"default": "CIP15"
|
|
3214
|
-
}
|
|
3215
|
-
},
|
|
3216
|
-
delegations: {
|
|
3217
|
-
rule: "repeated",
|
|
3218
|
-
type: "CardanoGovernanceRegistrationDelegation",
|
|
3219
|
-
id: 6
|
|
3220
|
-
},
|
|
3221
|
-
voting_purpose: {
|
|
3222
|
-
type: "uint64",
|
|
3223
|
-
id: 7
|
|
3224
3146
|
}
|
|
3225
3147
|
}
|
|
3226
3148
|
},
|
|
3227
3149
|
CardanoTxAuxiliaryData: {
|
|
3228
3150
|
fields: {
|
|
3229
|
-
|
|
3230
|
-
type: "
|
|
3151
|
+
catalyst_registration_parameters: {
|
|
3152
|
+
type: "CardanoCatalystRegistrationParametersType",
|
|
3231
3153
|
id: 1
|
|
3232
3154
|
},
|
|
3233
3155
|
hash: {
|
|
@@ -3245,50 +3167,6 @@ var nested = {
|
|
|
3245
3167
|
}
|
|
3246
3168
|
}
|
|
3247
3169
|
},
|
|
3248
|
-
CardanoTxCollateralInput: {
|
|
3249
|
-
fields: {
|
|
3250
|
-
prev_hash: {
|
|
3251
|
-
rule: "required",
|
|
3252
|
-
type: "bytes",
|
|
3253
|
-
id: 1
|
|
3254
|
-
},
|
|
3255
|
-
prev_index: {
|
|
3256
|
-
rule: "required",
|
|
3257
|
-
type: "uint32",
|
|
3258
|
-
id: 2
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
},
|
|
3262
|
-
CardanoTxRequiredSigner: {
|
|
3263
|
-
fields: {
|
|
3264
|
-
key_hash: {
|
|
3265
|
-
type: "bytes",
|
|
3266
|
-
id: 1
|
|
3267
|
-
},
|
|
3268
|
-
key_path: {
|
|
3269
|
-
rule: "repeated",
|
|
3270
|
-
type: "uint32",
|
|
3271
|
-
id: 2,
|
|
3272
|
-
options: {
|
|
3273
|
-
packed: false
|
|
3274
|
-
}
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
},
|
|
3278
|
-
CardanoTxReferenceInput: {
|
|
3279
|
-
fields: {
|
|
3280
|
-
prev_hash: {
|
|
3281
|
-
rule: "required",
|
|
3282
|
-
type: "bytes",
|
|
3283
|
-
id: 1
|
|
3284
|
-
},
|
|
3285
|
-
prev_index: {
|
|
3286
|
-
rule: "required",
|
|
3287
|
-
type: "uint32",
|
|
3288
|
-
id: 2
|
|
3289
|
-
}
|
|
3290
|
-
}
|
|
3291
|
-
},
|
|
3292
3170
|
CardanoTxItemAck: {
|
|
3293
3171
|
fields: {
|
|
3294
3172
|
}
|
|
@@ -3304,7 +3182,7 @@ var nested = {
|
|
|
3304
3182
|
type: "bytes",
|
|
3305
3183
|
id: 2
|
|
3306
3184
|
},
|
|
3307
|
-
|
|
3185
|
+
catalyst_signature: {
|
|
3308
3186
|
type: "bytes",
|
|
3309
3187
|
id: 3
|
|
3310
3188
|
}
|
|
@@ -3362,42 +3240,259 @@ var nested = {
|
|
|
3362
3240
|
fields: {
|
|
3363
3241
|
}
|
|
3364
3242
|
},
|
|
3365
|
-
|
|
3243
|
+
CardanoSignTx: {
|
|
3244
|
+
options: {
|
|
3245
|
+
deprecated: true
|
|
3246
|
+
},
|
|
3366
3247
|
fields: {
|
|
3367
|
-
|
|
3248
|
+
inputs: {
|
|
3368
3249
|
rule: "repeated",
|
|
3369
|
-
type: "
|
|
3370
|
-
id: 1
|
|
3371
|
-
options: {
|
|
3372
|
-
packed: false
|
|
3373
|
-
}
|
|
3250
|
+
type: "CardanoTxInputType",
|
|
3251
|
+
id: 1
|
|
3374
3252
|
},
|
|
3375
|
-
|
|
3376
|
-
rule: "
|
|
3377
|
-
type: "
|
|
3253
|
+
outputs: {
|
|
3254
|
+
rule: "repeated",
|
|
3255
|
+
type: "CardanoTxOutputType",
|
|
3378
3256
|
id: 2
|
|
3379
3257
|
},
|
|
3380
|
-
|
|
3258
|
+
protocol_magic: {
|
|
3381
3259
|
rule: "required",
|
|
3382
|
-
type: "
|
|
3383
|
-
id:
|
|
3260
|
+
type: "uint32",
|
|
3261
|
+
id: 5
|
|
3262
|
+
},
|
|
3263
|
+
fee: {
|
|
3264
|
+
rule: "required",
|
|
3265
|
+
type: "uint64",
|
|
3266
|
+
id: 6
|
|
3267
|
+
},
|
|
3268
|
+
ttl: {
|
|
3269
|
+
type: "uint64",
|
|
3270
|
+
id: 7
|
|
3384
3271
|
},
|
|
3385
3272
|
network_id: {
|
|
3386
3273
|
rule: "required",
|
|
3387
3274
|
type: "uint32",
|
|
3388
|
-
id:
|
|
3275
|
+
id: 8
|
|
3276
|
+
},
|
|
3277
|
+
certificates: {
|
|
3278
|
+
rule: "repeated",
|
|
3279
|
+
type: "CardanoTxCertificateType",
|
|
3280
|
+
id: 9
|
|
3281
|
+
},
|
|
3282
|
+
withdrawals: {
|
|
3283
|
+
rule: "repeated",
|
|
3284
|
+
type: "CardanoTxWithdrawalType",
|
|
3285
|
+
id: 10
|
|
3286
|
+
},
|
|
3287
|
+
validity_interval_start: {
|
|
3288
|
+
type: "uint64",
|
|
3289
|
+
id: 12
|
|
3290
|
+
},
|
|
3291
|
+
auxiliary_data: {
|
|
3292
|
+
type: "CardanoTxAuxiliaryDataType",
|
|
3293
|
+
id: 13
|
|
3294
|
+
}
|
|
3295
|
+
},
|
|
3296
|
+
nested: {
|
|
3297
|
+
CardanoTxInputType: {
|
|
3298
|
+
fields: {
|
|
3299
|
+
address_n: {
|
|
3300
|
+
rule: "repeated",
|
|
3301
|
+
type: "uint32",
|
|
3302
|
+
id: 1,
|
|
3303
|
+
options: {
|
|
3304
|
+
packed: false
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
prev_hash: {
|
|
3308
|
+
rule: "required",
|
|
3309
|
+
type: "bytes",
|
|
3310
|
+
id: 2
|
|
3311
|
+
},
|
|
3312
|
+
prev_index: {
|
|
3313
|
+
rule: "required",
|
|
3314
|
+
type: "uint32",
|
|
3315
|
+
id: 3
|
|
3316
|
+
}
|
|
3317
|
+
}
|
|
3318
|
+
},
|
|
3319
|
+
CardanoTxOutputType: {
|
|
3320
|
+
fields: {
|
|
3321
|
+
address: {
|
|
3322
|
+
type: "string",
|
|
3323
|
+
id: 1
|
|
3324
|
+
},
|
|
3325
|
+
amount: {
|
|
3326
|
+
rule: "required",
|
|
3327
|
+
type: "uint64",
|
|
3328
|
+
id: 3
|
|
3329
|
+
},
|
|
3330
|
+
address_parameters: {
|
|
3331
|
+
type: "CardanoAddressParametersType",
|
|
3332
|
+
id: 4
|
|
3333
|
+
},
|
|
3334
|
+
token_bundle: {
|
|
3335
|
+
rule: "repeated",
|
|
3336
|
+
type: "CardanoAssetGroupType",
|
|
3337
|
+
id: 5
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
},
|
|
3341
|
+
CardanoAssetGroupType: {
|
|
3342
|
+
fields: {
|
|
3343
|
+
policy_id: {
|
|
3344
|
+
rule: "required",
|
|
3345
|
+
type: "bytes",
|
|
3346
|
+
id: 1
|
|
3347
|
+
},
|
|
3348
|
+
tokens: {
|
|
3349
|
+
rule: "repeated",
|
|
3350
|
+
type: "CardanoTokenType",
|
|
3351
|
+
id: 2
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
},
|
|
3355
|
+
CardanoTokenType: {
|
|
3356
|
+
fields: {
|
|
3357
|
+
asset_name_bytes: {
|
|
3358
|
+
rule: "required",
|
|
3359
|
+
type: "bytes",
|
|
3360
|
+
id: 1
|
|
3361
|
+
},
|
|
3362
|
+
amount: {
|
|
3363
|
+
rule: "required",
|
|
3364
|
+
type: "uint64",
|
|
3365
|
+
id: 2
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
},
|
|
3369
|
+
CardanoPoolOwnerType: {
|
|
3370
|
+
fields: {
|
|
3371
|
+
staking_key_path: {
|
|
3372
|
+
rule: "repeated",
|
|
3373
|
+
type: "uint32",
|
|
3374
|
+
id: 1,
|
|
3375
|
+
options: {
|
|
3376
|
+
packed: false
|
|
3377
|
+
}
|
|
3378
|
+
},
|
|
3379
|
+
staking_key_hash: {
|
|
3380
|
+
type: "bytes",
|
|
3381
|
+
id: 2
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
},
|
|
3385
|
+
CardanoPoolRelayParametersType: {
|
|
3386
|
+
fields: {
|
|
3387
|
+
type: {
|
|
3388
|
+
rule: "required",
|
|
3389
|
+
type: "CardanoPoolRelayType",
|
|
3390
|
+
id: 1
|
|
3391
|
+
},
|
|
3392
|
+
ipv4_address: {
|
|
3393
|
+
type: "bytes",
|
|
3394
|
+
id: 2
|
|
3395
|
+
},
|
|
3396
|
+
ipv6_address: {
|
|
3397
|
+
type: "bytes",
|
|
3398
|
+
id: 3
|
|
3399
|
+
},
|
|
3400
|
+
host_name: {
|
|
3401
|
+
type: "string",
|
|
3402
|
+
id: 4
|
|
3403
|
+
},
|
|
3404
|
+
port: {
|
|
3405
|
+
type: "uint32",
|
|
3406
|
+
id: 5
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
},
|
|
3410
|
+
CardanoTxCertificateType: {
|
|
3411
|
+
fields: {
|
|
3412
|
+
type: {
|
|
3413
|
+
rule: "required",
|
|
3414
|
+
type: "CardanoCertificateType",
|
|
3415
|
+
id: 1
|
|
3416
|
+
},
|
|
3417
|
+
path: {
|
|
3418
|
+
rule: "repeated",
|
|
3419
|
+
type: "uint32",
|
|
3420
|
+
id: 2,
|
|
3421
|
+
options: {
|
|
3422
|
+
packed: false
|
|
3423
|
+
}
|
|
3424
|
+
},
|
|
3425
|
+
pool: {
|
|
3426
|
+
type: "bytes",
|
|
3427
|
+
id: 3
|
|
3428
|
+
},
|
|
3429
|
+
pool_parameters: {
|
|
3430
|
+
type: "CardanoPoolParametersType",
|
|
3431
|
+
id: 4
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
},
|
|
3435
|
+
CardanoTxWithdrawalType: {
|
|
3436
|
+
fields: {
|
|
3437
|
+
path: {
|
|
3438
|
+
rule: "repeated",
|
|
3439
|
+
type: "uint32",
|
|
3440
|
+
id: 1,
|
|
3441
|
+
options: {
|
|
3442
|
+
packed: false
|
|
3443
|
+
}
|
|
3444
|
+
},
|
|
3445
|
+
amount: {
|
|
3446
|
+
rule: "required",
|
|
3447
|
+
type: "uint64",
|
|
3448
|
+
id: 2
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
CardanoTxAuxiliaryDataType: {
|
|
3453
|
+
fields: {
|
|
3454
|
+
blob: {
|
|
3455
|
+
type: "bytes",
|
|
3456
|
+
id: 1
|
|
3457
|
+
},
|
|
3458
|
+
catalyst_registration_parameters: {
|
|
3459
|
+
type: "CardanoCatalystRegistrationParametersType",
|
|
3460
|
+
id: 2
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3389
3463
|
}
|
|
3390
3464
|
}
|
|
3391
3465
|
},
|
|
3392
|
-
|
|
3466
|
+
CardanoSignedTxChunk: {
|
|
3467
|
+
options: {
|
|
3468
|
+
deprecated: true
|
|
3469
|
+
},
|
|
3393
3470
|
fields: {
|
|
3394
|
-
|
|
3471
|
+
signed_tx_chunk: {
|
|
3395
3472
|
rule: "required",
|
|
3396
3473
|
type: "bytes",
|
|
3397
3474
|
id: 1
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
},
|
|
3478
|
+
CardanoSignedTxChunkAck: {
|
|
3479
|
+
options: {
|
|
3480
|
+
deprecated: true
|
|
3481
|
+
},
|
|
3482
|
+
fields: {
|
|
3483
|
+
}
|
|
3484
|
+
},
|
|
3485
|
+
CardanoSignedTx: {
|
|
3486
|
+
options: {
|
|
3487
|
+
deprecated: true
|
|
3488
|
+
},
|
|
3489
|
+
fields: {
|
|
3490
|
+
tx_hash: {
|
|
3400
3491
|
rule: "required",
|
|
3492
|
+
type: "bytes",
|
|
3493
|
+
id: 1
|
|
3494
|
+
},
|
|
3495
|
+
serialized_tx: {
|
|
3401
3496
|
type: "bytes",
|
|
3402
3497
|
id: 2
|
|
3403
3498
|
}
|
|
@@ -6310,16 +6405,11 @@ var nested = {
|
|
|
6310
6405
|
zoom_data_length: {
|
|
6311
6406
|
rule: "required",
|
|
6312
6407
|
type: "uint32",
|
|
6313
|
-
id: 4
|
|
6314
|
-
},
|
|
6315
|
-
file_name_no_ext: {
|
|
6316
|
-
rule: "required",
|
|
6317
|
-
type: "string",
|
|
6318
6408
|
id: 5
|
|
6319
6409
|
},
|
|
6320
|
-
|
|
6410
|
+
nft_meta_data: {
|
|
6321
6411
|
type: "bytes",
|
|
6322
|
-
id:
|
|
6412
|
+
id: 4
|
|
6323
6413
|
}
|
|
6324
6414
|
},
|
|
6325
6415
|
nested: {
|
|
@@ -9533,10 +9623,14 @@ var nested = {
|
|
|
9533
9623
|
MessageType_StellarManageBuyOfferOp: 222,
|
|
9534
9624
|
MessageType_StellarPathPaymentStrictSendOp: 223,
|
|
9535
9625
|
MessageType_StellarSignedTx: 230,
|
|
9626
|
+
MessageType_CardanoSignTx: 303,
|
|
9536
9627
|
MessageType_CardanoGetPublicKey: 305,
|
|
9537
9628
|
MessageType_CardanoPublicKey: 306,
|
|
9538
9629
|
MessageType_CardanoGetAddress: 307,
|
|
9539
9630
|
MessageType_CardanoAddress: 308,
|
|
9631
|
+
MessageType_CardanoSignedTx: 310,
|
|
9632
|
+
MessageType_CardanoSignedTxChunk: 311,
|
|
9633
|
+
MessageType_CardanoSignedTxChunkAck: 312,
|
|
9540
9634
|
MessageType_CardanoTxItemAck: 313,
|
|
9541
9635
|
MessageType_CardanoTxAuxiliaryDataSupplement: 314,
|
|
9542
9636
|
MessageType_CardanoTxWitnessRequest: 315,
|
|
@@ -9557,13 +9651,6 @@ var nested = {
|
|
|
9557
9651
|
MessageType_CardanoGetNativeScriptHash: 330,
|
|
9558
9652
|
MessageType_CardanoNativeScriptHash: 331,
|
|
9559
9653
|
MessageType_CardanoTxMint: 332,
|
|
9560
|
-
MessageType_CardanoTxCollateralInput: 333,
|
|
9561
|
-
MessageType_CardanoTxRequiredSigner: 334,
|
|
9562
|
-
MessageType_CardanoTxInlineDatumChunk: 335,
|
|
9563
|
-
MessageType_CardanoTxReferenceScriptChunk: 336,
|
|
9564
|
-
MessageType_CardanoTxReferenceInput: 337,
|
|
9565
|
-
MessageType_CardanoSignMessage: 350,
|
|
9566
|
-
MessageType_CardanoMessageSignature: 351,
|
|
9567
9654
|
MessageType_RippleGetAddress: 400,
|
|
9568
9655
|
MessageType_RippleAddress: 401,
|
|
9569
9656
|
MessageType_RippleSignTx: 402,
|
|
@@ -10977,7 +11064,9 @@ class DataManager {
|
|
|
10977
11064
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10978
11065
|
this.settings = settings;
|
|
10979
11066
|
try {
|
|
10980
|
-
const { data } = yield axios__default["default"].get(`https://data.onekey.so/config.json?noCache=${getTimeStamp()}
|
|
11067
|
+
const { data } = yield axios__default["default"].get(`https://data.onekey.so/config.json?noCache=${getTimeStamp()}`, {
|
|
11068
|
+
timeout: 7000,
|
|
11069
|
+
});
|
|
10981
11070
|
this.deviceMap = {
|
|
10982
11071
|
classic: data.classic,
|
|
10983
11072
|
mini: data.mini,
|
|
@@ -12870,7 +12959,6 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
12870
12959
|
{ name: 'thumbnailDataHex', type: 'string', required: true },
|
|
12871
12960
|
{ name: 'resType', type: 'number', required: true },
|
|
12872
12961
|
{ name: 'nftMetaData', type: 'string' },
|
|
12873
|
-
{ name: 'file_name_no_ext', type: 'boolean' },
|
|
12874
12962
|
]);
|
|
12875
12963
|
const { suffix, dataHex, thumbnailDataHex, resType, nftMetaData } = this
|
|
12876
12964
|
.payload;
|
|
@@ -12883,8 +12971,7 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
12883
12971
|
data_length: this.paramsData.data.byteLength,
|
|
12884
12972
|
zoom_data_length: this.paramsData.thumbnailData.byteLength,
|
|
12885
12973
|
res_type: resType,
|
|
12886
|
-
|
|
12887
|
-
file_name_no_ext: this.payload.file_name_no_ext,
|
|
12974
|
+
nft_meta_data: nftMetaData,
|
|
12888
12975
|
};
|
|
12889
12976
|
}
|
|
12890
12977
|
run() {
|
|
@@ -16766,7 +16853,7 @@ class CardanoGetAddress extends BaseMethod {
|
|
|
16766
16853
|
network_id: batch.networkId,
|
|
16767
16854
|
derivation_type: typeof batch.derivationType !== 'undefined'
|
|
16768
16855
|
? batch.derivationType
|
|
16769
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
16856
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS_TREZOR,
|
|
16770
16857
|
show_display: typeof batch.showOnOneKey === 'boolean' ? !!batch.showOnOneKey : true,
|
|
16771
16858
|
};
|
|
16772
16859
|
});
|
|
@@ -16840,14 +16927,14 @@ class CardanoGetPublicKey extends BaseMethod {
|
|
|
16840
16927
|
validateParams(batch, [
|
|
16841
16928
|
{ name: 'path', required: true },
|
|
16842
16929
|
{ name: 'derivationType', type: 'number' },
|
|
16843
|
-
{ name: '
|
|
16930
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
16844
16931
|
]);
|
|
16845
16932
|
const path = validatePath(batch.path, 3);
|
|
16846
16933
|
return {
|
|
16847
16934
|
address_n: path,
|
|
16848
16935
|
derivation_type: typeof batch.derivationType !== 'undefined'
|
|
16849
16936
|
? batch.derivationType
|
|
16850
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
16937
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS_TREZOR,
|
|
16851
16938
|
show_display: typeof batch.showOnOneKey === 'boolean' ? batch.showOnOneKey : false,
|
|
16852
16939
|
};
|
|
16853
16940
|
});
|
|
@@ -17357,7 +17444,7 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
17357
17444
|
additionalWitnessRequests,
|
|
17358
17445
|
derivationType: typeof payload.derivationType !== 'undefined'
|
|
17359
17446
|
? payload.derivationType
|
|
17360
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
17447
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS_TREZOR,
|
|
17361
17448
|
includeNetworkId: payload.includeNetworkId,
|
|
17362
17449
|
};
|
|
17363
17450
|
}
|
|
@@ -17473,42 +17560,6 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
17473
17560
|
}
|
|
17474
17561
|
}
|
|
17475
17562
|
|
|
17476
|
-
class CardanoSignMessage extends BaseMethod {
|
|
17477
|
-
init() {
|
|
17478
|
-
this.checkDeviceId = true;
|
|
17479
|
-
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
17480
|
-
const { payload } = this;
|
|
17481
|
-
validateParams(payload, [
|
|
17482
|
-
{ name: 'path', type: 'string', required: true },
|
|
17483
|
-
{ name: 'message', type: 'string', required: true },
|
|
17484
|
-
{ name: 'derivationType', type: 'number' },
|
|
17485
|
-
{ name: 'networkId', type: 'number', required: true },
|
|
17486
|
-
]);
|
|
17487
|
-
const addressN = validatePath(payload.path, 3);
|
|
17488
|
-
this.params = {
|
|
17489
|
-
address_n: addressN,
|
|
17490
|
-
message: payload.message,
|
|
17491
|
-
derivation_type: typeof payload.derivationType !== 'undefined'
|
|
17492
|
-
? payload.derivationType
|
|
17493
|
-
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
17494
|
-
network_id: payload.networkId,
|
|
17495
|
-
};
|
|
17496
|
-
}
|
|
17497
|
-
getVersionRange() {
|
|
17498
|
-
return {
|
|
17499
|
-
model_mini: {
|
|
17500
|
-
min: '2.10.0',
|
|
17501
|
-
},
|
|
17502
|
-
};
|
|
17503
|
-
}
|
|
17504
|
-
run() {
|
|
17505
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17506
|
-
const res = yield this.device.commands.typedCall('CardanoSignMessage', 'CardanoMessageSignature', this.params);
|
|
17507
|
-
return res.message;
|
|
17508
|
-
});
|
|
17509
|
-
}
|
|
17510
|
-
}
|
|
17511
|
-
|
|
17512
17563
|
var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
17513
17564
|
__proto__: null,
|
|
17514
17565
|
searchDevices: SearchDevices,
|
|
@@ -17584,8 +17635,7 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
17584
17635
|
suiSignTransaction: SuiSignTransaction,
|
|
17585
17636
|
cardanoGetAddress: CardanoGetAddress,
|
|
17586
17637
|
cardanoGetPublicKey: CardanoGetPublicKey,
|
|
17587
|
-
cardanoSignTransaction: CardanoSignTransaction
|
|
17588
|
-
cardanoSignMessage: CardanoSignMessage
|
|
17638
|
+
cardanoSignTransaction: CardanoSignTransaction
|
|
17589
17639
|
});
|
|
17590
17640
|
|
|
17591
17641
|
function findMethod(message) {
|
package/dist/inject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,OAoMd,CAAC"}
|