@ocap/client 1.18.7 → 1.18.8
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/browser.d.ts +432 -277
- package/dist/extension.js +3 -3
- package/dist/extension.js.map +1 -1
- package/dist/report.html +1 -1
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -1
- package/docs/README.md +96 -64
- package/lib/extension.js +3 -3
- package/lib/extension.js.map +1 -1
- package/lib/node.d.ts +432 -277
- package/lib/types.js +32 -0
- package/lib/types.js.map +1 -1
- package/package.json +13 -12
package/docs/README.md
CHANGED
|
@@ -43,38 +43,38 @@ Please note that, due to internal implementation of google-protobuf, all `repeat
|
|
|
43
43
|
* [getSubscription()](#GraphQLClient+getSubscription) ⇒ `Array.<string>`
|
|
44
44
|
* [doRawQuery(query)](#GraphQLClient+doRawQuery) ⇒ `Promise`
|
|
45
45
|
* [doRawSubscription(query)](#GraphQLClient+doRawSubscription) ⇒ `Promise`
|
|
46
|
-
* [sendAccountMigrateTx(params)](#GraphQLClient+sendAccountMigrateTx) ⇒ `Promise.<string>`
|
|
47
|
-
* [sendAcquireAssetV2Tx(params)](#GraphQLClient+sendAcquireAssetV2Tx) ⇒ `Promise.<string>`
|
|
48
|
-
* [sendAcquireAssetV3Tx(params)](#GraphQLClient+sendAcquireAssetV3Tx) ⇒ `Promise.<string>`
|
|
49
|
-
* [sendClaimBlockRewardTx(params)](#GraphQLClient+sendClaimBlockRewardTx) ⇒ `Promise.<string>`
|
|
50
|
-
* [sendClaimStakeTx(params)](#GraphQLClient+sendClaimStakeTx) ⇒ `Promise.<string>`
|
|
51
|
-
* [sendCreateAssetTx(params)](#GraphQLClient+sendCreateAssetTx) ⇒ `Promise.<string>`
|
|
52
|
-
* [sendCreateFactoryTx(params)](#GraphQLClient+sendCreateFactoryTx) ⇒ `Promise.<string>`
|
|
53
|
-
* [sendCreateRollupBlockTx(params)](#GraphQLClient+sendCreateRollupBlockTx) ⇒ `Promise.<string>`
|
|
54
|
-
* [sendCreateRollupTx(params)](#GraphQLClient+sendCreateRollupTx) ⇒ `Promise.<string>`
|
|
55
|
-
* [sendCreateTokenTx(params)](#GraphQLClient+sendCreateTokenTx) ⇒ `Promise.<string>`
|
|
56
|
-
* [sendDeclareTx(params)](#GraphQLClient+sendDeclareTx) ⇒ `Promise.<string>`
|
|
57
|
-
* [sendDelegateTx(params)](#GraphQLClient+sendDelegateTx) ⇒ `Promise.<string>`
|
|
58
|
-
* [sendDepositTokenV2Tx(params)](#GraphQLClient+sendDepositTokenV2Tx) ⇒ `Promise.<string>`
|
|
59
|
-
* [sendExchangeTx(params)](#GraphQLClient+sendExchangeTx) ⇒ `Promise.<string>`
|
|
60
|
-
* [sendExchangeV2Tx(params)](#GraphQLClient+sendExchangeV2Tx) ⇒ `Promise.<string>`
|
|
61
|
-
* [sendJoinRollupTx(params)](#GraphQLClient+sendJoinRollupTx) ⇒ `Promise.<string>`
|
|
62
|
-
* [sendLeaveRollupTx(params)](#GraphQLClient+sendLeaveRollupTx) ⇒ `Promise.<string>`
|
|
63
|
-
* [sendMigrateRollupContractTx(params)](#GraphQLClient+sendMigrateRollupContractTx) ⇒ `Promise.<string>`
|
|
64
|
-
* [sendMigrateRollupTokenTx(params)](#GraphQLClient+sendMigrateRollupTokenTx) ⇒ `Promise.<string>`
|
|
65
|
-
* [sendMintAssetTx(params)](#GraphQLClient+sendMintAssetTx) ⇒ `Promise.<string>`
|
|
66
|
-
* [sendPauseRollupTx(params)](#GraphQLClient+sendPauseRollupTx) ⇒ `Promise.<string>`
|
|
67
|
-
* [sendResumeRollupTx(params)](#GraphQLClient+sendResumeRollupTx) ⇒ `Promise.<string>`
|
|
68
|
-
* [sendRevokeDelegateTx(params)](#GraphQLClient+sendRevokeDelegateTx) ⇒ `Promise.<string>`
|
|
69
|
-
* [sendRevokeStakeTx(params)](#GraphQLClient+sendRevokeStakeTx) ⇒ `Promise.<string>`
|
|
70
|
-
* [sendStakeTx(params)](#GraphQLClient+sendStakeTx) ⇒ `Promise.<string>`
|
|
71
|
-
* [sendTransferTx(params)](#GraphQLClient+sendTransferTx) ⇒ `Promise.<string>`
|
|
72
|
-
* [sendTransferV2Tx(params)](#GraphQLClient+sendTransferV2Tx) ⇒ `Promise.<string>`
|
|
73
|
-
* [sendTransferV3Tx(params)](#GraphQLClient+sendTransferV3Tx) ⇒ `Promise.<string>`
|
|
74
|
-
* [sendUpdateAssetTx(params)](#GraphQLClient+sendUpdateAssetTx) ⇒ `Promise.<string>`
|
|
75
|
-
* [sendUpdateRollupTx(params)](#GraphQLClient+sendUpdateRollupTx) ⇒ `Promise.<string>`
|
|
76
|
-
* [sendUpgradeNodeTx(params)](#GraphQLClient+sendUpgradeNodeTx) ⇒ `Promise.<string>`
|
|
77
|
-
* [sendWithdrawTokenV2Tx(params)](#GraphQLClient+sendWithdrawTokenV2Tx) ⇒ `Promise.<string>`
|
|
46
|
+
* [sendAccountMigrateTx(params, extra)](#GraphQLClient+sendAccountMigrateTx) ⇒ `Promise.<string>`
|
|
47
|
+
* [sendAcquireAssetV2Tx(params, extra)](#GraphQLClient+sendAcquireAssetV2Tx) ⇒ `Promise.<string>`
|
|
48
|
+
* [sendAcquireAssetV3Tx(params, extra)](#GraphQLClient+sendAcquireAssetV3Tx) ⇒ `Promise.<string>`
|
|
49
|
+
* [sendClaimBlockRewardTx(params, extra)](#GraphQLClient+sendClaimBlockRewardTx) ⇒ `Promise.<string>`
|
|
50
|
+
* [sendClaimStakeTx(params, extra)](#GraphQLClient+sendClaimStakeTx) ⇒ `Promise.<string>`
|
|
51
|
+
* [sendCreateAssetTx(params, extra)](#GraphQLClient+sendCreateAssetTx) ⇒ `Promise.<string>`
|
|
52
|
+
* [sendCreateFactoryTx(params, extra)](#GraphQLClient+sendCreateFactoryTx) ⇒ `Promise.<string>`
|
|
53
|
+
* [sendCreateRollupBlockTx(params, extra)](#GraphQLClient+sendCreateRollupBlockTx) ⇒ `Promise.<string>`
|
|
54
|
+
* [sendCreateRollupTx(params, extra)](#GraphQLClient+sendCreateRollupTx) ⇒ `Promise.<string>`
|
|
55
|
+
* [sendCreateTokenTx(params, extra)](#GraphQLClient+sendCreateTokenTx) ⇒ `Promise.<string>`
|
|
56
|
+
* [sendDeclareTx(params, extra)](#GraphQLClient+sendDeclareTx) ⇒ `Promise.<string>`
|
|
57
|
+
* [sendDelegateTx(params, extra)](#GraphQLClient+sendDelegateTx) ⇒ `Promise.<string>`
|
|
58
|
+
* [sendDepositTokenV2Tx(params, extra)](#GraphQLClient+sendDepositTokenV2Tx) ⇒ `Promise.<string>`
|
|
59
|
+
* [sendExchangeTx(params, extra)](#GraphQLClient+sendExchangeTx) ⇒ `Promise.<string>`
|
|
60
|
+
* [sendExchangeV2Tx(params, extra)](#GraphQLClient+sendExchangeV2Tx) ⇒ `Promise.<string>`
|
|
61
|
+
* [sendJoinRollupTx(params, extra)](#GraphQLClient+sendJoinRollupTx) ⇒ `Promise.<string>`
|
|
62
|
+
* [sendLeaveRollupTx(params, extra)](#GraphQLClient+sendLeaveRollupTx) ⇒ `Promise.<string>`
|
|
63
|
+
* [sendMigrateRollupContractTx(params, extra)](#GraphQLClient+sendMigrateRollupContractTx) ⇒ `Promise.<string>`
|
|
64
|
+
* [sendMigrateRollupTokenTx(params, extra)](#GraphQLClient+sendMigrateRollupTokenTx) ⇒ `Promise.<string>`
|
|
65
|
+
* [sendMintAssetTx(params, extra)](#GraphQLClient+sendMintAssetTx) ⇒ `Promise.<string>`
|
|
66
|
+
* [sendPauseRollupTx(params, extra)](#GraphQLClient+sendPauseRollupTx) ⇒ `Promise.<string>`
|
|
67
|
+
* [sendResumeRollupTx(params, extra)](#GraphQLClient+sendResumeRollupTx) ⇒ `Promise.<string>`
|
|
68
|
+
* [sendRevokeDelegateTx(params, extra)](#GraphQLClient+sendRevokeDelegateTx) ⇒ `Promise.<string>`
|
|
69
|
+
* [sendRevokeStakeTx(params, extra)](#GraphQLClient+sendRevokeStakeTx) ⇒ `Promise.<string>`
|
|
70
|
+
* [sendStakeTx(params, extra)](#GraphQLClient+sendStakeTx) ⇒ `Promise.<string>`
|
|
71
|
+
* [sendTransferTx(params, extra)](#GraphQLClient+sendTransferTx) ⇒ `Promise.<string>`
|
|
72
|
+
* [sendTransferV2Tx(params, extra)](#GraphQLClient+sendTransferV2Tx) ⇒ `Promise.<string>`
|
|
73
|
+
* [sendTransferV3Tx(params, extra)](#GraphQLClient+sendTransferV3Tx) ⇒ `Promise.<string>`
|
|
74
|
+
* [sendUpdateAssetTx(params, extra)](#GraphQLClient+sendUpdateAssetTx) ⇒ `Promise.<string>`
|
|
75
|
+
* [sendUpdateRollupTx(params, extra)](#GraphQLClient+sendUpdateRollupTx) ⇒ `Promise.<string>`
|
|
76
|
+
* [sendUpgradeNodeTx(params, extra)](#GraphQLClient+sendUpgradeNodeTx) ⇒ `Promise.<string>`
|
|
77
|
+
* [sendWithdrawTokenV2Tx(params, extra)](#GraphQLClient+sendWithdrawTokenV2Tx) ⇒ `Promise.<string>`
|
|
78
78
|
* [encodeAccountMigrateTx(params)](#GraphQLClient+encodeAccountMigrateTx) ⇒ [`Promise.<TxEncodeOutput>`](#GraphQLClient.TxEncodeOutput)
|
|
79
79
|
* [encodeAcquireAssetV2Tx(params)](#GraphQLClient+encodeAcquireAssetV2Tx) ⇒ [`Promise.<TxEncodeOutput>`](#GraphQLClient.TxEncodeOutput)
|
|
80
80
|
* [encodeAcquireAssetV3Tx(params)](#GraphQLClient+encodeAcquireAssetV3Tx) ⇒ [`Promise.<TxEncodeOutput>`](#GraphQLClient.TxEncodeOutput)
|
|
@@ -809,7 +809,7 @@ Send raw graphql subscription to forge graphql endpoint
|
|
|
809
809
|
| ----- | -------- | -------------------- |
|
|
810
810
|
| query | `string` | graphql query string |
|
|
811
811
|
|
|
812
|
-
### graphQLClient.sendAccountMigrateTx(params) ⇒ `Promise.<string>`
|
|
812
|
+
### graphQLClient.sendAccountMigrateTx(params, extra) ⇒ `Promise.<string>`
|
|
813
813
|
|
|
814
814
|
Send AccountMigrateTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
815
815
|
|
|
@@ -819,8 +819,9 @@ Send AccountMigrateTx transaction and get the hash, use [getTx](#GraphQLClient+g
|
|
|
819
819
|
| Param | Type |
|
|
820
820
|
| ------ | --------------------------------------------------------------- |
|
|
821
821
|
| params | [`AccountMigrateTxInput`](#GraphQLClient.AccountMigrateTxInput) |
|
|
822
|
+
| extra | `object` |
|
|
822
823
|
|
|
823
|
-
### graphQLClient.sendAcquireAssetV2Tx(params) ⇒ `Promise.<string>`
|
|
824
|
+
### graphQLClient.sendAcquireAssetV2Tx(params, extra) ⇒ `Promise.<string>`
|
|
824
825
|
|
|
825
826
|
Send AcquireAssetV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
826
827
|
|
|
@@ -830,8 +831,9 @@ Send AcquireAssetV2Tx transaction and get the hash, use [getTx](#GraphQLClient+g
|
|
|
830
831
|
| Param | Type |
|
|
831
832
|
| ------ | --------------------------------------------------------------- |
|
|
832
833
|
| params | [`AcquireAssetV2TxInput`](#GraphQLClient.AcquireAssetV2TxInput) |
|
|
834
|
+
| extra | `object` |
|
|
833
835
|
|
|
834
|
-
### graphQLClient.sendAcquireAssetV3Tx(params) ⇒ `Promise.<string>`
|
|
836
|
+
### graphQLClient.sendAcquireAssetV3Tx(params, extra) ⇒ `Promise.<string>`
|
|
835
837
|
|
|
836
838
|
Send AcquireAssetV3Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
837
839
|
|
|
@@ -841,8 +843,9 @@ Send AcquireAssetV3Tx transaction and get the hash, use [getTx](#GraphQLClient+g
|
|
|
841
843
|
| Param | Type |
|
|
842
844
|
| ------ | --------------------------------------------------------------- |
|
|
843
845
|
| params | [`AcquireAssetV3TxInput`](#GraphQLClient.AcquireAssetV3TxInput) |
|
|
846
|
+
| extra | `object` |
|
|
844
847
|
|
|
845
|
-
### graphQLClient.sendClaimBlockRewardTx(params) ⇒ `Promise.<string>`
|
|
848
|
+
### graphQLClient.sendClaimBlockRewardTx(params, extra) ⇒ `Promise.<string>`
|
|
846
849
|
|
|
847
850
|
Send ClaimBlockRewardTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
848
851
|
|
|
@@ -852,8 +855,9 @@ Send ClaimBlockRewardTx transaction and get the hash, use [getTx](#GraphQLClient
|
|
|
852
855
|
| Param | Type |
|
|
853
856
|
| ------ | ------------------------------------------------------------------- |
|
|
854
857
|
| params | [`ClaimBlockRewardTxInput`](#GraphQLClient.ClaimBlockRewardTxInput) |
|
|
858
|
+
| extra | `object` |
|
|
855
859
|
|
|
856
|
-
### graphQLClient.sendClaimStakeTx(params) ⇒ `Promise.<string>`
|
|
860
|
+
### graphQLClient.sendClaimStakeTx(params, extra) ⇒ `Promise.<string>`
|
|
857
861
|
|
|
858
862
|
Send ClaimStakeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
859
863
|
|
|
@@ -863,8 +867,9 @@ Send ClaimStakeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx
|
|
|
863
867
|
| Param | Type |
|
|
864
868
|
| ------ | ------------------------------------------------------- |
|
|
865
869
|
| params | [`ClaimStakeTxInput`](#GraphQLClient.ClaimStakeTxInput) |
|
|
870
|
+
| extra | `object` |
|
|
866
871
|
|
|
867
|
-
### graphQLClient.sendCreateAssetTx(params) ⇒ `Promise.<string>`
|
|
872
|
+
### graphQLClient.sendCreateAssetTx(params, extra) ⇒ `Promise.<string>`
|
|
868
873
|
|
|
869
874
|
Send CreateAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
870
875
|
|
|
@@ -874,8 +879,9 @@ Send CreateAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
874
879
|
| Param | Type |
|
|
875
880
|
| ------ | --------------------------------------------------------- |
|
|
876
881
|
| params | [`CreateAssetTxInput`](#GraphQLClient.CreateAssetTxInput) |
|
|
882
|
+
| extra | `object` |
|
|
877
883
|
|
|
878
|
-
### graphQLClient.sendCreateFactoryTx(params) ⇒ `Promise.<string>`
|
|
884
|
+
### graphQLClient.sendCreateFactoryTx(params, extra) ⇒ `Promise.<string>`
|
|
879
885
|
|
|
880
886
|
Send CreateFactoryTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
881
887
|
|
|
@@ -885,8 +891,9 @@ Send CreateFactoryTx transaction and get the hash, use [getTx](#GraphQLClient+ge
|
|
|
885
891
|
| Param | Type |
|
|
886
892
|
| ------ | ------------------------------------------------------------- |
|
|
887
893
|
| params | [`CreateFactoryTxInput`](#GraphQLClient.CreateFactoryTxInput) |
|
|
894
|
+
| extra | `object` |
|
|
888
895
|
|
|
889
|
-
### graphQLClient.sendCreateRollupBlockTx(params) ⇒ `Promise.<string>`
|
|
896
|
+
### graphQLClient.sendCreateRollupBlockTx(params, extra) ⇒ `Promise.<string>`
|
|
890
897
|
|
|
891
898
|
Send CreateRollupBlockTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
892
899
|
|
|
@@ -896,8 +903,9 @@ Send CreateRollupBlockTx transaction and get the hash, use [getTx](#GraphQLClien
|
|
|
896
903
|
| Param | Type |
|
|
897
904
|
| ------ | --------------------------------------------------------------------- |
|
|
898
905
|
| params | [`CreateRollupBlockTxInput`](#GraphQLClient.CreateRollupBlockTxInput) |
|
|
906
|
+
| extra | `object` |
|
|
899
907
|
|
|
900
|
-
### graphQLClient.sendCreateRollupTx(params) ⇒ `Promise.<string>`
|
|
908
|
+
### graphQLClient.sendCreateRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
901
909
|
|
|
902
910
|
Send CreateRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
903
911
|
|
|
@@ -907,8 +915,9 @@ Send CreateRollupTx transaction and get the hash, use [getTx](#GraphQLClient+get
|
|
|
907
915
|
| Param | Type |
|
|
908
916
|
| ------ | ----------------------------------------------------------- |
|
|
909
917
|
| params | [`CreateRollupTxInput`](#GraphQLClient.CreateRollupTxInput) |
|
|
918
|
+
| extra | `object` |
|
|
910
919
|
|
|
911
|
-
### graphQLClient.sendCreateTokenTx(params) ⇒ `Promise.<string>`
|
|
920
|
+
### graphQLClient.sendCreateTokenTx(params, extra) ⇒ `Promise.<string>`
|
|
912
921
|
|
|
913
922
|
Send CreateTokenTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
914
923
|
|
|
@@ -918,8 +927,9 @@ Send CreateTokenTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
918
927
|
| Param | Type |
|
|
919
928
|
| ------ | --------------------------------------------------------- |
|
|
920
929
|
| params | [`CreateTokenTxInput`](#GraphQLClient.CreateTokenTxInput) |
|
|
930
|
+
| extra | `object` |
|
|
921
931
|
|
|
922
|
-
### graphQLClient.sendDeclareTx(params) ⇒ `Promise.<string>`
|
|
932
|
+
### graphQLClient.sendDeclareTx(params, extra) ⇒ `Promise.<string>`
|
|
923
933
|
|
|
924
934
|
Send DeclareTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
925
935
|
|
|
@@ -929,8 +939,9 @@ Send DeclareTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) t
|
|
|
929
939
|
| Param | Type |
|
|
930
940
|
| ------ | ------------------------------------------------- |
|
|
931
941
|
| params | [`DeclareTxInput`](#GraphQLClient.DeclareTxInput) |
|
|
942
|
+
| extra | `object` |
|
|
932
943
|
|
|
933
|
-
### graphQLClient.sendDelegateTx(params) ⇒ `Promise.<string>`
|
|
944
|
+
### graphQLClient.sendDelegateTx(params, extra) ⇒ `Promise.<string>`
|
|
934
945
|
|
|
935
946
|
Send DelegateTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
936
947
|
|
|
@@ -940,8 +951,9 @@ Send DelegateTx transaction and get the hash, use [getTx](#GraphQLClient+getTx)
|
|
|
940
951
|
| Param | Type |
|
|
941
952
|
| ------ | --------------------------------------------------- |
|
|
942
953
|
| params | [`DelegateTxInput`](#GraphQLClient.DelegateTxInput) |
|
|
954
|
+
| extra | `object` |
|
|
943
955
|
|
|
944
|
-
### graphQLClient.sendDepositTokenV2Tx(params) ⇒ `Promise.<string>`
|
|
956
|
+
### graphQLClient.sendDepositTokenV2Tx(params, extra) ⇒ `Promise.<string>`
|
|
945
957
|
|
|
946
958
|
Send DepositTokenV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
947
959
|
|
|
@@ -951,8 +963,9 @@ Send DepositTokenV2Tx transaction and get the hash, use [getTx](#GraphQLClient+g
|
|
|
951
963
|
| Param | Type |
|
|
952
964
|
| ------ | --------------------------------------------------------------- |
|
|
953
965
|
| params | [`DepositTokenV2TxInput`](#GraphQLClient.DepositTokenV2TxInput) |
|
|
966
|
+
| extra | `object` |
|
|
954
967
|
|
|
955
|
-
### graphQLClient.sendExchangeTx(params) ⇒ `Promise.<string>`
|
|
968
|
+
### graphQLClient.sendExchangeTx(params, extra) ⇒ `Promise.<string>`
|
|
956
969
|
|
|
957
970
|
Send ExchangeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
958
971
|
|
|
@@ -962,8 +975,9 @@ Send ExchangeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx)
|
|
|
962
975
|
| Param | Type |
|
|
963
976
|
| ------ | --------------------------------------------------- |
|
|
964
977
|
| params | [`ExchangeTxInput`](#GraphQLClient.ExchangeTxInput) |
|
|
978
|
+
| extra | `object` |
|
|
965
979
|
|
|
966
|
-
### graphQLClient.sendExchangeV2Tx(params) ⇒ `Promise.<string>`
|
|
980
|
+
### graphQLClient.sendExchangeV2Tx(params, extra) ⇒ `Promise.<string>`
|
|
967
981
|
|
|
968
982
|
Send ExchangeV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
969
983
|
|
|
@@ -973,8 +987,9 @@ Send ExchangeV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx
|
|
|
973
987
|
| Param | Type |
|
|
974
988
|
| ------ | ------------------------------------------------------- |
|
|
975
989
|
| params | [`ExchangeV2TxInput`](#GraphQLClient.ExchangeV2TxInput) |
|
|
990
|
+
| extra | `object` |
|
|
976
991
|
|
|
977
|
-
### graphQLClient.sendJoinRollupTx(params) ⇒ `Promise.<string>`
|
|
992
|
+
### graphQLClient.sendJoinRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
978
993
|
|
|
979
994
|
Send JoinRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
980
995
|
|
|
@@ -984,8 +999,9 @@ Send JoinRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx
|
|
|
984
999
|
| Param | Type |
|
|
985
1000
|
| ------ | ------------------------------------------------------- |
|
|
986
1001
|
| params | [`JoinRollupTxInput`](#GraphQLClient.JoinRollupTxInput) |
|
|
1002
|
+
| extra | `object` |
|
|
987
1003
|
|
|
988
|
-
### graphQLClient.sendLeaveRollupTx(params) ⇒ `Promise.<string>`
|
|
1004
|
+
### graphQLClient.sendLeaveRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
989
1005
|
|
|
990
1006
|
Send LeaveRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
991
1007
|
|
|
@@ -995,8 +1011,9 @@ Send LeaveRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
995
1011
|
| Param | Type |
|
|
996
1012
|
| ------ | --------------------------------------------------------- |
|
|
997
1013
|
| params | [`LeaveRollupTxInput`](#GraphQLClient.LeaveRollupTxInput) |
|
|
1014
|
+
| extra | `object` |
|
|
998
1015
|
|
|
999
|
-
### graphQLClient.sendMigrateRollupContractTx(params) ⇒ `Promise.<string>`
|
|
1016
|
+
### graphQLClient.sendMigrateRollupContractTx(params, extra) ⇒ `Promise.<string>`
|
|
1000
1017
|
|
|
1001
1018
|
Send MigrateRollupContractTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1002
1019
|
|
|
@@ -1006,8 +1023,9 @@ Send MigrateRollupContractTx transaction and get the hash, use [getTx](#GraphQLC
|
|
|
1006
1023
|
| Param | Type |
|
|
1007
1024
|
| ------ | ----------------------------------------------------------------------------- |
|
|
1008
1025
|
| params | [`MigrateRollupContractTxInput`](#GraphQLClient.MigrateRollupContractTxInput) |
|
|
1026
|
+
| extra | `object` |
|
|
1009
1027
|
|
|
1010
|
-
### graphQLClient.sendMigrateRollupTokenTx(params) ⇒ `Promise.<string>`
|
|
1028
|
+
### graphQLClient.sendMigrateRollupTokenTx(params, extra) ⇒ `Promise.<string>`
|
|
1011
1029
|
|
|
1012
1030
|
Send MigrateRollupTokenTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1013
1031
|
|
|
@@ -1017,8 +1035,9 @@ Send MigrateRollupTokenTx transaction and get the hash, use [getTx](#GraphQLClie
|
|
|
1017
1035
|
| Param | Type |
|
|
1018
1036
|
| ------ | ----------------------------------------------------------------------- |
|
|
1019
1037
|
| params | [`MigrateRollupTokenTxInput`](#GraphQLClient.MigrateRollupTokenTxInput) |
|
|
1038
|
+
| extra | `object` |
|
|
1020
1039
|
|
|
1021
|
-
### graphQLClient.sendMintAssetTx(params) ⇒ `Promise.<string>`
|
|
1040
|
+
### graphQLClient.sendMintAssetTx(params, extra) ⇒ `Promise.<string>`
|
|
1022
1041
|
|
|
1023
1042
|
Send MintAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1024
1043
|
|
|
@@ -1028,8 +1047,9 @@ Send MintAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getTx)
|
|
|
1028
1047
|
| Param | Type |
|
|
1029
1048
|
| ------ | ----------------------------------------------------- |
|
|
1030
1049
|
| params | [`MintAssetTxInput`](#GraphQLClient.MintAssetTxInput) |
|
|
1050
|
+
| extra | `object` |
|
|
1031
1051
|
|
|
1032
|
-
### graphQLClient.sendPauseRollupTx(params) ⇒ `Promise.<string>`
|
|
1052
|
+
### graphQLClient.sendPauseRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
1033
1053
|
|
|
1034
1054
|
Send PauseRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1035
1055
|
|
|
@@ -1039,8 +1059,9 @@ Send PauseRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
1039
1059
|
| Param | Type |
|
|
1040
1060
|
| ------ | --------------------------------------------------------- |
|
|
1041
1061
|
| params | [`PauseRollupTxInput`](#GraphQLClient.PauseRollupTxInput) |
|
|
1062
|
+
| extra | `object` |
|
|
1042
1063
|
|
|
1043
|
-
### graphQLClient.sendResumeRollupTx(params) ⇒ `Promise.<string>`
|
|
1064
|
+
### graphQLClient.sendResumeRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
1044
1065
|
|
|
1045
1066
|
Send ResumeRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1046
1067
|
|
|
@@ -1050,8 +1071,9 @@ Send ResumeRollupTx transaction and get the hash, use [getTx](#GraphQLClient+get
|
|
|
1050
1071
|
| Param | Type |
|
|
1051
1072
|
| ------ | ----------------------------------------------------------- |
|
|
1052
1073
|
| params | [`ResumeRollupTxInput`](#GraphQLClient.ResumeRollupTxInput) |
|
|
1074
|
+
| extra | `object` |
|
|
1053
1075
|
|
|
1054
|
-
### graphQLClient.sendRevokeDelegateTx(params) ⇒ `Promise.<string>`
|
|
1076
|
+
### graphQLClient.sendRevokeDelegateTx(params, extra) ⇒ `Promise.<string>`
|
|
1055
1077
|
|
|
1056
1078
|
Send RevokeDelegateTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1057
1079
|
|
|
@@ -1061,8 +1083,9 @@ Send RevokeDelegateTx transaction and get the hash, use [getTx](#GraphQLClient+g
|
|
|
1061
1083
|
| Param | Type |
|
|
1062
1084
|
| ------ | --------------------------------------------------------------- |
|
|
1063
1085
|
| params | [`RevokeDelegateTxInput`](#GraphQLClient.RevokeDelegateTxInput) |
|
|
1086
|
+
| extra | `object` |
|
|
1064
1087
|
|
|
1065
|
-
### graphQLClient.sendRevokeStakeTx(params) ⇒ `Promise.<string>`
|
|
1088
|
+
### graphQLClient.sendRevokeStakeTx(params, extra) ⇒ `Promise.<string>`
|
|
1066
1089
|
|
|
1067
1090
|
Send RevokeStakeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1068
1091
|
|
|
@@ -1072,8 +1095,9 @@ Send RevokeStakeTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
1072
1095
|
| Param | Type |
|
|
1073
1096
|
| ------ | --------------------------------------------------------- |
|
|
1074
1097
|
| params | [`RevokeStakeTxInput`](#GraphQLClient.RevokeStakeTxInput) |
|
|
1098
|
+
| extra | `object` |
|
|
1075
1099
|
|
|
1076
|
-
### graphQLClient.sendStakeTx(params) ⇒ `Promise.<string>`
|
|
1100
|
+
### graphQLClient.sendStakeTx(params, extra) ⇒ `Promise.<string>`
|
|
1077
1101
|
|
|
1078
1102
|
Send StakeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1079
1103
|
|
|
@@ -1083,8 +1107,9 @@ Send StakeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to
|
|
|
1083
1107
|
| Param | Type |
|
|
1084
1108
|
| ------ | --------------------------------------------- |
|
|
1085
1109
|
| params | [`StakeTxInput`](#GraphQLClient.StakeTxInput) |
|
|
1110
|
+
| extra | `object` |
|
|
1086
1111
|
|
|
1087
|
-
### graphQLClient.sendTransferTx(params) ⇒ `Promise.<string>`
|
|
1112
|
+
### graphQLClient.sendTransferTx(params, extra) ⇒ `Promise.<string>`
|
|
1088
1113
|
|
|
1089
1114
|
Send TransferTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1090
1115
|
|
|
@@ -1094,8 +1119,9 @@ Send TransferTx transaction and get the hash, use [getTx](#GraphQLClient+getTx)
|
|
|
1094
1119
|
| Param | Type |
|
|
1095
1120
|
| ------ | --------------------------------------------------- |
|
|
1096
1121
|
| params | [`TransferTxInput`](#GraphQLClient.TransferTxInput) |
|
|
1122
|
+
| extra | `object` |
|
|
1097
1123
|
|
|
1098
|
-
### graphQLClient.sendTransferV2Tx(params) ⇒ `Promise.<string>`
|
|
1124
|
+
### graphQLClient.sendTransferV2Tx(params, extra) ⇒ `Promise.<string>`
|
|
1099
1125
|
|
|
1100
1126
|
Send TransferV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1101
1127
|
|
|
@@ -1105,8 +1131,9 @@ Send TransferV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx
|
|
|
1105
1131
|
| Param | Type |
|
|
1106
1132
|
| ------ | ------------------------------------------------------- |
|
|
1107
1133
|
| params | [`TransferV2TxInput`](#GraphQLClient.TransferV2TxInput) |
|
|
1134
|
+
| extra | `object` |
|
|
1108
1135
|
|
|
1109
|
-
### graphQLClient.sendTransferV3Tx(params) ⇒ `Promise.<string>`
|
|
1136
|
+
### graphQLClient.sendTransferV3Tx(params, extra) ⇒ `Promise.<string>`
|
|
1110
1137
|
|
|
1111
1138
|
Send TransferV3Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1112
1139
|
|
|
@@ -1116,8 +1143,9 @@ Send TransferV3Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx
|
|
|
1116
1143
|
| Param | Type |
|
|
1117
1144
|
| ------ | ------------------------------------------------------- |
|
|
1118
1145
|
| params | [`TransferV3TxInput`](#GraphQLClient.TransferV3TxInput) |
|
|
1146
|
+
| extra | `object` |
|
|
1119
1147
|
|
|
1120
|
-
### graphQLClient.sendUpdateAssetTx(params) ⇒ `Promise.<string>`
|
|
1148
|
+
### graphQLClient.sendUpdateAssetTx(params, extra) ⇒ `Promise.<string>`
|
|
1121
1149
|
|
|
1122
1150
|
Send UpdateAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1123
1151
|
|
|
@@ -1127,8 +1155,9 @@ Send UpdateAssetTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
1127
1155
|
| Param | Type |
|
|
1128
1156
|
| ------ | --------------------------------------------------------- |
|
|
1129
1157
|
| params | [`UpdateAssetTxInput`](#GraphQLClient.UpdateAssetTxInput) |
|
|
1158
|
+
| extra | `object` |
|
|
1130
1159
|
|
|
1131
|
-
### graphQLClient.sendUpdateRollupTx(params) ⇒ `Promise.<string>`
|
|
1160
|
+
### graphQLClient.sendUpdateRollupTx(params, extra) ⇒ `Promise.<string>`
|
|
1132
1161
|
|
|
1133
1162
|
Send UpdateRollupTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1134
1163
|
|
|
@@ -1138,8 +1167,9 @@ Send UpdateRollupTx transaction and get the hash, use [getTx](#GraphQLClient+get
|
|
|
1138
1167
|
| Param | Type |
|
|
1139
1168
|
| ------ | ----------------------------------------------------------- |
|
|
1140
1169
|
| params | [`UpdateRollupTxInput`](#GraphQLClient.UpdateRollupTxInput) |
|
|
1170
|
+
| extra | `object` |
|
|
1141
1171
|
|
|
1142
|
-
### graphQLClient.sendUpgradeNodeTx(params) ⇒ `Promise.<string>`
|
|
1172
|
+
### graphQLClient.sendUpgradeNodeTx(params, extra) ⇒ `Promise.<string>`
|
|
1143
1173
|
|
|
1144
1174
|
Send UpgradeNodeTx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1145
1175
|
|
|
@@ -1149,8 +1179,9 @@ Send UpgradeNodeTx transaction and get the hash, use [getTx](#GraphQLClient+getT
|
|
|
1149
1179
|
| Param | Type |
|
|
1150
1180
|
| ------ | --------------------------------------------------------- |
|
|
1151
1181
|
| params | [`UpgradeNodeTxInput`](#GraphQLClient.UpgradeNodeTxInput) |
|
|
1182
|
+
| extra | `object` |
|
|
1152
1183
|
|
|
1153
|
-
### graphQLClient.sendWithdrawTokenV2Tx(params) ⇒ `Promise.<string>`
|
|
1184
|
+
### graphQLClient.sendWithdrawTokenV2Tx(params, extra) ⇒ `Promise.<string>`
|
|
1154
1185
|
|
|
1155
1186
|
Send WithdrawTokenV2Tx transaction and get the hash, use [getTx](#GraphQLClient+getTx) to get transaction detail
|
|
1156
1187
|
|
|
@@ -1160,6 +1191,7 @@ Send WithdrawTokenV2Tx transaction and get the hash, use [getTx](#GraphQLClient+
|
|
|
1160
1191
|
| Param | Type |
|
|
1161
1192
|
| ------ | ----------------------------------------------------------------- |
|
|
1162
1193
|
| params | [`WithdrawTokenV2TxInput`](#GraphQLClient.WithdrawTokenV2TxInput) |
|
|
1194
|
+
| extra | `object` |
|
|
1163
1195
|
|
|
1164
1196
|
### graphQLClient.encodeAccountMigrateTx(params) ⇒ [`Promise.<TxEncodeOutput>`](#GraphQLClient.TxEncodeOutput)
|
|
1165
1197
|
|
package/lib/extension.js
CHANGED
|
@@ -350,7 +350,7 @@ const createExtensionMethods = (client, { encodeTxAsBase64 = false } = {}) => {
|
|
|
350
350
|
* @param {object} input.delegator - the wallet address that delegated permissions to the `input.wallet` address
|
|
351
351
|
* @returns {Promise<string>}
|
|
352
352
|
*/
|
|
353
|
-
const txSendFn = async ({ tx, wallet, signature, delegator, commit = false }) => {
|
|
353
|
+
const txSendFn = async ({ tx, wallet, signature, delegator, commit = false }, extra = {}) => {
|
|
354
354
|
let encoded;
|
|
355
355
|
if (signature) {
|
|
356
356
|
encoded = tx;
|
|
@@ -372,12 +372,12 @@ const createExtensionMethods = (client, { encodeTxAsBase64 = false } = {}) => {
|
|
|
372
372
|
const txBytes = txObj.serializeBinary();
|
|
373
373
|
const txStr = toBase64(txBytes);
|
|
374
374
|
debug(`sendTx.${x}.txObj`, txObj.toObject());
|
|
375
|
-
const { hash } = await client.sendTx({ tx: txStr, commit });
|
|
375
|
+
const { hash } = await client.sendTx({ tx: txStr, commit }, extra);
|
|
376
376
|
resolve(hash);
|
|
377
377
|
} else {
|
|
378
378
|
const txObj = createMessage('Transaction', encoded).toObject();
|
|
379
379
|
debug(`sendTx.${x}.txObj`, txObj);
|
|
380
|
-
const { hash } = await client.sendTx({ tx: txObj, commit });
|
|
380
|
+
const { hash } = await client.sendTx({ tx: txObj, commit }, extra);
|
|
381
381
|
resolve(hash);
|
|
382
382
|
}
|
|
383
383
|
} catch (err) {
|