@onekeyfe/hd-core 0.2.16 → 0.2.17
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/helper/cardanoInputs.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +17 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +19 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/index.d.ts +29 -3
- package/dist/index.js +423 -281
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/cardano.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +2 -0
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/filecoinGetAddress.d.ts +14 -0
- package/dist/types/api/filecoinGetAddress.d.ts.map +1 -0
- package/dist/types/api/filecoinSignTransaction.d.ts +14 -0
- package/dist/types/api/filecoinSignTransaction.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +4 -0
- package/dist/types/api/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/filecoin/FilecoinGetAddress.ts +71 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +54 -0
- package/src/api/index.ts +3 -0
- package/src/data/messages/messages.json +463 -419
- package/src/inject.ts +5 -0
- package/src/types/api/cardano.ts +0 -1
- package/src/types/api/export.ts +3 -0
- package/src/types/api/filecoinGetAddress.ts +23 -0
- package/src/types/api/filecoinSignTransaction.ts +23 -0
- package/src/types/api/index.ts +9 -0
package/dist/index.js
CHANGED
|
@@ -112,6 +112,8 @@ const inject = ({ call, cancel, dispose, eventEmitter, init, uiResponse, }) => {
|
|
|
112
112
|
cardanoGetAddress: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoGetAddress' })),
|
|
113
113
|
cardanoGetPublicKey: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoGetPublicKey' })),
|
|
114
114
|
cardanoSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cardanoSignTransaction' })),
|
|
115
|
+
filecoinGetAddress: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'filecoinGetAddress' })),
|
|
116
|
+
filecoinSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'filecoinSignTransaction' })),
|
|
115
117
|
};
|
|
116
118
|
return api;
|
|
117
119
|
};
|
|
@@ -2533,6 +2535,12 @@ var nested = {
|
|
|
2533
2535
|
POLICY_ID: 2
|
|
2534
2536
|
}
|
|
2535
2537
|
},
|
|
2538
|
+
CardanoTxOutputSerializationFormat: {
|
|
2539
|
+
values: {
|
|
2540
|
+
ARRAY_LEGACY: 0,
|
|
2541
|
+
MAP_BABBAGE: 1
|
|
2542
|
+
}
|
|
2543
|
+
},
|
|
2536
2544
|
CardanoCertificateType: {
|
|
2537
2545
|
values: {
|
|
2538
2546
|
STAKE_REGISTRATION: 0,
|
|
@@ -2551,14 +2559,21 @@ var nested = {
|
|
|
2551
2559
|
CardanoTxAuxiliaryDataSupplementType: {
|
|
2552
2560
|
values: {
|
|
2553
2561
|
NONE: 0,
|
|
2554
|
-
|
|
2562
|
+
GOVERNANCE_REGISTRATION_SIGNATURE: 1
|
|
2563
|
+
}
|
|
2564
|
+
},
|
|
2565
|
+
CardanoGovernanceRegistrationFormat: {
|
|
2566
|
+
values: {
|
|
2567
|
+
CIP15: 0,
|
|
2568
|
+
CIP36: 1
|
|
2555
2569
|
}
|
|
2556
2570
|
},
|
|
2557
2571
|
CardanoTxSigningMode: {
|
|
2558
2572
|
values: {
|
|
2559
2573
|
ORDINARY_TRANSACTION: 0,
|
|
2560
2574
|
POOL_REGISTRATION_AS_OWNER: 1,
|
|
2561
|
-
MULTISIG_TRANSACTION: 2
|
|
2575
|
+
MULTISIG_TRANSACTION: 2,
|
|
2576
|
+
PLUTUS_TRANSACTION: 3
|
|
2562
2577
|
}
|
|
2563
2578
|
},
|
|
2564
2579
|
CardanoTxWitnessType: {
|
|
@@ -2912,6 +2927,31 @@ var nested = {
|
|
|
2912
2927
|
rule: "required",
|
|
2913
2928
|
type: "uint32",
|
|
2914
2929
|
id: 4
|
|
2930
|
+
},
|
|
2931
|
+
datum_hash: {
|
|
2932
|
+
type: "bytes",
|
|
2933
|
+
id: 5
|
|
2934
|
+
},
|
|
2935
|
+
format: {
|
|
2936
|
+
type: "CardanoTxOutputSerializationFormat",
|
|
2937
|
+
id: 6,
|
|
2938
|
+
options: {
|
|
2939
|
+
"default": "ARRAY_LEGACY"
|
|
2940
|
+
}
|
|
2941
|
+
},
|
|
2942
|
+
inline_datum_size: {
|
|
2943
|
+
type: "uint32",
|
|
2944
|
+
id: 7,
|
|
2945
|
+
options: {
|
|
2946
|
+
"default": 0
|
|
2947
|
+
}
|
|
2948
|
+
},
|
|
2949
|
+
reference_script_size: {
|
|
2950
|
+
type: "uint32",
|
|
2951
|
+
id: 8,
|
|
2952
|
+
options: {
|
|
2953
|
+
"default": 0
|
|
2954
|
+
}
|
|
2915
2955
|
}
|
|
2916
2956
|
}
|
|
2917
2957
|
},
|
|
@@ -2946,6 +2986,24 @@ var nested = {
|
|
|
2946
2986
|
}
|
|
2947
2987
|
}
|
|
2948
2988
|
},
|
|
2989
|
+
CardanoTxInlineDatumChunk: {
|
|
2990
|
+
fields: {
|
|
2991
|
+
data: {
|
|
2992
|
+
rule: "required",
|
|
2993
|
+
type: "bytes",
|
|
2994
|
+
id: 1
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
},
|
|
2998
|
+
CardanoTxReferenceScriptChunk: {
|
|
2999
|
+
fields: {
|
|
3000
|
+
data: {
|
|
3001
|
+
rule: "required",
|
|
3002
|
+
type: "bytes",
|
|
3003
|
+
id: 1
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
},
|
|
2949
3007
|
CardanoPoolOwner: {
|
|
2950
3008
|
fields: {
|
|
2951
3009
|
staking_key_path: {
|
|
@@ -3038,22 +3096,6 @@ var nested = {
|
|
|
3038
3096
|
type: "string",
|
|
3039
3097
|
id: 7
|
|
3040
3098
|
},
|
|
3041
|
-
owners: {
|
|
3042
|
-
rule: "repeated",
|
|
3043
|
-
type: "CardanoPoolOwner",
|
|
3044
|
-
id: 8,
|
|
3045
|
-
options: {
|
|
3046
|
-
deprecated: true
|
|
3047
|
-
}
|
|
3048
|
-
},
|
|
3049
|
-
relays: {
|
|
3050
|
-
rule: "repeated",
|
|
3051
|
-
type: "CardanoPoolRelayParameters",
|
|
3052
|
-
id: 9,
|
|
3053
|
-
options: {
|
|
3054
|
-
deprecated: true
|
|
3055
|
-
}
|
|
3056
|
-
},
|
|
3057
3099
|
metadata: {
|
|
3058
3100
|
type: "CardanoPoolMetadataType",
|
|
3059
3101
|
id: 10
|
|
@@ -3096,6 +3138,10 @@ var nested = {
|
|
|
3096
3138
|
script_hash: {
|
|
3097
3139
|
type: "bytes",
|
|
3098
3140
|
id: 5
|
|
3141
|
+
},
|
|
3142
|
+
key_hash: {
|
|
3143
|
+
type: "bytes",
|
|
3144
|
+
id: 6
|
|
3099
3145
|
}
|
|
3100
3146
|
}
|
|
3101
3147
|
},
|
|
@@ -3117,16 +3163,33 @@ var nested = {
|
|
|
3117
3163
|
script_hash: {
|
|
3118
3164
|
type: "bytes",
|
|
3119
3165
|
id: 3
|
|
3166
|
+
},
|
|
3167
|
+
key_hash: {
|
|
3168
|
+
type: "bytes",
|
|
3169
|
+
id: 4
|
|
3120
3170
|
}
|
|
3121
3171
|
}
|
|
3122
3172
|
},
|
|
3123
|
-
|
|
3173
|
+
CardanoGovernanceRegistrationDelegation: {
|
|
3124
3174
|
fields: {
|
|
3125
3175
|
voting_public_key: {
|
|
3126
3176
|
rule: "required",
|
|
3127
3177
|
type: "bytes",
|
|
3128
3178
|
id: 1
|
|
3129
3179
|
},
|
|
3180
|
+
weight: {
|
|
3181
|
+
rule: "required",
|
|
3182
|
+
type: "uint32",
|
|
3183
|
+
id: 2
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
},
|
|
3187
|
+
CardanoGovernanceRegistrationParametersType: {
|
|
3188
|
+
fields: {
|
|
3189
|
+
voting_public_key: {
|
|
3190
|
+
type: "bytes",
|
|
3191
|
+
id: 1
|
|
3192
|
+
},
|
|
3130
3193
|
staking_path: {
|
|
3131
3194
|
rule: "repeated",
|
|
3132
3195
|
type: "uint32",
|
|
@@ -3144,13 +3207,29 @@ var nested = {
|
|
|
3144
3207
|
rule: "required",
|
|
3145
3208
|
type: "uint64",
|
|
3146
3209
|
id: 4
|
|
3210
|
+
},
|
|
3211
|
+
format: {
|
|
3212
|
+
type: "CardanoGovernanceRegistrationFormat",
|
|
3213
|
+
id: 5,
|
|
3214
|
+
options: {
|
|
3215
|
+
"default": "CIP15"
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
delegations: {
|
|
3219
|
+
rule: "repeated",
|
|
3220
|
+
type: "CardanoGovernanceRegistrationDelegation",
|
|
3221
|
+
id: 6
|
|
3222
|
+
},
|
|
3223
|
+
voting_purpose: {
|
|
3224
|
+
type: "uint64",
|
|
3225
|
+
id: 7
|
|
3147
3226
|
}
|
|
3148
3227
|
}
|
|
3149
3228
|
},
|
|
3150
3229
|
CardanoTxAuxiliaryData: {
|
|
3151
3230
|
fields: {
|
|
3152
|
-
|
|
3153
|
-
type: "
|
|
3231
|
+
governance_registration_parameters: {
|
|
3232
|
+
type: "CardanoGovernanceRegistrationParametersType",
|
|
3154
3233
|
id: 1
|
|
3155
3234
|
},
|
|
3156
3235
|
hash: {
|
|
@@ -3168,6 +3247,50 @@ var nested = {
|
|
|
3168
3247
|
}
|
|
3169
3248
|
}
|
|
3170
3249
|
},
|
|
3250
|
+
CardanoTxCollateralInput: {
|
|
3251
|
+
fields: {
|
|
3252
|
+
prev_hash: {
|
|
3253
|
+
rule: "required",
|
|
3254
|
+
type: "bytes",
|
|
3255
|
+
id: 1
|
|
3256
|
+
},
|
|
3257
|
+
prev_index: {
|
|
3258
|
+
rule: "required",
|
|
3259
|
+
type: "uint32",
|
|
3260
|
+
id: 2
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
},
|
|
3264
|
+
CardanoTxRequiredSigner: {
|
|
3265
|
+
fields: {
|
|
3266
|
+
key_hash: {
|
|
3267
|
+
type: "bytes",
|
|
3268
|
+
id: 1
|
|
3269
|
+
},
|
|
3270
|
+
key_path: {
|
|
3271
|
+
rule: "repeated",
|
|
3272
|
+
type: "uint32",
|
|
3273
|
+
id: 2,
|
|
3274
|
+
options: {
|
|
3275
|
+
packed: false
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
},
|
|
3280
|
+
CardanoTxReferenceInput: {
|
|
3281
|
+
fields: {
|
|
3282
|
+
prev_hash: {
|
|
3283
|
+
rule: "required",
|
|
3284
|
+
type: "bytes",
|
|
3285
|
+
id: 1
|
|
3286
|
+
},
|
|
3287
|
+
prev_index: {
|
|
3288
|
+
rule: "required",
|
|
3289
|
+
type: "uint32",
|
|
3290
|
+
id: 2
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3171
3294
|
CardanoTxItemAck: {
|
|
3172
3295
|
fields: {
|
|
3173
3296
|
}
|
|
@@ -3183,7 +3306,7 @@ var nested = {
|
|
|
3183
3306
|
type: "bytes",
|
|
3184
3307
|
id: 2
|
|
3185
3308
|
},
|
|
3186
|
-
|
|
3309
|
+
governance_signature: {
|
|
3187
3310
|
type: "bytes",
|
|
3188
3311
|
id: 3
|
|
3189
3312
|
}
|
|
@@ -3228,272 +3351,55 @@ var nested = {
|
|
|
3228
3351
|
fields: {
|
|
3229
3352
|
}
|
|
3230
3353
|
},
|
|
3231
|
-
CardanoTxBodyHash: {
|
|
3232
|
-
fields: {
|
|
3233
|
-
tx_hash: {
|
|
3234
|
-
rule: "required",
|
|
3235
|
-
type: "bytes",
|
|
3236
|
-
id: 1
|
|
3237
|
-
}
|
|
3238
|
-
}
|
|
3239
|
-
},
|
|
3240
|
-
CardanoSignTxFinished: {
|
|
3241
|
-
fields: {
|
|
3242
|
-
}
|
|
3243
|
-
},
|
|
3244
|
-
CardanoSignTx: {
|
|
3245
|
-
options: {
|
|
3246
|
-
deprecated: true
|
|
3247
|
-
},
|
|
3248
|
-
fields: {
|
|
3249
|
-
inputs: {
|
|
3250
|
-
rule: "repeated",
|
|
3251
|
-
type: "CardanoTxInputType",
|
|
3252
|
-
id: 1
|
|
3253
|
-
},
|
|
3254
|
-
outputs: {
|
|
3255
|
-
rule: "repeated",
|
|
3256
|
-
type: "CardanoTxOutputType",
|
|
3257
|
-
id: 2
|
|
3258
|
-
},
|
|
3259
|
-
protocol_magic: {
|
|
3260
|
-
rule: "required",
|
|
3261
|
-
type: "uint32",
|
|
3262
|
-
id: 5
|
|
3263
|
-
},
|
|
3264
|
-
fee: {
|
|
3265
|
-
rule: "required",
|
|
3266
|
-
type: "uint64",
|
|
3267
|
-
id: 6
|
|
3268
|
-
},
|
|
3269
|
-
ttl: {
|
|
3270
|
-
type: "uint64",
|
|
3271
|
-
id: 7
|
|
3272
|
-
},
|
|
3273
|
-
network_id: {
|
|
3274
|
-
rule: "required",
|
|
3275
|
-
type: "uint32",
|
|
3276
|
-
id: 8
|
|
3277
|
-
},
|
|
3278
|
-
certificates: {
|
|
3279
|
-
rule: "repeated",
|
|
3280
|
-
type: "CardanoTxCertificateType",
|
|
3281
|
-
id: 9
|
|
3282
|
-
},
|
|
3283
|
-
withdrawals: {
|
|
3284
|
-
rule: "repeated",
|
|
3285
|
-
type: "CardanoTxWithdrawalType",
|
|
3286
|
-
id: 10
|
|
3287
|
-
},
|
|
3288
|
-
validity_interval_start: {
|
|
3289
|
-
type: "uint64",
|
|
3290
|
-
id: 12
|
|
3291
|
-
},
|
|
3292
|
-
auxiliary_data: {
|
|
3293
|
-
type: "CardanoTxAuxiliaryDataType",
|
|
3294
|
-
id: 13
|
|
3295
|
-
}
|
|
3296
|
-
},
|
|
3297
|
-
nested: {
|
|
3298
|
-
CardanoTxInputType: {
|
|
3299
|
-
fields: {
|
|
3300
|
-
address_n: {
|
|
3301
|
-
rule: "repeated",
|
|
3302
|
-
type: "uint32",
|
|
3303
|
-
id: 1,
|
|
3304
|
-
options: {
|
|
3305
|
-
packed: false
|
|
3306
|
-
}
|
|
3307
|
-
},
|
|
3308
|
-
prev_hash: {
|
|
3309
|
-
rule: "required",
|
|
3310
|
-
type: "bytes",
|
|
3311
|
-
id: 2
|
|
3312
|
-
},
|
|
3313
|
-
prev_index: {
|
|
3314
|
-
rule: "required",
|
|
3315
|
-
type: "uint32",
|
|
3316
|
-
id: 3
|
|
3317
|
-
}
|
|
3318
|
-
}
|
|
3319
|
-
},
|
|
3320
|
-
CardanoTxOutputType: {
|
|
3321
|
-
fields: {
|
|
3322
|
-
address: {
|
|
3323
|
-
type: "string",
|
|
3324
|
-
id: 1
|
|
3325
|
-
},
|
|
3326
|
-
amount: {
|
|
3327
|
-
rule: "required",
|
|
3328
|
-
type: "uint64",
|
|
3329
|
-
id: 3
|
|
3330
|
-
},
|
|
3331
|
-
address_parameters: {
|
|
3332
|
-
type: "CardanoAddressParametersType",
|
|
3333
|
-
id: 4
|
|
3334
|
-
},
|
|
3335
|
-
token_bundle: {
|
|
3336
|
-
rule: "repeated",
|
|
3337
|
-
type: "CardanoAssetGroupType",
|
|
3338
|
-
id: 5
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
},
|
|
3342
|
-
CardanoAssetGroupType: {
|
|
3343
|
-
fields: {
|
|
3344
|
-
policy_id: {
|
|
3345
|
-
rule: "required",
|
|
3346
|
-
type: "bytes",
|
|
3347
|
-
id: 1
|
|
3348
|
-
},
|
|
3349
|
-
tokens: {
|
|
3350
|
-
rule: "repeated",
|
|
3351
|
-
type: "CardanoTokenType",
|
|
3352
|
-
id: 2
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
},
|
|
3356
|
-
CardanoTokenType: {
|
|
3357
|
-
fields: {
|
|
3358
|
-
asset_name_bytes: {
|
|
3359
|
-
rule: "required",
|
|
3360
|
-
type: "bytes",
|
|
3361
|
-
id: 1
|
|
3362
|
-
},
|
|
3363
|
-
amount: {
|
|
3364
|
-
rule: "required",
|
|
3365
|
-
type: "uint64",
|
|
3366
|
-
id: 2
|
|
3367
|
-
}
|
|
3368
|
-
}
|
|
3369
|
-
},
|
|
3370
|
-
CardanoPoolOwnerType: {
|
|
3371
|
-
fields: {
|
|
3372
|
-
staking_key_path: {
|
|
3373
|
-
rule: "repeated",
|
|
3374
|
-
type: "uint32",
|
|
3375
|
-
id: 1,
|
|
3376
|
-
options: {
|
|
3377
|
-
packed: false
|
|
3378
|
-
}
|
|
3379
|
-
},
|
|
3380
|
-
staking_key_hash: {
|
|
3381
|
-
type: "bytes",
|
|
3382
|
-
id: 2
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
},
|
|
3386
|
-
CardanoPoolRelayParametersType: {
|
|
3387
|
-
fields: {
|
|
3388
|
-
type: {
|
|
3389
|
-
rule: "required",
|
|
3390
|
-
type: "CardanoPoolRelayType",
|
|
3391
|
-
id: 1
|
|
3392
|
-
},
|
|
3393
|
-
ipv4_address: {
|
|
3394
|
-
type: "bytes",
|
|
3395
|
-
id: 2
|
|
3396
|
-
},
|
|
3397
|
-
ipv6_address: {
|
|
3398
|
-
type: "bytes",
|
|
3399
|
-
id: 3
|
|
3400
|
-
},
|
|
3401
|
-
host_name: {
|
|
3402
|
-
type: "string",
|
|
3403
|
-
id: 4
|
|
3404
|
-
},
|
|
3405
|
-
port: {
|
|
3406
|
-
type: "uint32",
|
|
3407
|
-
id: 5
|
|
3408
|
-
}
|
|
3409
|
-
}
|
|
3410
|
-
},
|
|
3411
|
-
CardanoTxCertificateType: {
|
|
3412
|
-
fields: {
|
|
3413
|
-
type: {
|
|
3414
|
-
rule: "required",
|
|
3415
|
-
type: "CardanoCertificateType",
|
|
3416
|
-
id: 1
|
|
3417
|
-
},
|
|
3418
|
-
path: {
|
|
3419
|
-
rule: "repeated",
|
|
3420
|
-
type: "uint32",
|
|
3421
|
-
id: 2,
|
|
3422
|
-
options: {
|
|
3423
|
-
packed: false
|
|
3424
|
-
}
|
|
3425
|
-
},
|
|
3426
|
-
pool: {
|
|
3427
|
-
type: "bytes",
|
|
3428
|
-
id: 3
|
|
3429
|
-
},
|
|
3430
|
-
pool_parameters: {
|
|
3431
|
-
type: "CardanoPoolParametersType",
|
|
3432
|
-
id: 4
|
|
3433
|
-
}
|
|
3434
|
-
}
|
|
3435
|
-
},
|
|
3436
|
-
CardanoTxWithdrawalType: {
|
|
3437
|
-
fields: {
|
|
3438
|
-
path: {
|
|
3439
|
-
rule: "repeated",
|
|
3440
|
-
type: "uint32",
|
|
3441
|
-
id: 1,
|
|
3442
|
-
options: {
|
|
3443
|
-
packed: false
|
|
3444
|
-
}
|
|
3445
|
-
},
|
|
3446
|
-
amount: {
|
|
3447
|
-
rule: "required",
|
|
3448
|
-
type: "uint64",
|
|
3449
|
-
id: 2
|
|
3450
|
-
}
|
|
3451
|
-
}
|
|
3452
|
-
},
|
|
3453
|
-
CardanoTxAuxiliaryDataType: {
|
|
3454
|
-
fields: {
|
|
3455
|
-
blob: {
|
|
3456
|
-
type: "bytes",
|
|
3457
|
-
id: 1
|
|
3458
|
-
},
|
|
3459
|
-
catalyst_registration_parameters: {
|
|
3460
|
-
type: "CardanoCatalystRegistrationParametersType",
|
|
3461
|
-
id: 2
|
|
3462
|
-
}
|
|
3463
|
-
}
|
|
3464
|
-
}
|
|
3465
|
-
}
|
|
3466
|
-
},
|
|
3467
|
-
CardanoSignedTxChunk: {
|
|
3468
|
-
options: {
|
|
3469
|
-
deprecated: true
|
|
3470
|
-
},
|
|
3354
|
+
CardanoTxBodyHash: {
|
|
3471
3355
|
fields: {
|
|
3472
|
-
|
|
3356
|
+
tx_hash: {
|
|
3473
3357
|
rule: "required",
|
|
3474
3358
|
type: "bytes",
|
|
3475
3359
|
id: 1
|
|
3476
3360
|
}
|
|
3477
3361
|
}
|
|
3478
3362
|
},
|
|
3479
|
-
|
|
3480
|
-
options: {
|
|
3481
|
-
deprecated: true
|
|
3482
|
-
},
|
|
3363
|
+
CardanoSignTxFinished: {
|
|
3483
3364
|
fields: {
|
|
3484
3365
|
}
|
|
3485
3366
|
},
|
|
3486
|
-
|
|
3487
|
-
options: {
|
|
3488
|
-
deprecated: true
|
|
3489
|
-
},
|
|
3367
|
+
CardanoSignMessage: {
|
|
3490
3368
|
fields: {
|
|
3491
|
-
|
|
3369
|
+
address_n: {
|
|
3370
|
+
rule: "repeated",
|
|
3371
|
+
type: "uint32",
|
|
3372
|
+
id: 1,
|
|
3373
|
+
options: {
|
|
3374
|
+
packed: false
|
|
3375
|
+
}
|
|
3376
|
+
},
|
|
3377
|
+
message: {
|
|
3378
|
+
rule: "required",
|
|
3379
|
+
type: "bytes",
|
|
3380
|
+
id: 2
|
|
3381
|
+
},
|
|
3382
|
+
derivation_type: {
|
|
3383
|
+
rule: "required",
|
|
3384
|
+
type: "CardanoDerivationType",
|
|
3385
|
+
id: 3
|
|
3386
|
+
},
|
|
3387
|
+
network_id: {
|
|
3388
|
+
rule: "required",
|
|
3389
|
+
type: "uint32",
|
|
3390
|
+
id: 4
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
},
|
|
3394
|
+
CardanoMessageSignature: {
|
|
3395
|
+
fields: {
|
|
3396
|
+
signature: {
|
|
3492
3397
|
rule: "required",
|
|
3493
3398
|
type: "bytes",
|
|
3494
3399
|
id: 1
|
|
3495
3400
|
},
|
|
3496
|
-
|
|
3401
|
+
key: {
|
|
3402
|
+
rule: "required",
|
|
3497
3403
|
type: "bytes",
|
|
3498
3404
|
id: 2
|
|
3499
3405
|
}
|
|
@@ -4933,6 +4839,10 @@ var nested = {
|
|
|
4933
4839
|
options: {
|
|
4934
4840
|
"default": true
|
|
4935
4841
|
}
|
|
4842
|
+
},
|
|
4843
|
+
chain_id: {
|
|
4844
|
+
type: "uint64",
|
|
4845
|
+
id: 4
|
|
4936
4846
|
}
|
|
4937
4847
|
}
|
|
4938
4848
|
},
|
|
@@ -5037,6 +4947,10 @@ var nested = {
|
|
|
5037
4947
|
show_display: {
|
|
5038
4948
|
type: "bool",
|
|
5039
4949
|
id: 2
|
|
4950
|
+
},
|
|
4951
|
+
chain_id: {
|
|
4952
|
+
type: "uint64",
|
|
4953
|
+
id: 3
|
|
5040
4954
|
}
|
|
5041
4955
|
}
|
|
5042
4956
|
},
|
|
@@ -5067,6 +4981,10 @@ var nested = {
|
|
|
5067
4981
|
show_display: {
|
|
5068
4982
|
type: "bool",
|
|
5069
4983
|
id: 2
|
|
4984
|
+
},
|
|
4985
|
+
chain_id: {
|
|
4986
|
+
type: "uint64",
|
|
4987
|
+
id: 3
|
|
5070
4988
|
}
|
|
5071
4989
|
}
|
|
5072
4990
|
},
|
|
@@ -5276,6 +5194,10 @@ var nested = {
|
|
|
5276
5194
|
rule: "required",
|
|
5277
5195
|
type: "bytes",
|
|
5278
5196
|
id: 2
|
|
5197
|
+
},
|
|
5198
|
+
chain_id: {
|
|
5199
|
+
type: "uint64",
|
|
5200
|
+
id: 3
|
|
5279
5201
|
}
|
|
5280
5202
|
}
|
|
5281
5203
|
},
|
|
@@ -5309,6 +5231,10 @@ var nested = {
|
|
|
5309
5231
|
rule: "required",
|
|
5310
5232
|
type: "string",
|
|
5311
5233
|
id: 4
|
|
5234
|
+
},
|
|
5235
|
+
chain_id: {
|
|
5236
|
+
type: "uint64",
|
|
5237
|
+
id: 5
|
|
5312
5238
|
}
|
|
5313
5239
|
}
|
|
5314
5240
|
},
|
|
@@ -5350,6 +5276,10 @@ var nested = {
|
|
|
5350
5276
|
message_hash: {
|
|
5351
5277
|
type: "bytes",
|
|
5352
5278
|
id: 3
|
|
5279
|
+
},
|
|
5280
|
+
chain_id: {
|
|
5281
|
+
type: "uint64",
|
|
5282
|
+
id: 4
|
|
5353
5283
|
}
|
|
5354
5284
|
}
|
|
5355
5285
|
},
|
|
@@ -5367,6 +5297,56 @@ var nested = {
|
|
|
5367
5297
|
}
|
|
5368
5298
|
}
|
|
5369
5299
|
},
|
|
5300
|
+
FilecoinGetAddress: {
|
|
5301
|
+
fields: {
|
|
5302
|
+
address_n: {
|
|
5303
|
+
rule: "repeated",
|
|
5304
|
+
type: "uint32",
|
|
5305
|
+
id: 1,
|
|
5306
|
+
options: {
|
|
5307
|
+
packed: false
|
|
5308
|
+
}
|
|
5309
|
+
},
|
|
5310
|
+
show_display: {
|
|
5311
|
+
type: "bool",
|
|
5312
|
+
id: 2
|
|
5313
|
+
}
|
|
5314
|
+
}
|
|
5315
|
+
},
|
|
5316
|
+
FilecoinAddress: {
|
|
5317
|
+
fields: {
|
|
5318
|
+
address: {
|
|
5319
|
+
type: "string",
|
|
5320
|
+
id: 1
|
|
5321
|
+
}
|
|
5322
|
+
}
|
|
5323
|
+
},
|
|
5324
|
+
FilecoinSignTx: {
|
|
5325
|
+
fields: {
|
|
5326
|
+
address_n: {
|
|
5327
|
+
rule: "repeated",
|
|
5328
|
+
type: "uint32",
|
|
5329
|
+
id: 1,
|
|
5330
|
+
options: {
|
|
5331
|
+
packed: false
|
|
5332
|
+
}
|
|
5333
|
+
},
|
|
5334
|
+
raw_tx: {
|
|
5335
|
+
rule: "required",
|
|
5336
|
+
type: "bytes",
|
|
5337
|
+
id: 2
|
|
5338
|
+
}
|
|
5339
|
+
}
|
|
5340
|
+
},
|
|
5341
|
+
FilecoinSignedTx: {
|
|
5342
|
+
fields: {
|
|
5343
|
+
signature: {
|
|
5344
|
+
rule: "required",
|
|
5345
|
+
type: "bytes",
|
|
5346
|
+
id: 1
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
},
|
|
5370
5350
|
BackupType: {
|
|
5371
5351
|
values: {
|
|
5372
5352
|
Bip39: 0,
|
|
@@ -6403,14 +6383,18 @@ var nested = {
|
|
|
6403
6383
|
type: "ResourceType",
|
|
6404
6384
|
id: 3
|
|
6405
6385
|
},
|
|
6386
|
+
nft_meta_data: {
|
|
6387
|
+
type: "bytes",
|
|
6388
|
+
id: 4
|
|
6389
|
+
},
|
|
6406
6390
|
zoom_data_length: {
|
|
6407
6391
|
rule: "required",
|
|
6408
6392
|
type: "uint32",
|
|
6409
6393
|
id: 5
|
|
6410
6394
|
},
|
|
6411
|
-
|
|
6412
|
-
type: "
|
|
6413
|
-
id:
|
|
6395
|
+
file_name_no_ext: {
|
|
6396
|
+
type: "string",
|
|
6397
|
+
id: 6
|
|
6414
6398
|
}
|
|
6415
6399
|
},
|
|
6416
6400
|
nested: {
|
|
@@ -7942,6 +7926,56 @@ var nested = {
|
|
|
7942
7926
|
}
|
|
7943
7927
|
}
|
|
7944
7928
|
},
|
|
7929
|
+
PolkadotGetAddress: {
|
|
7930
|
+
fields: {
|
|
7931
|
+
address_n: {
|
|
7932
|
+
rule: "repeated",
|
|
7933
|
+
type: "uint32",
|
|
7934
|
+
id: 1,
|
|
7935
|
+
options: {
|
|
7936
|
+
packed: false
|
|
7937
|
+
}
|
|
7938
|
+
},
|
|
7939
|
+
show_display: {
|
|
7940
|
+
type: "bool",
|
|
7941
|
+
id: 3
|
|
7942
|
+
}
|
|
7943
|
+
}
|
|
7944
|
+
},
|
|
7945
|
+
PolkadotAddress: {
|
|
7946
|
+
fields: {
|
|
7947
|
+
address: {
|
|
7948
|
+
type: "string",
|
|
7949
|
+
id: 1
|
|
7950
|
+
}
|
|
7951
|
+
}
|
|
7952
|
+
},
|
|
7953
|
+
PolkadotSignTx: {
|
|
7954
|
+
fields: {
|
|
7955
|
+
address_n: {
|
|
7956
|
+
rule: "repeated",
|
|
7957
|
+
type: "uint32",
|
|
7958
|
+
id: 1,
|
|
7959
|
+
options: {
|
|
7960
|
+
packed: false
|
|
7961
|
+
}
|
|
7962
|
+
},
|
|
7963
|
+
raw_tx: {
|
|
7964
|
+
rule: "required",
|
|
7965
|
+
type: "bytes",
|
|
7966
|
+
id: 2
|
|
7967
|
+
}
|
|
7968
|
+
}
|
|
7969
|
+
},
|
|
7970
|
+
PolkadotSignedTx: {
|
|
7971
|
+
fields: {
|
|
7972
|
+
signature: {
|
|
7973
|
+
rule: "required",
|
|
7974
|
+
type: "bytes",
|
|
7975
|
+
id: 1
|
|
7976
|
+
}
|
|
7977
|
+
}
|
|
7978
|
+
},
|
|
7945
7979
|
RippleGetAddress: {
|
|
7946
7980
|
fields: {
|
|
7947
7981
|
address_n: {
|
|
@@ -9624,14 +9658,10 @@ var nested = {
|
|
|
9624
9658
|
MessageType_StellarManageBuyOfferOp: 222,
|
|
9625
9659
|
MessageType_StellarPathPaymentStrictSendOp: 223,
|
|
9626
9660
|
MessageType_StellarSignedTx: 230,
|
|
9627
|
-
MessageType_CardanoSignTx: 303,
|
|
9628
9661
|
MessageType_CardanoGetPublicKey: 305,
|
|
9629
9662
|
MessageType_CardanoPublicKey: 306,
|
|
9630
9663
|
MessageType_CardanoGetAddress: 307,
|
|
9631
9664
|
MessageType_CardanoAddress: 308,
|
|
9632
|
-
MessageType_CardanoSignedTx: 310,
|
|
9633
|
-
MessageType_CardanoSignedTxChunk: 311,
|
|
9634
|
-
MessageType_CardanoSignedTxChunkAck: 312,
|
|
9635
9665
|
MessageType_CardanoTxItemAck: 313,
|
|
9636
9666
|
MessageType_CardanoTxAuxiliaryDataSupplement: 314,
|
|
9637
9667
|
MessageType_CardanoTxWitnessRequest: 315,
|
|
@@ -9652,6 +9682,13 @@ var nested = {
|
|
|
9652
9682
|
MessageType_CardanoGetNativeScriptHash: 330,
|
|
9653
9683
|
MessageType_CardanoNativeScriptHash: 331,
|
|
9654
9684
|
MessageType_CardanoTxMint: 332,
|
|
9685
|
+
MessageType_CardanoTxCollateralInput: 333,
|
|
9686
|
+
MessageType_CardanoTxRequiredSigner: 334,
|
|
9687
|
+
MessageType_CardanoTxInlineDatumChunk: 335,
|
|
9688
|
+
MessageType_CardanoTxReferenceScriptChunk: 336,
|
|
9689
|
+
MessageType_CardanoTxReferenceInput: 337,
|
|
9690
|
+
MessageType_CardanoSignMessage: 350,
|
|
9691
|
+
MessageType_CardanoMessageSignature: 351,
|
|
9655
9692
|
MessageType_RippleGetAddress: 400,
|
|
9656
9693
|
MessageType_RippleAddress: 401,
|
|
9657
9694
|
MessageType_RippleSignTx: 402,
|
|
@@ -9777,10 +9814,18 @@ var nested = {
|
|
|
9777
9814
|
MessageType_AlgorandAddress: 10901,
|
|
9778
9815
|
MessageType_AlgorandSignTx: 10902,
|
|
9779
9816
|
MessageType_AlgorandSignedTx: 10903,
|
|
9817
|
+
MessageType_PolkadotGetAddress: 11000,
|
|
9818
|
+
MessageType_PolkadotAddress: 11001,
|
|
9819
|
+
MessageType_PolkadotSignTx: 11002,
|
|
9820
|
+
MessageType_PolkadotSignedTx: 11003,
|
|
9780
9821
|
MessageType_SuiGetAddress: 11100,
|
|
9781
9822
|
MessageType_SuiAddress: 11101,
|
|
9782
9823
|
MessageType_SuiSignTx: 11102,
|
|
9783
9824
|
MessageType_SuiSignedTx: 11103,
|
|
9825
|
+
MessageType_FilecoinGetAddress: 11200,
|
|
9826
|
+
MessageType_FilecoinAddress: 11201,
|
|
9827
|
+
MessageType_FilecoinSignTx: 11202,
|
|
9828
|
+
MessageType_FilecoinSignedTx: 11203,
|
|
9784
9829
|
MessageType_DeviceBackToBoot: 903,
|
|
9785
9830
|
MessageType_DeviceInfoSettings: 10001,
|
|
9786
9831
|
MessageType_GetDeviceInfo: 10002,
|
|
@@ -17612,6 +17657,101 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
17612
17657
|
}
|
|
17613
17658
|
}
|
|
17614
17659
|
|
|
17660
|
+
class FilecoinGetAddress extends BaseMethod {
|
|
17661
|
+
constructor() {
|
|
17662
|
+
super(...arguments);
|
|
17663
|
+
this.hasBundle = false;
|
|
17664
|
+
}
|
|
17665
|
+
init() {
|
|
17666
|
+
var _a;
|
|
17667
|
+
this.checkDeviceId = true;
|
|
17668
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
17669
|
+
this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
|
|
17670
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
17671
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
17672
|
+
this.params = [];
|
|
17673
|
+
payload.bundle.forEach((batch) => {
|
|
17674
|
+
var _a;
|
|
17675
|
+
const addressN = validatePath(batch.path, 3);
|
|
17676
|
+
validateParams(batch, [
|
|
17677
|
+
{ name: 'path', required: true },
|
|
17678
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
17679
|
+
]);
|
|
17680
|
+
const showOnOneKey = (_a = batch.showOnOneKey) !== null && _a !== void 0 ? _a : true;
|
|
17681
|
+
this.params.push({
|
|
17682
|
+
address_n: addressN,
|
|
17683
|
+
show_display: showOnOneKey,
|
|
17684
|
+
});
|
|
17685
|
+
});
|
|
17686
|
+
}
|
|
17687
|
+
getVersionRange() {
|
|
17688
|
+
return {
|
|
17689
|
+
model_mini: {
|
|
17690
|
+
min: '2.10.0',
|
|
17691
|
+
},
|
|
17692
|
+
model_touch: {
|
|
17693
|
+
min: '3.5.0',
|
|
17694
|
+
},
|
|
17695
|
+
};
|
|
17696
|
+
}
|
|
17697
|
+
run() {
|
|
17698
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17699
|
+
const responses = [];
|
|
17700
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
17701
|
+
const param = this.params[i];
|
|
17702
|
+
const res = yield this.device.commands.typedCall('FilecoinGetAddress', 'FilecoinAddress', Object.assign({}, param));
|
|
17703
|
+
const { address } = res.message;
|
|
17704
|
+
responses.push({
|
|
17705
|
+
path: serializedPath(param.address_n),
|
|
17706
|
+
address,
|
|
17707
|
+
});
|
|
17708
|
+
}
|
|
17709
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
17710
|
+
});
|
|
17711
|
+
}
|
|
17712
|
+
}
|
|
17713
|
+
|
|
17714
|
+
class FilecoinSignTransaction extends BaseMethod {
|
|
17715
|
+
constructor() {
|
|
17716
|
+
super(...arguments);
|
|
17717
|
+
this.hasBundle = false;
|
|
17718
|
+
}
|
|
17719
|
+
init() {
|
|
17720
|
+
this.checkDeviceId = true;
|
|
17721
|
+
this.allowDeviceMode = [...this.allowDeviceMode];
|
|
17722
|
+
validateParams(this.payload, [
|
|
17723
|
+
{ name: 'path', required: true },
|
|
17724
|
+
{ name: 'rawTx', type: 'hexString', required: true },
|
|
17725
|
+
]);
|
|
17726
|
+
const { path, rawTx } = this.payload;
|
|
17727
|
+
const addressN = validatePath(path, 3);
|
|
17728
|
+
this.params = {
|
|
17729
|
+
address_n: addressN,
|
|
17730
|
+
raw_tx: formatAnyHex(rawTx),
|
|
17731
|
+
};
|
|
17732
|
+
}
|
|
17733
|
+
getVersionRange() {
|
|
17734
|
+
return {
|
|
17735
|
+
model_mini: {
|
|
17736
|
+
min: '2.10.0',
|
|
17737
|
+
},
|
|
17738
|
+
model_touch: {
|
|
17739
|
+
min: '3.5.0',
|
|
17740
|
+
},
|
|
17741
|
+
};
|
|
17742
|
+
}
|
|
17743
|
+
run() {
|
|
17744
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17745
|
+
const res = yield this.device.commands.typedCall('FilecoinSignTx', 'FilecoinSignedTx', Object.assign({}, this.params));
|
|
17746
|
+
const { signature } = res.message;
|
|
17747
|
+
return {
|
|
17748
|
+
path: serializedPath(this.params.address_n),
|
|
17749
|
+
signature,
|
|
17750
|
+
};
|
|
17751
|
+
});
|
|
17752
|
+
}
|
|
17753
|
+
}
|
|
17754
|
+
|
|
17615
17755
|
var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
17616
17756
|
__proto__: null,
|
|
17617
17757
|
searchDevices: SearchDevices,
|
|
@@ -17688,7 +17828,9 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
17688
17828
|
suiSignTransaction: SuiSignTransaction,
|
|
17689
17829
|
cardanoGetAddress: CardanoGetAddress,
|
|
17690
17830
|
cardanoGetPublicKey: CardanoGetPublicKey,
|
|
17691
|
-
cardanoSignTransaction: CardanoSignTransaction
|
|
17831
|
+
cardanoSignTransaction: CardanoSignTransaction,
|
|
17832
|
+
filecoinGetAddress: FilecoinGetAddress,
|
|
17833
|
+
filecoinSignTransaction: FilecoinSignTransaction
|
|
17692
17834
|
});
|
|
17693
17835
|
|
|
17694
17836
|
function findMethod(message) {
|