@onekeyfe/hd-core 0.2.10 → 0.2.12
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/CardanoGetAddress.d.ts +5 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +5 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +14 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts +5 -0
- 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 +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.js +242 -268
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/cardano.d.ts.map +1 -1
- package/dist/types/api/cardanoSignMessage.d.ts +16 -0
- package/dist/types/api/cardanoSignMessage.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.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 +9 -1
- package/src/api/cardano/CardanoGetPublicKey.ts +9 -1
- package/src/api/cardano/CardanoSignMessage.ts +58 -0
- package/src/api/cardano/CardanoSignTransaction.ts +10 -7
- package/src/api/cardano/helper/auxiliaryData.ts +4 -0
- package/src/api/cardano/helper/cardanoInputs.ts +0 -2
- package/src/api/cardano/helper/cardanoOutputs.ts +0 -1
- package/src/api/cardano/helper/certificate.ts +0 -2
- package/src/api/cardano/helper/witnesses.ts +0 -2
- package/src/api/device/DeviceUploadResource.ts +3 -1
- package/src/api/index.ts +1 -0
- package/src/data/messages/messages.json +281 -368
- package/src/inject.ts +2 -0
- package/src/types/api/cardano.ts +0 -1
- package/src/types/api/cardanoSignMessage.ts +22 -0
- package/src/types/api/index.ts +2 -0
- package/src/utils/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -111,6 +111,7 @@ 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' })),
|
|
114
115
|
};
|
|
115
116
|
return api;
|
|
116
117
|
};
|
|
@@ -2532,6 +2533,12 @@ var nested = {
|
|
|
2532
2533
|
POLICY_ID: 2
|
|
2533
2534
|
}
|
|
2534
2535
|
},
|
|
2536
|
+
CardanoTxOutputSerializationFormat: {
|
|
2537
|
+
values: {
|
|
2538
|
+
ARRAY_LEGACY: 0,
|
|
2539
|
+
MAP_BABBAGE: 1
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2535
2542
|
CardanoCertificateType: {
|
|
2536
2543
|
values: {
|
|
2537
2544
|
STAKE_REGISTRATION: 0,
|
|
@@ -2550,14 +2557,21 @@ var nested = {
|
|
|
2550
2557
|
CardanoTxAuxiliaryDataSupplementType: {
|
|
2551
2558
|
values: {
|
|
2552
2559
|
NONE: 0,
|
|
2553
|
-
|
|
2560
|
+
GOVERNANCE_REGISTRATION_SIGNATURE: 1
|
|
2561
|
+
}
|
|
2562
|
+
},
|
|
2563
|
+
CardanoGovernanceRegistrationFormat: {
|
|
2564
|
+
values: {
|
|
2565
|
+
CIP15: 0,
|
|
2566
|
+
CIP36: 1
|
|
2554
2567
|
}
|
|
2555
2568
|
},
|
|
2556
2569
|
CardanoTxSigningMode: {
|
|
2557
2570
|
values: {
|
|
2558
2571
|
ORDINARY_TRANSACTION: 0,
|
|
2559
2572
|
POOL_REGISTRATION_AS_OWNER: 1,
|
|
2560
|
-
MULTISIG_TRANSACTION: 2
|
|
2573
|
+
MULTISIG_TRANSACTION: 2,
|
|
2574
|
+
PLUTUS_TRANSACTION: 3
|
|
2561
2575
|
}
|
|
2562
2576
|
},
|
|
2563
2577
|
CardanoTxWitnessType: {
|
|
@@ -2911,6 +2925,31 @@ var nested = {
|
|
|
2911
2925
|
rule: "required",
|
|
2912
2926
|
type: "uint32",
|
|
2913
2927
|
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
|
+
}
|
|
2914
2953
|
}
|
|
2915
2954
|
}
|
|
2916
2955
|
},
|
|
@@ -2945,6 +2984,24 @@ var nested = {
|
|
|
2945
2984
|
}
|
|
2946
2985
|
}
|
|
2947
2986
|
},
|
|
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
|
+
},
|
|
2948
3005
|
CardanoPoolOwner: {
|
|
2949
3006
|
fields: {
|
|
2950
3007
|
staking_key_path: {
|
|
@@ -3037,22 +3094,6 @@ var nested = {
|
|
|
3037
3094
|
type: "string",
|
|
3038
3095
|
id: 7
|
|
3039
3096
|
},
|
|
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
|
-
},
|
|
3056
3097
|
metadata: {
|
|
3057
3098
|
type: "CardanoPoolMetadataType",
|
|
3058
3099
|
id: 10
|
|
@@ -3095,6 +3136,10 @@ var nested = {
|
|
|
3095
3136
|
script_hash: {
|
|
3096
3137
|
type: "bytes",
|
|
3097
3138
|
id: 5
|
|
3139
|
+
},
|
|
3140
|
+
key_hash: {
|
|
3141
|
+
type: "bytes",
|
|
3142
|
+
id: 6
|
|
3098
3143
|
}
|
|
3099
3144
|
}
|
|
3100
3145
|
},
|
|
@@ -3116,16 +3161,33 @@ var nested = {
|
|
|
3116
3161
|
script_hash: {
|
|
3117
3162
|
type: "bytes",
|
|
3118
3163
|
id: 3
|
|
3164
|
+
},
|
|
3165
|
+
key_hash: {
|
|
3166
|
+
type: "bytes",
|
|
3167
|
+
id: 4
|
|
3119
3168
|
}
|
|
3120
3169
|
}
|
|
3121
3170
|
},
|
|
3122
|
-
|
|
3171
|
+
CardanoGovernanceRegistrationDelegation: {
|
|
3123
3172
|
fields: {
|
|
3124
3173
|
voting_public_key: {
|
|
3125
3174
|
rule: "required",
|
|
3126
3175
|
type: "bytes",
|
|
3127
3176
|
id: 1
|
|
3128
3177
|
},
|
|
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
|
+
},
|
|
3129
3191
|
staking_path: {
|
|
3130
3192
|
rule: "repeated",
|
|
3131
3193
|
type: "uint32",
|
|
@@ -3143,13 +3205,29 @@ var nested = {
|
|
|
3143
3205
|
rule: "required",
|
|
3144
3206
|
type: "uint64",
|
|
3145
3207
|
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
|
|
3146
3224
|
}
|
|
3147
3225
|
}
|
|
3148
3226
|
},
|
|
3149
3227
|
CardanoTxAuxiliaryData: {
|
|
3150
3228
|
fields: {
|
|
3151
|
-
|
|
3152
|
-
type: "
|
|
3229
|
+
governance_registration_parameters: {
|
|
3230
|
+
type: "CardanoGovernanceRegistrationParametersType",
|
|
3153
3231
|
id: 1
|
|
3154
3232
|
},
|
|
3155
3233
|
hash: {
|
|
@@ -3167,6 +3245,50 @@ var nested = {
|
|
|
3167
3245
|
}
|
|
3168
3246
|
}
|
|
3169
3247
|
},
|
|
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
|
+
},
|
|
3170
3292
|
CardanoTxItemAck: {
|
|
3171
3293
|
fields: {
|
|
3172
3294
|
}
|
|
@@ -3182,7 +3304,7 @@ var nested = {
|
|
|
3182
3304
|
type: "bytes",
|
|
3183
3305
|
id: 2
|
|
3184
3306
|
},
|
|
3185
|
-
|
|
3307
|
+
governance_signature: {
|
|
3186
3308
|
type: "bytes",
|
|
3187
3309
|
id: 3
|
|
3188
3310
|
}
|
|
@@ -3240,259 +3362,42 @@ var nested = {
|
|
|
3240
3362
|
fields: {
|
|
3241
3363
|
}
|
|
3242
3364
|
},
|
|
3243
|
-
|
|
3244
|
-
options: {
|
|
3245
|
-
deprecated: true
|
|
3246
|
-
},
|
|
3365
|
+
CardanoSignMessage: {
|
|
3247
3366
|
fields: {
|
|
3248
|
-
|
|
3249
|
-
rule: "repeated",
|
|
3250
|
-
type: "CardanoTxInputType",
|
|
3251
|
-
id: 1
|
|
3252
|
-
},
|
|
3253
|
-
outputs: {
|
|
3367
|
+
address_n: {
|
|
3254
3368
|
rule: "repeated",
|
|
3255
|
-
type: "CardanoTxOutputType",
|
|
3256
|
-
id: 2
|
|
3257
|
-
},
|
|
3258
|
-
protocol_magic: {
|
|
3259
|
-
rule: "required",
|
|
3260
3369
|
type: "uint32",
|
|
3261
|
-
id:
|
|
3370
|
+
id: 1,
|
|
3371
|
+
options: {
|
|
3372
|
+
packed: false
|
|
3373
|
+
}
|
|
3262
3374
|
},
|
|
3263
|
-
|
|
3375
|
+
message: {
|
|
3264
3376
|
rule: "required",
|
|
3265
|
-
type: "
|
|
3266
|
-
id:
|
|
3377
|
+
type: "bytes",
|
|
3378
|
+
id: 2
|
|
3267
3379
|
},
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3380
|
+
derivation_type: {
|
|
3381
|
+
rule: "required",
|
|
3382
|
+
type: "CardanoDerivationType",
|
|
3383
|
+
id: 3
|
|
3271
3384
|
},
|
|
3272
3385
|
network_id: {
|
|
3273
3386
|
rule: "required",
|
|
3274
3387
|
type: "uint32",
|
|
3275
|
-
id:
|
|
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
|
-
}
|
|
3463
|
-
}
|
|
3464
|
-
}
|
|
3465
|
-
},
|
|
3466
|
-
CardanoSignedTxChunk: {
|
|
3467
|
-
options: {
|
|
3468
|
-
deprecated: true
|
|
3469
|
-
},
|
|
3470
|
-
fields: {
|
|
3471
|
-
signed_tx_chunk: {
|
|
3472
|
-
rule: "required",
|
|
3473
|
-
type: "bytes",
|
|
3474
|
-
id: 1
|
|
3388
|
+
id: 4
|
|
3475
3389
|
}
|
|
3476
3390
|
}
|
|
3477
3391
|
},
|
|
3478
|
-
|
|
3479
|
-
options: {
|
|
3480
|
-
deprecated: true
|
|
3481
|
-
},
|
|
3392
|
+
CardanoMessageSignature: {
|
|
3482
3393
|
fields: {
|
|
3483
|
-
|
|
3484
|
-
},
|
|
3485
|
-
CardanoSignedTx: {
|
|
3486
|
-
options: {
|
|
3487
|
-
deprecated: true
|
|
3488
|
-
},
|
|
3489
|
-
fields: {
|
|
3490
|
-
tx_hash: {
|
|
3394
|
+
signature: {
|
|
3491
3395
|
rule: "required",
|
|
3492
3396
|
type: "bytes",
|
|
3493
3397
|
id: 1
|
|
3494
3398
|
},
|
|
3495
|
-
|
|
3399
|
+
key: {
|
|
3400
|
+
rule: "required",
|
|
3496
3401
|
type: "bytes",
|
|
3497
3402
|
id: 2
|
|
3498
3403
|
}
|
|
@@ -6405,11 +6310,16 @@ var nested = {
|
|
|
6405
6310
|
zoom_data_length: {
|
|
6406
6311
|
rule: "required",
|
|
6407
6312
|
type: "uint32",
|
|
6313
|
+
id: 4
|
|
6314
|
+
},
|
|
6315
|
+
file_name_no_ext: {
|
|
6316
|
+
rule: "required",
|
|
6317
|
+
type: "string",
|
|
6408
6318
|
id: 5
|
|
6409
6319
|
},
|
|
6410
|
-
|
|
6320
|
+
nft_metadata: {
|
|
6411
6321
|
type: "bytes",
|
|
6412
|
-
id:
|
|
6322
|
+
id: 6
|
|
6413
6323
|
}
|
|
6414
6324
|
},
|
|
6415
6325
|
nested: {
|
|
@@ -9623,14 +9533,10 @@ var nested = {
|
|
|
9623
9533
|
MessageType_StellarManageBuyOfferOp: 222,
|
|
9624
9534
|
MessageType_StellarPathPaymentStrictSendOp: 223,
|
|
9625
9535
|
MessageType_StellarSignedTx: 230,
|
|
9626
|
-
MessageType_CardanoSignTx: 303,
|
|
9627
9536
|
MessageType_CardanoGetPublicKey: 305,
|
|
9628
9537
|
MessageType_CardanoPublicKey: 306,
|
|
9629
9538
|
MessageType_CardanoGetAddress: 307,
|
|
9630
9539
|
MessageType_CardanoAddress: 308,
|
|
9631
|
-
MessageType_CardanoSignedTx: 310,
|
|
9632
|
-
MessageType_CardanoSignedTxChunk: 311,
|
|
9633
|
-
MessageType_CardanoSignedTxChunkAck: 312,
|
|
9634
9540
|
MessageType_CardanoTxItemAck: 313,
|
|
9635
9541
|
MessageType_CardanoTxAuxiliaryDataSupplement: 314,
|
|
9636
9542
|
MessageType_CardanoTxWitnessRequest: 315,
|
|
@@ -9651,6 +9557,13 @@ var nested = {
|
|
|
9651
9557
|
MessageType_CardanoGetNativeScriptHash: 330,
|
|
9652
9558
|
MessageType_CardanoNativeScriptHash: 331,
|
|
9653
9559
|
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,
|
|
9654
9567
|
MessageType_RippleGetAddress: 400,
|
|
9655
9568
|
MessageType_RippleAddress: 401,
|
|
9656
9569
|
MessageType_RippleSignTx: 402,
|
|
@@ -12723,6 +12636,7 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
12723
12636
|
{ name: 'thumbnailDataHex', type: 'string', required: true },
|
|
12724
12637
|
{ name: 'resType', type: 'number', required: true },
|
|
12725
12638
|
{ name: 'nftMetaData', type: 'string' },
|
|
12639
|
+
{ name: 'file_name_no_ext', type: 'boolean' },
|
|
12726
12640
|
]);
|
|
12727
12641
|
const { suffix, dataHex, thumbnailDataHex, resType, nftMetaData } = this
|
|
12728
12642
|
.payload;
|
|
@@ -12735,7 +12649,8 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
12735
12649
|
data_length: this.paramsData.data.byteLength,
|
|
12736
12650
|
zoom_data_length: this.paramsData.thumbnailData.byteLength,
|
|
12737
12651
|
res_type: resType,
|
|
12738
|
-
|
|
12652
|
+
nft_metadata: nftMetaData,
|
|
12653
|
+
file_name_no_ext: this.payload.file_name_no_ext,
|
|
12739
12654
|
};
|
|
12740
12655
|
}
|
|
12741
12656
|
run() {
|
|
@@ -16617,11 +16532,18 @@ class CardanoGetAddress extends BaseMethod {
|
|
|
16617
16532
|
network_id: batch.networkId,
|
|
16618
16533
|
derivation_type: typeof batch.derivationType !== 'undefined'
|
|
16619
16534
|
? batch.derivationType
|
|
16620
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
16535
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
16621
16536
|
show_display: typeof batch.showOnOneKey === 'boolean' ? !!batch.showOnOneKey : true,
|
|
16622
16537
|
};
|
|
16623
16538
|
});
|
|
16624
16539
|
}
|
|
16540
|
+
getVersionRange() {
|
|
16541
|
+
return {
|
|
16542
|
+
model_mini: {
|
|
16543
|
+
min: '2.10.0',
|
|
16544
|
+
},
|
|
16545
|
+
};
|
|
16546
|
+
}
|
|
16625
16547
|
run() {
|
|
16626
16548
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16627
16549
|
const responses = [];
|
|
@@ -16691,11 +16613,18 @@ class CardanoGetPublicKey extends BaseMethod {
|
|
|
16691
16613
|
address_n: path,
|
|
16692
16614
|
derivation_type: typeof batch.derivationType !== 'undefined'
|
|
16693
16615
|
? batch.derivationType
|
|
16694
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
16616
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
16695
16617
|
show_display: typeof batch.showOnOneKey === 'boolean' ? batch.showOnOneKey : false,
|
|
16696
16618
|
};
|
|
16697
16619
|
});
|
|
16698
16620
|
}
|
|
16621
|
+
getVersionRange() {
|
|
16622
|
+
return {
|
|
16623
|
+
model_mini: {
|
|
16624
|
+
min: '2.10.0',
|
|
16625
|
+
},
|
|
16626
|
+
};
|
|
16627
|
+
}
|
|
16699
16628
|
run() {
|
|
16700
16629
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16701
16630
|
const responses = [];
|
|
@@ -17082,6 +17011,13 @@ const gatherWitnessPaths = (inputsWithPath, certificatesWithPoolOwnersAndRelays,
|
|
|
17082
17011
|
};
|
|
17083
17012
|
|
|
17084
17013
|
class CardanoSignTransaction extends BaseMethod {
|
|
17014
|
+
getVersionRange() {
|
|
17015
|
+
return {
|
|
17016
|
+
model_mini: {
|
|
17017
|
+
min: '2.10.0',
|
|
17018
|
+
},
|
|
17019
|
+
};
|
|
17020
|
+
}
|
|
17085
17021
|
init() {
|
|
17086
17022
|
var _a;
|
|
17087
17023
|
this.checkDeviceId = true;
|
|
@@ -17187,7 +17123,7 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
17187
17123
|
additionalWitnessRequests,
|
|
17188
17124
|
derivationType: typeof payload.derivationType !== 'undefined'
|
|
17189
17125
|
? payload.derivationType
|
|
17190
|
-
: hdTransport.Messages.CardanoDerivationType.
|
|
17126
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
17191
17127
|
includeNetworkId: payload.includeNetworkId,
|
|
17192
17128
|
};
|
|
17193
17129
|
}
|
|
@@ -17303,6 +17239,42 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
17303
17239
|
}
|
|
17304
17240
|
}
|
|
17305
17241
|
|
|
17242
|
+
class CardanoSignMessage extends BaseMethod {
|
|
17243
|
+
init() {
|
|
17244
|
+
this.checkDeviceId = true;
|
|
17245
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
17246
|
+
const { payload } = this;
|
|
17247
|
+
validateParams(payload, [
|
|
17248
|
+
{ name: 'path', type: 'string', required: true },
|
|
17249
|
+
{ name: 'message', type: 'string', required: true },
|
|
17250
|
+
{ name: 'derivationType', type: 'number' },
|
|
17251
|
+
{ name: 'networkId', type: 'number', required: true },
|
|
17252
|
+
]);
|
|
17253
|
+
const addressN = validatePath(payload.path, 3);
|
|
17254
|
+
this.params = {
|
|
17255
|
+
address_n: addressN,
|
|
17256
|
+
message: payload.message,
|
|
17257
|
+
derivation_type: typeof payload.derivationType !== 'undefined'
|
|
17258
|
+
? payload.derivationType
|
|
17259
|
+
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
17260
|
+
network_id: payload.networkId,
|
|
17261
|
+
};
|
|
17262
|
+
}
|
|
17263
|
+
getVersionRange() {
|
|
17264
|
+
return {
|
|
17265
|
+
model_mini: {
|
|
17266
|
+
min: '2.10.0',
|
|
17267
|
+
},
|
|
17268
|
+
};
|
|
17269
|
+
}
|
|
17270
|
+
run() {
|
|
17271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17272
|
+
const res = yield this.device.commands.typedCall('CardanoSignMessage', 'CardanoMessageSignature', this.params);
|
|
17273
|
+
return res.message;
|
|
17274
|
+
});
|
|
17275
|
+
}
|
|
17276
|
+
}
|
|
17277
|
+
|
|
17306
17278
|
var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
17307
17279
|
__proto__: null,
|
|
17308
17280
|
searchDevices: SearchDevices,
|
|
@@ -17378,7 +17350,8 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
17378
17350
|
suiSignTransaction: SuiSignTransaction,
|
|
17379
17351
|
cardanoGetAddress: CardanoGetAddress,
|
|
17380
17352
|
cardanoGetPublicKey: CardanoGetPublicKey,
|
|
17381
|
-
cardanoSignTransaction: CardanoSignTransaction
|
|
17353
|
+
cardanoSignTransaction: CardanoSignTransaction,
|
|
17354
|
+
cardanoSignMessage: CardanoSignMessage
|
|
17382
17355
|
});
|
|
17383
17356
|
|
|
17384
17357
|
function findMethod(message) {
|
|
@@ -18083,6 +18056,7 @@ exports.getEnv = getEnv;
|
|
|
18083
18056
|
exports.getHDPath = getHDPath;
|
|
18084
18057
|
exports.getLog = getLog;
|
|
18085
18058
|
exports.getLogger = getLogger;
|
|
18059
|
+
exports.getOutputScriptType = getOutputScriptType;
|
|
18086
18060
|
exports.getSDKVersion = getSDKVersion;
|
|
18087
18061
|
exports.getScriptType = getScriptType;
|
|
18088
18062
|
exports.getTimeStamp = getTimeStamp;
|
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,OAsMd,CAAC"}
|