@onekeyfe/hd-web-sdk 0.2.11 → 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/build/data/messages/messages.json +281 -368
- package/build/iframe.html +1 -1
- package/build/js/iframe.c996465fbbfd30521d6f.js +3 -0
- package/build/js/{iframe.932630ce947859836647.js.LICENSE.txt → iframe.c996465fbbfd30521d6f.js.LICENSE.txt} +0 -0
- package/build/js/iframe.c996465fbbfd30521d6f.js.map +1 -0
- package/build/onekey-js-sdk.js +265 -270
- package/build/onekey-js-sdk.js.map +1 -1
- package/build/onekey-js-sdk.min.js +1 -1
- package/build/onekey-js-sdk.min.js.map +1 -1
- package/package.json +6 -6
- package/build/js/iframe.932630ce947859836647.js +0 -3
- package/build/js/iframe.932630ce947859836647.js.map +0 -1
package/build/onekey-js-sdk.js
CHANGED
|
@@ -7482,6 +7482,11 @@ const inject = ({
|
|
|
7482
7482
|
connectId,
|
|
7483
7483
|
deviceId,
|
|
7484
7484
|
method: 'cardanoSignTransaction'
|
|
7485
|
+
})),
|
|
7486
|
+
cardanoSignMessage: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), {
|
|
7487
|
+
connectId,
|
|
7488
|
+
deviceId,
|
|
7489
|
+
method: 'cardanoSignMessage'
|
|
7485
7490
|
}))
|
|
7486
7491
|
};
|
|
7487
7492
|
return api;
|
|
@@ -9979,6 +9984,12 @@ var nested = {
|
|
|
9979
9984
|
POLICY_ID: 2
|
|
9980
9985
|
}
|
|
9981
9986
|
},
|
|
9987
|
+
CardanoTxOutputSerializationFormat: {
|
|
9988
|
+
values: {
|
|
9989
|
+
ARRAY_LEGACY: 0,
|
|
9990
|
+
MAP_BABBAGE: 1
|
|
9991
|
+
}
|
|
9992
|
+
},
|
|
9982
9993
|
CardanoCertificateType: {
|
|
9983
9994
|
values: {
|
|
9984
9995
|
STAKE_REGISTRATION: 0,
|
|
@@ -9997,14 +10008,21 @@ var nested = {
|
|
|
9997
10008
|
CardanoTxAuxiliaryDataSupplementType: {
|
|
9998
10009
|
values: {
|
|
9999
10010
|
NONE: 0,
|
|
10000
|
-
|
|
10011
|
+
GOVERNANCE_REGISTRATION_SIGNATURE: 1
|
|
10012
|
+
}
|
|
10013
|
+
},
|
|
10014
|
+
CardanoGovernanceRegistrationFormat: {
|
|
10015
|
+
values: {
|
|
10016
|
+
CIP15: 0,
|
|
10017
|
+
CIP36: 1
|
|
10001
10018
|
}
|
|
10002
10019
|
},
|
|
10003
10020
|
CardanoTxSigningMode: {
|
|
10004
10021
|
values: {
|
|
10005
10022
|
ORDINARY_TRANSACTION: 0,
|
|
10006
10023
|
POOL_REGISTRATION_AS_OWNER: 1,
|
|
10007
|
-
MULTISIG_TRANSACTION: 2
|
|
10024
|
+
MULTISIG_TRANSACTION: 2,
|
|
10025
|
+
PLUTUS_TRANSACTION: 3
|
|
10008
10026
|
}
|
|
10009
10027
|
},
|
|
10010
10028
|
CardanoTxWitnessType: {
|
|
@@ -10358,6 +10376,31 @@ var nested = {
|
|
|
10358
10376
|
rule: "required",
|
|
10359
10377
|
type: "uint32",
|
|
10360
10378
|
id: 4
|
|
10379
|
+
},
|
|
10380
|
+
datum_hash: {
|
|
10381
|
+
type: "bytes",
|
|
10382
|
+
id: 5
|
|
10383
|
+
},
|
|
10384
|
+
format: {
|
|
10385
|
+
type: "CardanoTxOutputSerializationFormat",
|
|
10386
|
+
id: 6,
|
|
10387
|
+
options: {
|
|
10388
|
+
"default": "ARRAY_LEGACY"
|
|
10389
|
+
}
|
|
10390
|
+
},
|
|
10391
|
+
inline_datum_size: {
|
|
10392
|
+
type: "uint32",
|
|
10393
|
+
id: 7,
|
|
10394
|
+
options: {
|
|
10395
|
+
"default": 0
|
|
10396
|
+
}
|
|
10397
|
+
},
|
|
10398
|
+
reference_script_size: {
|
|
10399
|
+
type: "uint32",
|
|
10400
|
+
id: 8,
|
|
10401
|
+
options: {
|
|
10402
|
+
"default": 0
|
|
10403
|
+
}
|
|
10361
10404
|
}
|
|
10362
10405
|
}
|
|
10363
10406
|
},
|
|
@@ -10392,6 +10435,24 @@ var nested = {
|
|
|
10392
10435
|
}
|
|
10393
10436
|
}
|
|
10394
10437
|
},
|
|
10438
|
+
CardanoTxInlineDatumChunk: {
|
|
10439
|
+
fields: {
|
|
10440
|
+
data: {
|
|
10441
|
+
rule: "required",
|
|
10442
|
+
type: "bytes",
|
|
10443
|
+
id: 1
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
},
|
|
10447
|
+
CardanoTxReferenceScriptChunk: {
|
|
10448
|
+
fields: {
|
|
10449
|
+
data: {
|
|
10450
|
+
rule: "required",
|
|
10451
|
+
type: "bytes",
|
|
10452
|
+
id: 1
|
|
10453
|
+
}
|
|
10454
|
+
}
|
|
10455
|
+
},
|
|
10395
10456
|
CardanoPoolOwner: {
|
|
10396
10457
|
fields: {
|
|
10397
10458
|
staking_key_path: {
|
|
@@ -10484,22 +10545,6 @@ var nested = {
|
|
|
10484
10545
|
type: "string",
|
|
10485
10546
|
id: 7
|
|
10486
10547
|
},
|
|
10487
|
-
owners: {
|
|
10488
|
-
rule: "repeated",
|
|
10489
|
-
type: "CardanoPoolOwner",
|
|
10490
|
-
id: 8,
|
|
10491
|
-
options: {
|
|
10492
|
-
deprecated: true
|
|
10493
|
-
}
|
|
10494
|
-
},
|
|
10495
|
-
relays: {
|
|
10496
|
-
rule: "repeated",
|
|
10497
|
-
type: "CardanoPoolRelayParameters",
|
|
10498
|
-
id: 9,
|
|
10499
|
-
options: {
|
|
10500
|
-
deprecated: true
|
|
10501
|
-
}
|
|
10502
|
-
},
|
|
10503
10548
|
metadata: {
|
|
10504
10549
|
type: "CardanoPoolMetadataType",
|
|
10505
10550
|
id: 10
|
|
@@ -10542,6 +10587,10 @@ var nested = {
|
|
|
10542
10587
|
script_hash: {
|
|
10543
10588
|
type: "bytes",
|
|
10544
10589
|
id: 5
|
|
10590
|
+
},
|
|
10591
|
+
key_hash: {
|
|
10592
|
+
type: "bytes",
|
|
10593
|
+
id: 6
|
|
10545
10594
|
}
|
|
10546
10595
|
}
|
|
10547
10596
|
},
|
|
@@ -10563,16 +10612,33 @@ var nested = {
|
|
|
10563
10612
|
script_hash: {
|
|
10564
10613
|
type: "bytes",
|
|
10565
10614
|
id: 3
|
|
10615
|
+
},
|
|
10616
|
+
key_hash: {
|
|
10617
|
+
type: "bytes",
|
|
10618
|
+
id: 4
|
|
10566
10619
|
}
|
|
10567
10620
|
}
|
|
10568
10621
|
},
|
|
10569
|
-
|
|
10622
|
+
CardanoGovernanceRegistrationDelegation: {
|
|
10570
10623
|
fields: {
|
|
10571
10624
|
voting_public_key: {
|
|
10572
10625
|
rule: "required",
|
|
10573
10626
|
type: "bytes",
|
|
10574
10627
|
id: 1
|
|
10575
10628
|
},
|
|
10629
|
+
weight: {
|
|
10630
|
+
rule: "required",
|
|
10631
|
+
type: "uint32",
|
|
10632
|
+
id: 2
|
|
10633
|
+
}
|
|
10634
|
+
}
|
|
10635
|
+
},
|
|
10636
|
+
CardanoGovernanceRegistrationParametersType: {
|
|
10637
|
+
fields: {
|
|
10638
|
+
voting_public_key: {
|
|
10639
|
+
type: "bytes",
|
|
10640
|
+
id: 1
|
|
10641
|
+
},
|
|
10576
10642
|
staking_path: {
|
|
10577
10643
|
rule: "repeated",
|
|
10578
10644
|
type: "uint32",
|
|
@@ -10590,13 +10656,29 @@ var nested = {
|
|
|
10590
10656
|
rule: "required",
|
|
10591
10657
|
type: "uint64",
|
|
10592
10658
|
id: 4
|
|
10659
|
+
},
|
|
10660
|
+
format: {
|
|
10661
|
+
type: "CardanoGovernanceRegistrationFormat",
|
|
10662
|
+
id: 5,
|
|
10663
|
+
options: {
|
|
10664
|
+
"default": "CIP15"
|
|
10665
|
+
}
|
|
10666
|
+
},
|
|
10667
|
+
delegations: {
|
|
10668
|
+
rule: "repeated",
|
|
10669
|
+
type: "CardanoGovernanceRegistrationDelegation",
|
|
10670
|
+
id: 6
|
|
10671
|
+
},
|
|
10672
|
+
voting_purpose: {
|
|
10673
|
+
type: "uint64",
|
|
10674
|
+
id: 7
|
|
10593
10675
|
}
|
|
10594
10676
|
}
|
|
10595
10677
|
},
|
|
10596
10678
|
CardanoTxAuxiliaryData: {
|
|
10597
10679
|
fields: {
|
|
10598
|
-
|
|
10599
|
-
type: "
|
|
10680
|
+
governance_registration_parameters: {
|
|
10681
|
+
type: "CardanoGovernanceRegistrationParametersType",
|
|
10600
10682
|
id: 1
|
|
10601
10683
|
},
|
|
10602
10684
|
hash: {
|
|
@@ -10614,6 +10696,50 @@ var nested = {
|
|
|
10614
10696
|
}
|
|
10615
10697
|
}
|
|
10616
10698
|
},
|
|
10699
|
+
CardanoTxCollateralInput: {
|
|
10700
|
+
fields: {
|
|
10701
|
+
prev_hash: {
|
|
10702
|
+
rule: "required",
|
|
10703
|
+
type: "bytes",
|
|
10704
|
+
id: 1
|
|
10705
|
+
},
|
|
10706
|
+
prev_index: {
|
|
10707
|
+
rule: "required",
|
|
10708
|
+
type: "uint32",
|
|
10709
|
+
id: 2
|
|
10710
|
+
}
|
|
10711
|
+
}
|
|
10712
|
+
},
|
|
10713
|
+
CardanoTxRequiredSigner: {
|
|
10714
|
+
fields: {
|
|
10715
|
+
key_hash: {
|
|
10716
|
+
type: "bytes",
|
|
10717
|
+
id: 1
|
|
10718
|
+
},
|
|
10719
|
+
key_path: {
|
|
10720
|
+
rule: "repeated",
|
|
10721
|
+
type: "uint32",
|
|
10722
|
+
id: 2,
|
|
10723
|
+
options: {
|
|
10724
|
+
packed: false
|
|
10725
|
+
}
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
},
|
|
10729
|
+
CardanoTxReferenceInput: {
|
|
10730
|
+
fields: {
|
|
10731
|
+
prev_hash: {
|
|
10732
|
+
rule: "required",
|
|
10733
|
+
type: "bytes",
|
|
10734
|
+
id: 1
|
|
10735
|
+
},
|
|
10736
|
+
prev_index: {
|
|
10737
|
+
rule: "required",
|
|
10738
|
+
type: "uint32",
|
|
10739
|
+
id: 2
|
|
10740
|
+
}
|
|
10741
|
+
}
|
|
10742
|
+
},
|
|
10617
10743
|
CardanoTxItemAck: {
|
|
10618
10744
|
fields: {}
|
|
10619
10745
|
},
|
|
@@ -10628,7 +10754,7 @@ var nested = {
|
|
|
10628
10754
|
type: "bytes",
|
|
10629
10755
|
id: 2
|
|
10630
10756
|
},
|
|
10631
|
-
|
|
10757
|
+
governance_signature: {
|
|
10632
10758
|
type: "bytes",
|
|
10633
10759
|
id: 3
|
|
10634
10760
|
}
|
|
@@ -10684,258 +10810,42 @@ var nested = {
|
|
|
10684
10810
|
CardanoSignTxFinished: {
|
|
10685
10811
|
fields: {}
|
|
10686
10812
|
},
|
|
10687
|
-
|
|
10688
|
-
options: {
|
|
10689
|
-
deprecated: true
|
|
10690
|
-
},
|
|
10813
|
+
CardanoSignMessage: {
|
|
10691
10814
|
fields: {
|
|
10692
|
-
|
|
10693
|
-
rule: "repeated",
|
|
10694
|
-
type: "CardanoTxInputType",
|
|
10695
|
-
id: 1
|
|
10696
|
-
},
|
|
10697
|
-
outputs: {
|
|
10815
|
+
address_n: {
|
|
10698
10816
|
rule: "repeated",
|
|
10699
|
-
type: "CardanoTxOutputType",
|
|
10700
|
-
id: 2
|
|
10701
|
-
},
|
|
10702
|
-
protocol_magic: {
|
|
10703
|
-
rule: "required",
|
|
10704
10817
|
type: "uint32",
|
|
10705
|
-
id:
|
|
10818
|
+
id: 1,
|
|
10819
|
+
options: {
|
|
10820
|
+
packed: false
|
|
10821
|
+
}
|
|
10706
10822
|
},
|
|
10707
|
-
|
|
10823
|
+
message: {
|
|
10708
10824
|
rule: "required",
|
|
10709
|
-
type: "
|
|
10710
|
-
id:
|
|
10825
|
+
type: "bytes",
|
|
10826
|
+
id: 2
|
|
10711
10827
|
},
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10828
|
+
derivation_type: {
|
|
10829
|
+
rule: "required",
|
|
10830
|
+
type: "CardanoDerivationType",
|
|
10831
|
+
id: 3
|
|
10715
10832
|
},
|
|
10716
10833
|
network_id: {
|
|
10717
10834
|
rule: "required",
|
|
10718
10835
|
type: "uint32",
|
|
10719
|
-
id:
|
|
10720
|
-
},
|
|
10721
|
-
certificates: {
|
|
10722
|
-
rule: "repeated",
|
|
10723
|
-
type: "CardanoTxCertificateType",
|
|
10724
|
-
id: 9
|
|
10725
|
-
},
|
|
10726
|
-
withdrawals: {
|
|
10727
|
-
rule: "repeated",
|
|
10728
|
-
type: "CardanoTxWithdrawalType",
|
|
10729
|
-
id: 10
|
|
10730
|
-
},
|
|
10731
|
-
validity_interval_start: {
|
|
10732
|
-
type: "uint64",
|
|
10733
|
-
id: 12
|
|
10734
|
-
},
|
|
10735
|
-
auxiliary_data: {
|
|
10736
|
-
type: "CardanoTxAuxiliaryDataType",
|
|
10737
|
-
id: 13
|
|
10738
|
-
}
|
|
10739
|
-
},
|
|
10740
|
-
nested: {
|
|
10741
|
-
CardanoTxInputType: {
|
|
10742
|
-
fields: {
|
|
10743
|
-
address_n: {
|
|
10744
|
-
rule: "repeated",
|
|
10745
|
-
type: "uint32",
|
|
10746
|
-
id: 1,
|
|
10747
|
-
options: {
|
|
10748
|
-
packed: false
|
|
10749
|
-
}
|
|
10750
|
-
},
|
|
10751
|
-
prev_hash: {
|
|
10752
|
-
rule: "required",
|
|
10753
|
-
type: "bytes",
|
|
10754
|
-
id: 2
|
|
10755
|
-
},
|
|
10756
|
-
prev_index: {
|
|
10757
|
-
rule: "required",
|
|
10758
|
-
type: "uint32",
|
|
10759
|
-
id: 3
|
|
10760
|
-
}
|
|
10761
|
-
}
|
|
10762
|
-
},
|
|
10763
|
-
CardanoTxOutputType: {
|
|
10764
|
-
fields: {
|
|
10765
|
-
address: {
|
|
10766
|
-
type: "string",
|
|
10767
|
-
id: 1
|
|
10768
|
-
},
|
|
10769
|
-
amount: {
|
|
10770
|
-
rule: "required",
|
|
10771
|
-
type: "uint64",
|
|
10772
|
-
id: 3
|
|
10773
|
-
},
|
|
10774
|
-
address_parameters: {
|
|
10775
|
-
type: "CardanoAddressParametersType",
|
|
10776
|
-
id: 4
|
|
10777
|
-
},
|
|
10778
|
-
token_bundle: {
|
|
10779
|
-
rule: "repeated",
|
|
10780
|
-
type: "CardanoAssetGroupType",
|
|
10781
|
-
id: 5
|
|
10782
|
-
}
|
|
10783
|
-
}
|
|
10784
|
-
},
|
|
10785
|
-
CardanoAssetGroupType: {
|
|
10786
|
-
fields: {
|
|
10787
|
-
policy_id: {
|
|
10788
|
-
rule: "required",
|
|
10789
|
-
type: "bytes",
|
|
10790
|
-
id: 1
|
|
10791
|
-
},
|
|
10792
|
-
tokens: {
|
|
10793
|
-
rule: "repeated",
|
|
10794
|
-
type: "CardanoTokenType",
|
|
10795
|
-
id: 2
|
|
10796
|
-
}
|
|
10797
|
-
}
|
|
10798
|
-
},
|
|
10799
|
-
CardanoTokenType: {
|
|
10800
|
-
fields: {
|
|
10801
|
-
asset_name_bytes: {
|
|
10802
|
-
rule: "required",
|
|
10803
|
-
type: "bytes",
|
|
10804
|
-
id: 1
|
|
10805
|
-
},
|
|
10806
|
-
amount: {
|
|
10807
|
-
rule: "required",
|
|
10808
|
-
type: "uint64",
|
|
10809
|
-
id: 2
|
|
10810
|
-
}
|
|
10811
|
-
}
|
|
10812
|
-
},
|
|
10813
|
-
CardanoPoolOwnerType: {
|
|
10814
|
-
fields: {
|
|
10815
|
-
staking_key_path: {
|
|
10816
|
-
rule: "repeated",
|
|
10817
|
-
type: "uint32",
|
|
10818
|
-
id: 1,
|
|
10819
|
-
options: {
|
|
10820
|
-
packed: false
|
|
10821
|
-
}
|
|
10822
|
-
},
|
|
10823
|
-
staking_key_hash: {
|
|
10824
|
-
type: "bytes",
|
|
10825
|
-
id: 2
|
|
10826
|
-
}
|
|
10827
|
-
}
|
|
10828
|
-
},
|
|
10829
|
-
CardanoPoolRelayParametersType: {
|
|
10830
|
-
fields: {
|
|
10831
|
-
type: {
|
|
10832
|
-
rule: "required",
|
|
10833
|
-
type: "CardanoPoolRelayType",
|
|
10834
|
-
id: 1
|
|
10835
|
-
},
|
|
10836
|
-
ipv4_address: {
|
|
10837
|
-
type: "bytes",
|
|
10838
|
-
id: 2
|
|
10839
|
-
},
|
|
10840
|
-
ipv6_address: {
|
|
10841
|
-
type: "bytes",
|
|
10842
|
-
id: 3
|
|
10843
|
-
},
|
|
10844
|
-
host_name: {
|
|
10845
|
-
type: "string",
|
|
10846
|
-
id: 4
|
|
10847
|
-
},
|
|
10848
|
-
port: {
|
|
10849
|
-
type: "uint32",
|
|
10850
|
-
id: 5
|
|
10851
|
-
}
|
|
10852
|
-
}
|
|
10853
|
-
},
|
|
10854
|
-
CardanoTxCertificateType: {
|
|
10855
|
-
fields: {
|
|
10856
|
-
type: {
|
|
10857
|
-
rule: "required",
|
|
10858
|
-
type: "CardanoCertificateType",
|
|
10859
|
-
id: 1
|
|
10860
|
-
},
|
|
10861
|
-
path: {
|
|
10862
|
-
rule: "repeated",
|
|
10863
|
-
type: "uint32",
|
|
10864
|
-
id: 2,
|
|
10865
|
-
options: {
|
|
10866
|
-
packed: false
|
|
10867
|
-
}
|
|
10868
|
-
},
|
|
10869
|
-
pool: {
|
|
10870
|
-
type: "bytes",
|
|
10871
|
-
id: 3
|
|
10872
|
-
},
|
|
10873
|
-
pool_parameters: {
|
|
10874
|
-
type: "CardanoPoolParametersType",
|
|
10875
|
-
id: 4
|
|
10876
|
-
}
|
|
10877
|
-
}
|
|
10878
|
-
},
|
|
10879
|
-
CardanoTxWithdrawalType: {
|
|
10880
|
-
fields: {
|
|
10881
|
-
path: {
|
|
10882
|
-
rule: "repeated",
|
|
10883
|
-
type: "uint32",
|
|
10884
|
-
id: 1,
|
|
10885
|
-
options: {
|
|
10886
|
-
packed: false
|
|
10887
|
-
}
|
|
10888
|
-
},
|
|
10889
|
-
amount: {
|
|
10890
|
-
rule: "required",
|
|
10891
|
-
type: "uint64",
|
|
10892
|
-
id: 2
|
|
10893
|
-
}
|
|
10894
|
-
}
|
|
10895
|
-
},
|
|
10896
|
-
CardanoTxAuxiliaryDataType: {
|
|
10897
|
-
fields: {
|
|
10898
|
-
blob: {
|
|
10899
|
-
type: "bytes",
|
|
10900
|
-
id: 1
|
|
10901
|
-
},
|
|
10902
|
-
catalyst_registration_parameters: {
|
|
10903
|
-
type: "CardanoCatalystRegistrationParametersType",
|
|
10904
|
-
id: 2
|
|
10905
|
-
}
|
|
10906
|
-
}
|
|
10907
|
-
}
|
|
10908
|
-
}
|
|
10909
|
-
},
|
|
10910
|
-
CardanoSignedTxChunk: {
|
|
10911
|
-
options: {
|
|
10912
|
-
deprecated: true
|
|
10913
|
-
},
|
|
10914
|
-
fields: {
|
|
10915
|
-
signed_tx_chunk: {
|
|
10916
|
-
rule: "required",
|
|
10917
|
-
type: "bytes",
|
|
10918
|
-
id: 1
|
|
10836
|
+
id: 4
|
|
10919
10837
|
}
|
|
10920
10838
|
}
|
|
10921
10839
|
},
|
|
10922
|
-
|
|
10923
|
-
options: {
|
|
10924
|
-
deprecated: true
|
|
10925
|
-
},
|
|
10926
|
-
fields: {}
|
|
10927
|
-
},
|
|
10928
|
-
CardanoSignedTx: {
|
|
10929
|
-
options: {
|
|
10930
|
-
deprecated: true
|
|
10931
|
-
},
|
|
10840
|
+
CardanoMessageSignature: {
|
|
10932
10841
|
fields: {
|
|
10933
|
-
|
|
10842
|
+
signature: {
|
|
10934
10843
|
rule: "required",
|
|
10935
10844
|
type: "bytes",
|
|
10936
10845
|
id: 1
|
|
10937
10846
|
},
|
|
10938
|
-
|
|
10847
|
+
key: {
|
|
10848
|
+
rule: "required",
|
|
10939
10849
|
type: "bytes",
|
|
10940
10850
|
id: 2
|
|
10941
10851
|
}
|
|
@@ -13827,11 +13737,16 @@ var nested = {
|
|
|
13827
13737
|
zoom_data_length: {
|
|
13828
13738
|
rule: "required",
|
|
13829
13739
|
type: "uint32",
|
|
13740
|
+
id: 4
|
|
13741
|
+
},
|
|
13742
|
+
file_name_no_ext: {
|
|
13743
|
+
rule: "required",
|
|
13744
|
+
type: "string",
|
|
13830
13745
|
id: 5
|
|
13831
13746
|
},
|
|
13832
|
-
|
|
13747
|
+
nft_metadata: {
|
|
13833
13748
|
type: "bytes",
|
|
13834
|
-
id:
|
|
13749
|
+
id: 6
|
|
13835
13750
|
}
|
|
13836
13751
|
},
|
|
13837
13752
|
nested: {
|
|
@@ -17032,14 +16947,10 @@ var nested = {
|
|
|
17032
16947
|
MessageType_StellarManageBuyOfferOp: 222,
|
|
17033
16948
|
MessageType_StellarPathPaymentStrictSendOp: 223,
|
|
17034
16949
|
MessageType_StellarSignedTx: 230,
|
|
17035
|
-
MessageType_CardanoSignTx: 303,
|
|
17036
16950
|
MessageType_CardanoGetPublicKey: 305,
|
|
17037
16951
|
MessageType_CardanoPublicKey: 306,
|
|
17038
16952
|
MessageType_CardanoGetAddress: 307,
|
|
17039
16953
|
MessageType_CardanoAddress: 308,
|
|
17040
|
-
MessageType_CardanoSignedTx: 310,
|
|
17041
|
-
MessageType_CardanoSignedTxChunk: 311,
|
|
17042
|
-
MessageType_CardanoSignedTxChunkAck: 312,
|
|
17043
16954
|
MessageType_CardanoTxItemAck: 313,
|
|
17044
16955
|
MessageType_CardanoTxAuxiliaryDataSupplement: 314,
|
|
17045
16956
|
MessageType_CardanoTxWitnessRequest: 315,
|
|
@@ -17060,6 +16971,13 @@ var nested = {
|
|
|
17060
16971
|
MessageType_CardanoGetNativeScriptHash: 330,
|
|
17061
16972
|
MessageType_CardanoNativeScriptHash: 331,
|
|
17062
16973
|
MessageType_CardanoTxMint: 332,
|
|
16974
|
+
MessageType_CardanoTxCollateralInput: 333,
|
|
16975
|
+
MessageType_CardanoTxRequiredSigner: 334,
|
|
16976
|
+
MessageType_CardanoTxInlineDatumChunk: 335,
|
|
16977
|
+
MessageType_CardanoTxReferenceScriptChunk: 336,
|
|
16978
|
+
MessageType_CardanoTxReferenceInput: 337,
|
|
16979
|
+
MessageType_CardanoSignMessage: 350,
|
|
16980
|
+
MessageType_CardanoMessageSignature: 351,
|
|
17063
16981
|
MessageType_RippleGetAddress: 400,
|
|
17064
16982
|
MessageType_RippleAddress: 401,
|
|
17065
16983
|
MessageType_RippleSignTx: 402,
|
|
@@ -20594,6 +20512,9 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
20594
20512
|
}, {
|
|
20595
20513
|
name: 'nftMetaData',
|
|
20596
20514
|
type: 'string'
|
|
20515
|
+
}, {
|
|
20516
|
+
name: 'file_name_no_ext',
|
|
20517
|
+
type: 'boolean'
|
|
20597
20518
|
}]);
|
|
20598
20519
|
const {
|
|
20599
20520
|
suffix,
|
|
@@ -20611,7 +20532,8 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
20611
20532
|
data_length: this.paramsData.data.byteLength,
|
|
20612
20533
|
zoom_data_length: this.paramsData.thumbnailData.byteLength,
|
|
20613
20534
|
res_type: resType,
|
|
20614
|
-
|
|
20535
|
+
nft_metadata: nftMetaData,
|
|
20536
|
+
file_name_no_ext: this.payload.file_name_no_ext
|
|
20615
20537
|
};
|
|
20616
20538
|
}
|
|
20617
20539
|
|
|
@@ -25971,7 +25893,7 @@ class CardanoGetAddress extends BaseMethod {
|
|
|
25971
25893
|
address: batch.address,
|
|
25972
25894
|
protocol_magic: batch.protocolMagic,
|
|
25973
25895
|
network_id: batch.networkId,
|
|
25974
|
-
derivation_type: typeof batch.derivationType !== 'undefined' ? batch.derivationType : hdTransport.Messages.CardanoDerivationType.
|
|
25896
|
+
derivation_type: typeof batch.derivationType !== 'undefined' ? batch.derivationType : hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
25975
25897
|
show_display: typeof batch.showOnOneKey === 'boolean' ? !!batch.showOnOneKey : true
|
|
25976
25898
|
};
|
|
25977
25899
|
});
|
|
@@ -26074,7 +25996,7 @@ class CardanoGetPublicKey extends BaseMethod {
|
|
|
26074
25996
|
const path = validatePath(batch.path, 3);
|
|
26075
25997
|
return {
|
|
26076
25998
|
address_n: path,
|
|
26077
|
-
derivation_type: typeof batch.derivationType !== 'undefined' ? batch.derivationType : hdTransport.Messages.CardanoDerivationType.
|
|
25999
|
+
derivation_type: typeof batch.derivationType !== 'undefined' ? batch.derivationType : hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
26078
26000
|
show_display: typeof batch.showOnOneKey === 'boolean' ? batch.showOnOneKey : false
|
|
26079
26001
|
};
|
|
26080
26002
|
});
|
|
@@ -26853,7 +26775,7 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
26853
26775
|
networkId: payload.networkId,
|
|
26854
26776
|
witnessPaths: gatherWitnessPaths(inputsWithPath, certificatesWithPoolOwnersAndRelays, withdrawals, collateralInputsWithPath, requiredSigners, additionalWitnessRequests, payload.signingMode),
|
|
26855
26777
|
additionalWitnessRequests,
|
|
26856
|
-
derivationType: typeof payload.derivationType !== 'undefined' ? payload.derivationType : hdTransport.Messages.CardanoDerivationType.
|
|
26778
|
+
derivationType: typeof payload.derivationType !== 'undefined' ? payload.derivationType : hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
26857
26779
|
includeNetworkId: payload.includeNetworkId
|
|
26858
26780
|
};
|
|
26859
26781
|
}
|
|
@@ -27013,6 +26935,55 @@ class CardanoSignTransaction extends BaseMethod {
|
|
|
27013
26935
|
|
|
27014
26936
|
}
|
|
27015
26937
|
|
|
26938
|
+
class CardanoSignMessage extends BaseMethod {
|
|
26939
|
+
init() {
|
|
26940
|
+
this.checkDeviceId = true;
|
|
26941
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
26942
|
+
const {
|
|
26943
|
+
payload
|
|
26944
|
+
} = this;
|
|
26945
|
+
validateParams(payload, [{
|
|
26946
|
+
name: 'path',
|
|
26947
|
+
type: 'string',
|
|
26948
|
+
required: true
|
|
26949
|
+
}, {
|
|
26950
|
+
name: 'message',
|
|
26951
|
+
type: 'string',
|
|
26952
|
+
required: true
|
|
26953
|
+
}, {
|
|
26954
|
+
name: 'derivationType',
|
|
26955
|
+
type: 'number'
|
|
26956
|
+
}, {
|
|
26957
|
+
name: 'networkId',
|
|
26958
|
+
type: 'number',
|
|
26959
|
+
required: true
|
|
26960
|
+
}]);
|
|
26961
|
+
const addressN = validatePath(payload.path, 3);
|
|
26962
|
+
this.params = {
|
|
26963
|
+
address_n: addressN,
|
|
26964
|
+
message: payload.message,
|
|
26965
|
+
derivation_type: typeof payload.derivationType !== 'undefined' ? payload.derivationType : hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
26966
|
+
network_id: payload.networkId
|
|
26967
|
+
};
|
|
26968
|
+
}
|
|
26969
|
+
|
|
26970
|
+
getVersionRange() {
|
|
26971
|
+
return {
|
|
26972
|
+
model_mini: {
|
|
26973
|
+
min: '2.10.0'
|
|
26974
|
+
}
|
|
26975
|
+
};
|
|
26976
|
+
}
|
|
26977
|
+
|
|
26978
|
+
run() {
|
|
26979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26980
|
+
const res = yield this.device.commands.typedCall('CardanoSignMessage', 'CardanoMessageSignature', this.params);
|
|
26981
|
+
return res.message;
|
|
26982
|
+
});
|
|
26983
|
+
}
|
|
26984
|
+
|
|
26985
|
+
}
|
|
26986
|
+
|
|
27016
26987
|
var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
27017
26988
|
__proto__: null,
|
|
27018
26989
|
searchDevices: SearchDevices,
|
|
@@ -27088,7 +27059,8 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
27088
27059
|
suiSignTransaction: SuiSignTransaction,
|
|
27089
27060
|
cardanoGetAddress: CardanoGetAddress,
|
|
27090
27061
|
cardanoGetPublicKey: CardanoGetPublicKey,
|
|
27091
|
-
cardanoSignTransaction: CardanoSignTransaction
|
|
27062
|
+
cardanoSignTransaction: CardanoSignTransaction,
|
|
27063
|
+
cardanoSignMessage: CardanoSignMessage
|
|
27092
27064
|
});
|
|
27093
27065
|
|
|
27094
27066
|
function findMethod(message) {
|
|
@@ -28621,6 +28593,13 @@ exports.CardanoNativeScriptHashDisplayFormat = void 0;
|
|
|
28621
28593
|
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["POLICY_ID"] = 2] = "POLICY_ID";
|
|
28622
28594
|
})(exports.CardanoNativeScriptHashDisplayFormat || (exports.CardanoNativeScriptHashDisplayFormat = {}));
|
|
28623
28595
|
|
|
28596
|
+
exports.CardanoTxOutputSerializationFormat = void 0;
|
|
28597
|
+
|
|
28598
|
+
(function (CardanoTxOutputSerializationFormat) {
|
|
28599
|
+
CardanoTxOutputSerializationFormat[CardanoTxOutputSerializationFormat["ARRAY_LEGACY"] = 0] = "ARRAY_LEGACY";
|
|
28600
|
+
CardanoTxOutputSerializationFormat[CardanoTxOutputSerializationFormat["MAP_BABBAGE"] = 1] = "MAP_BABBAGE";
|
|
28601
|
+
})(exports.CardanoTxOutputSerializationFormat || (exports.CardanoTxOutputSerializationFormat = {}));
|
|
28602
|
+
|
|
28624
28603
|
exports.CardanoCertificateType = void 0;
|
|
28625
28604
|
|
|
28626
28605
|
(function (CardanoCertificateType) {
|
|
@@ -28642,15 +28621,23 @@ exports.CardanoTxAuxiliaryDataSupplementType = void 0;
|
|
|
28642
28621
|
|
|
28643
28622
|
(function (CardanoTxAuxiliaryDataSupplementType) {
|
|
28644
28623
|
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["NONE"] = 0] = "NONE";
|
|
28645
|
-
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["
|
|
28624
|
+
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["GOVERNANCE_REGISTRATION_SIGNATURE"] = 1] = "GOVERNANCE_REGISTRATION_SIGNATURE";
|
|
28646
28625
|
})(exports.CardanoTxAuxiliaryDataSupplementType || (exports.CardanoTxAuxiliaryDataSupplementType = {}));
|
|
28647
28626
|
|
|
28627
|
+
exports.CardanoGovernanceRegistrationFormat = void 0;
|
|
28628
|
+
|
|
28629
|
+
(function (CardanoGovernanceRegistrationFormat) {
|
|
28630
|
+
CardanoGovernanceRegistrationFormat[CardanoGovernanceRegistrationFormat["CIP15"] = 0] = "CIP15";
|
|
28631
|
+
CardanoGovernanceRegistrationFormat[CardanoGovernanceRegistrationFormat["CIP36"] = 1] = "CIP36";
|
|
28632
|
+
})(exports.CardanoGovernanceRegistrationFormat || (exports.CardanoGovernanceRegistrationFormat = {}));
|
|
28633
|
+
|
|
28648
28634
|
exports.CardanoTxSigningMode = void 0;
|
|
28649
28635
|
|
|
28650
28636
|
(function (CardanoTxSigningMode) {
|
|
28651
28637
|
CardanoTxSigningMode[CardanoTxSigningMode["ORDINARY_TRANSACTION"] = 0] = "ORDINARY_TRANSACTION";
|
|
28652
28638
|
CardanoTxSigningMode[CardanoTxSigningMode["POOL_REGISTRATION_AS_OWNER"] = 1] = "POOL_REGISTRATION_AS_OWNER";
|
|
28653
28639
|
CardanoTxSigningMode[CardanoTxSigningMode["MULTISIG_TRANSACTION"] = 2] = "MULTISIG_TRANSACTION";
|
|
28640
|
+
CardanoTxSigningMode[CardanoTxSigningMode["PLUTUS_TRANSACTION"] = 3] = "PLUTUS_TRANSACTION";
|
|
28654
28641
|
})(exports.CardanoTxSigningMode || (exports.CardanoTxSigningMode = {}));
|
|
28655
28642
|
|
|
28656
28643
|
exports.CardanoTxWitnessType = void 0;
|
|
@@ -28949,6 +28936,10 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
28949
28936
|
return exports.CardanoNativeScriptHashDisplayFormat;
|
|
28950
28937
|
},
|
|
28951
28938
|
|
|
28939
|
+
get CardanoTxOutputSerializationFormat() {
|
|
28940
|
+
return exports.CardanoTxOutputSerializationFormat;
|
|
28941
|
+
},
|
|
28942
|
+
|
|
28952
28943
|
get CardanoCertificateType() {
|
|
28953
28944
|
return exports.CardanoCertificateType;
|
|
28954
28945
|
},
|
|
@@ -28961,6 +28952,10 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
28961
28952
|
return exports.CardanoTxAuxiliaryDataSupplementType;
|
|
28962
28953
|
},
|
|
28963
28954
|
|
|
28955
|
+
get CardanoGovernanceRegistrationFormat() {
|
|
28956
|
+
return exports.CardanoGovernanceRegistrationFormat;
|
|
28957
|
+
},
|
|
28958
|
+
|
|
28964
28959
|
get CardanoTxSigningMode() {
|
|
28965
28960
|
return exports.CardanoTxSigningMode;
|
|
28966
28961
|
},
|
|
@@ -73677,7 +73672,7 @@ module.exports = {"i8":"6.5.4"};
|
|
|
73677
73672
|
/***/ ((module) => {
|
|
73678
73673
|
|
|
73679
73674
|
"use strict";
|
|
73680
|
-
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.
|
|
73675
|
+
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.12","description":"> TODO: description","author":"OneKey","homepage":"https://github.com/OneKeyHQ/hardware-js-sdk#readme","license":"ISC","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OneKeyHQ/hardware-js-sdk.git"},"publishConfig":{"access":"public"},"scripts":{"dev":"rimraf dist && rollup -c ../../build/rollup.config.js -w","build":"rimraf dist && rollup -c ../../build/rollup.config.js","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/OneKeyHQ/hardware-js-sdk/issues"},"dependencies":{"@onekeyfe/hd-shared":"^0.2.12","@onekeyfe/hd-transport":"^0.2.12","axios":"^0.27.2","bignumber.js":"^9.0.2","jszip":"^3.10.1","parse-uri":"^1.0.7","semver":"^7.3.7"},"peerDependencies":{"@noble/hashes":"^1.1.3","ripple-keypairs":"^1.1.4"},"devDependencies":{"@noble/hashes":"^1.1.3","@types/parse-uri":"^1.0.0","@types/semver":"^7.3.9","ripple-keypairs":"^1.1.4"}}');
|
|
73681
73676
|
|
|
73682
73677
|
/***/ })
|
|
73683
73678
|
|
|
@@ -76216,7 +76211,7 @@ const src_init = async settings => {
|
|
|
76216
76211
|
|
|
76217
76212
|
try {
|
|
76218
76213
|
await init({ ..._settings,
|
|
76219
|
-
version: "0.2.
|
|
76214
|
+
version: "0.2.12"
|
|
76220
76215
|
});
|
|
76221
76216
|
return true;
|
|
76222
76217
|
} catch (e) {
|