@proton/wrap-constants 0.0.32 → 0.0.33
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/parsers/actions.d.ts +617 -0
- package/dist/parsers/address.d.ts +483 -0
- package/dist/parsers/auth.d.ts +926 -0
- package/dist/parsers/base.d.ts +32 -0
- package/dist/parsers/currency.d.ts +101 -0
- package/dist/parsers/deposit.d.ts +49 -0
- package/dist/parsers/index.d.ts +10 -0
- package/dist/parsers/otc.d.ts +39 -0
- package/dist/parsers/withdraw.d.ts +511 -0
- package/dist/parsers/withdrawalHistory.d.ts +70 -0
- package/dist/parsers/wrap.d.ts +85 -0
- package/dist/wrap-constants.cjs.development.js +169 -194
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +170 -199
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/actions.ts +61 -0
- package/src/parsers/address.ts +27 -0
- package/src/parsers/auth.ts +23 -0
- package/src/parsers/base.ts +18 -0
- package/src/parsers/currency.ts +31 -0
- package/src/parsers/deposit.ts +30 -0
- package/src/parsers/index.ts +10 -0
- package/src/parsers/otc.ts +23 -0
- package/src/parsers/withdraw.ts +39 -0
- package/src/parsers/withdrawalHistory.ts +23 -0
- package/src/parsers/wrap.ts +41 -0
- package/dist/parsers.d.ts +0 -1881
- package/src/parsers.ts +0 -334
|
@@ -695,6 +695,75 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
695
695
|
};
|
|
696
696
|
};
|
|
697
697
|
|
|
698
|
+
var accountParser = /*#__PURE__*/z.string().regex(/^[.1-5a-z]{0,12}[.1-5a-j]?$/);
|
|
699
|
+
var authorizationParser = /*#__PURE__*/z.object({
|
|
700
|
+
actor: accountParser,
|
|
701
|
+
permission: /*#__PURE__*/z.string()
|
|
702
|
+
});
|
|
703
|
+
var authorizationsParser = /*#__PURE__*/z.array(authorizationParser).min(1);
|
|
704
|
+
var ExtendedAssetParser = /*#__PURE__*/z.object({
|
|
705
|
+
quantity: /*#__PURE__*/z.string(),
|
|
706
|
+
contract: accountParser
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
var rawTransactionParser = /*#__PURE__*/z.object({
|
|
710
|
+
expiration: /*#__PURE__*/z.string(),
|
|
711
|
+
ref_block_num: /*#__PURE__*/z.number(),
|
|
712
|
+
ref_block_prefix: /*#__PURE__*/z.number(),
|
|
713
|
+
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
714
|
+
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
715
|
+
delay_sec: /*#__PURE__*/z.number(),
|
|
716
|
+
context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
|
|
717
|
+
transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
|
|
718
|
+
});
|
|
719
|
+
var baseActionParser = function baseActionParser(contract, action, data, isSerialized) {
|
|
720
|
+
if (isSerialized === void 0) {
|
|
721
|
+
isSerialized = false;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
return z.object({
|
|
725
|
+
account: contract === '*' ? accountParser : z.literal(contract),
|
|
726
|
+
name: z.literal(action),
|
|
727
|
+
data: isSerialized ? z.string().or(z.object(data)) : z.object(data),
|
|
728
|
+
authorization: authorizationsParser
|
|
729
|
+
});
|
|
730
|
+
};
|
|
731
|
+
var webauthActionParser = function webauthActionParser(contract, action, data) {
|
|
732
|
+
return z.object({
|
|
733
|
+
account: z.literal('webauthn'),
|
|
734
|
+
name: z.literal('exec'),
|
|
735
|
+
data: z.object({
|
|
736
|
+
account: accountParser,
|
|
737
|
+
key: z.object({
|
|
738
|
+
key: z.array(z.string().or(z.object({
|
|
739
|
+
modulus: z.string(),
|
|
740
|
+
exponent: z.string()
|
|
741
|
+
}))),
|
|
742
|
+
user_presence: z.number(),
|
|
743
|
+
rpid: z.string()
|
|
744
|
+
}),
|
|
745
|
+
nonce: z.number(),
|
|
746
|
+
permissions: authorizationsParser,
|
|
747
|
+
signature: z.object({
|
|
748
|
+
auth_data: z.string(),
|
|
749
|
+
client_json: z.string(),
|
|
750
|
+
signature: z.string()
|
|
751
|
+
}),
|
|
752
|
+
trx: rawTransactionParser.merge(z.object({
|
|
753
|
+
actions: z.array(baseActionParser(contract, action, data, true)).length(1)
|
|
754
|
+
}))
|
|
755
|
+
}),
|
|
756
|
+
authorization: authorizationsParser
|
|
757
|
+
});
|
|
758
|
+
};
|
|
759
|
+
var singleActionTransactionParser = function singleActionTransactionParser(contract, action, data) {
|
|
760
|
+
var baseAction = baseActionParser(contract, action, data);
|
|
761
|
+
var webauthAction = webauthActionParser(contract, action, data);
|
|
762
|
+
return rawTransactionParser.merge(z.object({
|
|
763
|
+
actions: z.array(baseAction.or(webauthAction)).length(1)
|
|
764
|
+
}));
|
|
765
|
+
};
|
|
766
|
+
|
|
698
767
|
function _extends() {
|
|
699
768
|
_extends = Object.assign || function (target) {
|
|
700
769
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -808,83 +877,25 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
808
877
|
return constants;
|
|
809
878
|
};
|
|
810
879
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
})
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}
|
|
880
|
+
var createAbstractAuthParser = function createAbstractAuthParser(contract, action, data) {
|
|
881
|
+
return z.object({
|
|
882
|
+
signer: authorizationParser,
|
|
883
|
+
signatures: z.array(z.string()).length(1),
|
|
884
|
+
transaction: singleActionTransactionParser(contract, action, data)
|
|
885
|
+
});
|
|
886
|
+
};
|
|
887
|
+
var generateAuthData = {
|
|
888
|
+
time: /*#__PURE__*/z.string(),
|
|
889
|
+
protonAccount: /*#__PURE__*/z.string()
|
|
890
|
+
};
|
|
891
|
+
var generateAuthParser = /*#__PURE__*/createAbstractAuthParser(WRAP_CONTRACT, WRAP_AUTH_ACTION, generateAuthData);
|
|
822
892
|
|
|
823
|
-
var
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
var rawTransactionParser = /*#__PURE__*/z.object({
|
|
830
|
-
expiration: /*#__PURE__*/z.string(),
|
|
831
|
-
ref_block_num: /*#__PURE__*/z.number(),
|
|
832
|
-
ref_block_prefix: /*#__PURE__*/z.number(),
|
|
833
|
-
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
834
|
-
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
835
|
-
delay_sec: /*#__PURE__*/z.number(),
|
|
836
|
-
context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
|
|
837
|
-
transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
|
|
838
|
-
});
|
|
839
|
-
var generateAuthActionsBaseParser = /*#__PURE__*/z.object({
|
|
840
|
-
account: /*#__PURE__*/z.literal(WRAP_CONTRACT),
|
|
841
|
-
name: /*#__PURE__*/z.literal(WRAP_AUTH_ACTION),
|
|
842
|
-
data: /*#__PURE__*/z.object({
|
|
843
|
-
time: /*#__PURE__*/z.string(),
|
|
844
|
-
protonAccount: /*#__PURE__*/z.string()
|
|
845
|
-
}),
|
|
846
|
-
authorization: authorizationsParser
|
|
847
|
-
});
|
|
848
|
-
var generateAuthActionsWebAuthParser = /*#__PURE__*/z.object({
|
|
849
|
-
account: /*#__PURE__*/z.literal('webauthn'),
|
|
850
|
-
name: /*#__PURE__*/z.literal('exec'),
|
|
851
|
-
authorization: authorizationsParser,
|
|
852
|
-
data: /*#__PURE__*/z.object({
|
|
853
|
-
account: accountParser,
|
|
854
|
-
key: /*#__PURE__*/z.object({
|
|
855
|
-
key: /*#__PURE__*/z.array( /*#__PURE__*/z.string().or( /*#__PURE__*/z.object({
|
|
856
|
-
modulus: /*#__PURE__*/z.string(),
|
|
857
|
-
exponent: /*#__PURE__*/z.string()
|
|
858
|
-
}))),
|
|
859
|
-
user_presence: /*#__PURE__*/z.number(),
|
|
860
|
-
rpid: /*#__PURE__*/z.string()
|
|
861
|
-
}),
|
|
862
|
-
nonce: /*#__PURE__*/z.number(),
|
|
863
|
-
permissions: authorizationsParser,
|
|
864
|
-
signature: /*#__PURE__*/z.object({
|
|
865
|
-
auth_data: /*#__PURE__*/z.string(),
|
|
866
|
-
client_json: /*#__PURE__*/z.string(),
|
|
867
|
-
signature: /*#__PURE__*/z.string()
|
|
868
|
-
}),
|
|
869
|
-
trx: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
870
|
-
actions: /*#__PURE__*/z.array(z.object({
|
|
871
|
-
account: z.literal(WRAP_CONTRACT),
|
|
872
|
-
name: z.literal(WRAP_AUTH_ACTION),
|
|
873
|
-
data: z.string().or(z.object({
|
|
874
|
-
time: z.string(),
|
|
875
|
-
protonAccount: z.string()
|
|
876
|
-
})),
|
|
877
|
-
authorization: authorizationsParser
|
|
878
|
-
})).length(1)
|
|
879
|
-
}))
|
|
880
|
-
})
|
|
881
|
-
});
|
|
882
|
-
var generateAuthParser = /*#__PURE__*/z.object({
|
|
883
|
-
signer: authorizationParser,
|
|
884
|
-
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
885
|
-
transaction: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
886
|
-
actions: /*#__PURE__*/z.array(generateAuthActionsBaseParser.or(generateAuthActionsWebAuthParser)).length(1)
|
|
887
|
-
}))
|
|
893
|
+
var addressParser = /*#__PURE__*/z.object({
|
|
894
|
+
index: /*#__PURE__*/z.number(),
|
|
895
|
+
account: accountParser,
|
|
896
|
+
chain: /*#__PURE__*/z.string(),
|
|
897
|
+
address: /*#__PURE__*/z.string(),
|
|
898
|
+
address_hash: /*#__PURE__*/z.string()
|
|
888
899
|
});
|
|
889
900
|
var generateAddressBodyParser = /*#__PURE__*/z.object({
|
|
890
901
|
coin: z.string(),
|
|
@@ -897,6 +908,28 @@ var generateAddressResponse = /*#__PURE__*/z.object({
|
|
|
897
908
|
wallet: /*#__PURE__*/z.string(),
|
|
898
909
|
memo: /*#__PURE__*/z.string().optional()
|
|
899
910
|
});
|
|
911
|
+
|
|
912
|
+
var rateParser = /*#__PURE__*/z.object({
|
|
913
|
+
counterCurrency: /*#__PURE__*/z.string(),
|
|
914
|
+
price: /*#__PURE__*/z.number(),
|
|
915
|
+
priceChangePercent: /*#__PURE__*/z.number(),
|
|
916
|
+
marketCap: /*#__PURE__*/z.number(),
|
|
917
|
+
volume: /*#__PURE__*/z.number(),
|
|
918
|
+
timestamp: /*#__PURE__*/z.number()
|
|
919
|
+
});
|
|
920
|
+
var exchangeRateParser = /*#__PURE__*/z.object({
|
|
921
|
+
contract: /*#__PURE__*/z.string(),
|
|
922
|
+
symbol: /*#__PURE__*/z.string(),
|
|
923
|
+
rank: /*#__PURE__*/z.number(),
|
|
924
|
+
rates: /*#__PURE__*/z.array(rateParser)
|
|
925
|
+
});
|
|
926
|
+
var exchangeRatesParser = /*#__PURE__*/z.array(exchangeRateParser);
|
|
927
|
+
|
|
928
|
+
(function (Type) {
|
|
929
|
+
Type["RECEIVE"] = "receive";
|
|
930
|
+
Type["SEND"] = "send";
|
|
931
|
+
})(exports.Type || (exports.Type = {}));
|
|
932
|
+
|
|
900
933
|
var depositBodyParser = /*#__PURE__*/z.object({
|
|
901
934
|
id: /*#__PURE__*/z.string(),
|
|
902
935
|
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
@@ -904,67 +937,51 @@ var depositBodyParser = /*#__PURE__*/z.object({
|
|
|
904
937
|
coin: /*#__PURE__*/z.string(),
|
|
905
938
|
wallet: /*#__PURE__*/z.string()
|
|
906
939
|
});
|
|
907
|
-
var
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
}),
|
|
920
|
-
authorization: authorizationsParser
|
|
940
|
+
var transactionParser = /*#__PURE__*/z.object({
|
|
941
|
+
id: /*#__PURE__*/z.string(),
|
|
942
|
+
wallet: /*#__PURE__*/z.string(),
|
|
943
|
+
value: /*#__PURE__*/z.number(),
|
|
944
|
+
valueString: /*#__PURE__*/z.string(),
|
|
945
|
+
address: /*#__PURE__*/z.string(),
|
|
946
|
+
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
947
|
+
state: /*#__PURE__*/z.string(),
|
|
948
|
+
confirmations: /*#__PURE__*/z.number(),
|
|
949
|
+
hash: /*#__PURE__*/z.string(),
|
|
950
|
+
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
951
|
+
blockHeight: /*#__PURE__*/z.number().optional().nullable()
|
|
921
952
|
});
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
account: accountParser,
|
|
928
|
-
key: /*#__PURE__*/z.object({
|
|
929
|
-
key: /*#__PURE__*/z.array( /*#__PURE__*/z.string().or( /*#__PURE__*/z.object({
|
|
930
|
-
modulus: /*#__PURE__*/z.string(),
|
|
931
|
-
exponent: /*#__PURE__*/z.string()
|
|
932
|
-
}))),
|
|
933
|
-
user_presence: /*#__PURE__*/z.number(),
|
|
934
|
-
rpid: /*#__PURE__*/z.string()
|
|
935
|
-
}),
|
|
936
|
-
nonce: /*#__PURE__*/z.number(),
|
|
937
|
-
permissions: authorizationsParser,
|
|
938
|
-
signature: /*#__PURE__*/z.object({
|
|
939
|
-
auth_data: /*#__PURE__*/z.string(),
|
|
940
|
-
client_json: /*#__PURE__*/z.string(),
|
|
941
|
-
signature: /*#__PURE__*/z.string()
|
|
942
|
-
}),
|
|
943
|
-
trx: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
944
|
-
actions: /*#__PURE__*/z.array(z.object({
|
|
945
|
-
account: accountParser,
|
|
946
|
-
name: z.literal('transfer'),
|
|
947
|
-
data: z.string().or(z.object({
|
|
948
|
-
from: z.string().refine(function (val) {
|
|
949
|
-
return val !== WRAP_CONTRACT;
|
|
950
|
-
}, {
|
|
951
|
-
message: WRAP_CONTRACT + " must be receiver"
|
|
952
|
-
}),
|
|
953
|
-
to: z.literal(WRAP_CONTRACT),
|
|
954
|
-
quantity: z.string(),
|
|
955
|
-
memo: z.string()
|
|
956
|
-
})),
|
|
957
|
-
authorization: authorizationsParser
|
|
958
|
-
})).length(1)
|
|
959
|
-
}))
|
|
960
|
-
})
|
|
953
|
+
|
|
954
|
+
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
955
|
+
success: /*#__PURE__*/z.boolean(),
|
|
956
|
+
transaction_id: /*#__PURE__*/z.string(),
|
|
957
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
961
958
|
});
|
|
959
|
+
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
960
|
+
baseAmount: /*#__PURE__*/z.number(),
|
|
961
|
+
baseSymbol: /*#__PURE__*/z.string(),
|
|
962
|
+
quoteSymbol: /*#__PURE__*/z.string()
|
|
963
|
+
});
|
|
964
|
+
var otcQuoteResponseParser = /*#__PURE__*/z.object({
|
|
965
|
+
success: /*#__PURE__*/z.boolean(),
|
|
966
|
+
token: /*#__PURE__*/z.string(),
|
|
967
|
+
qty: /*#__PURE__*/z.number(),
|
|
968
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
969
|
+
});
|
|
970
|
+
|
|
971
|
+
var withdrawData = {
|
|
972
|
+
from: /*#__PURE__*/z.string().refine(function (val) {
|
|
973
|
+
return val !== WRAP_CONTRACT;
|
|
974
|
+
}, {
|
|
975
|
+
message: WRAP_CONTRACT + " must be receiver"
|
|
976
|
+
}),
|
|
977
|
+
to: /*#__PURE__*/z.literal(WRAP_CONTRACT),
|
|
978
|
+
quantity: /*#__PURE__*/z.string(),
|
|
979
|
+
memo: /*#__PURE__*/z.string()
|
|
980
|
+
};
|
|
962
981
|
var withdrawBodyParser = /*#__PURE__*/z.object({
|
|
963
982
|
signer: authorizationParser,
|
|
964
983
|
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
965
|
-
transaction: /*#__PURE__*/
|
|
966
|
-
actions: /*#__PURE__*/z.array(withdrawBodyBaseAction.or(withdrawBodyWebAuthAction)).length(1)
|
|
967
|
-
})),
|
|
984
|
+
transaction: /*#__PURE__*/singleActionTransactionParser('*', 'transfer', withdrawData),
|
|
968
985
|
quoteId: /*#__PURE__*/z.string(),
|
|
969
986
|
provider: /*#__PURE__*/z.string().optional()
|
|
970
987
|
});
|
|
@@ -972,6 +989,13 @@ var withdrawMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
972
989
|
success: /*#__PURE__*/z.boolean(),
|
|
973
990
|
id: /*#__PURE__*/z.string()
|
|
974
991
|
});
|
|
992
|
+
var withdrawalFeeQuoteParser = /*#__PURE__*/z.object({
|
|
993
|
+
quoteId: /*#__PURE__*/z.string(),
|
|
994
|
+
estimatedFee: /*#__PURE__*/z.string(),
|
|
995
|
+
currency: /*#__PURE__*/z.string(),
|
|
996
|
+
network: /*#__PURE__*/z.string()
|
|
997
|
+
});
|
|
998
|
+
|
|
975
999
|
var withdrawHistoryMetalSwapParser = /*#__PURE__*/z.object({
|
|
976
1000
|
id: /*#__PURE__*/z.string(),
|
|
977
1001
|
status: /*#__PURE__*/z.string(),
|
|
@@ -990,10 +1014,14 @@ var withdrawHistoryMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
990
1014
|
totalPages: /*#__PURE__*/z.number(),
|
|
991
1015
|
totalElements: /*#__PURE__*/z.number()
|
|
992
1016
|
});
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1017
|
+
|
|
1018
|
+
(function (Status) {
|
|
1019
|
+
Status["PENDING"] = "pending";
|
|
1020
|
+
Status["SUCCESS"] = "success";
|
|
1021
|
+
Status["FAIL"] = "fail";
|
|
1022
|
+
Status["PROCESSING"] = "processing";
|
|
1023
|
+
})(exports.Status || (exports.Status = {}));
|
|
1024
|
+
|
|
997
1025
|
var wrapStartParser = /*#__PURE__*/z.object({
|
|
998
1026
|
balance: ExtendedAssetParser,
|
|
999
1027
|
id: /*#__PURE__*/z.string(),
|
|
@@ -1019,74 +1047,20 @@ var wrapParser = /*#__PURE__*/z.object({
|
|
|
1019
1047
|
wrap_hash: /*#__PURE__*/z.string(),
|
|
1020
1048
|
confirmations: /*#__PURE__*/z.number()
|
|
1021
1049
|
});
|
|
1022
|
-
var transactionParser = /*#__PURE__*/z.object({
|
|
1023
|
-
id: /*#__PURE__*/z.string(),
|
|
1024
|
-
wallet: /*#__PURE__*/z.string(),
|
|
1025
|
-
value: /*#__PURE__*/z.number(),
|
|
1026
|
-
valueString: /*#__PURE__*/z.string(),
|
|
1027
|
-
address: /*#__PURE__*/z.string(),
|
|
1028
|
-
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
1029
|
-
state: /*#__PURE__*/z.string(),
|
|
1030
|
-
confirmations: /*#__PURE__*/z.number(),
|
|
1031
|
-
hash: /*#__PURE__*/z.string(),
|
|
1032
|
-
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
1033
|
-
blockHeight: /*#__PURE__*/z.number().optional().nullable()
|
|
1034
|
-
});
|
|
1035
|
-
var addressParser = /*#__PURE__*/z.object({
|
|
1036
|
-
index: /*#__PURE__*/z.number(),
|
|
1037
|
-
account: accountParser,
|
|
1038
|
-
chain: /*#__PURE__*/z.string(),
|
|
1039
|
-
address: /*#__PURE__*/z.string(),
|
|
1040
|
-
address_hash: /*#__PURE__*/z.string()
|
|
1041
|
-
});
|
|
1042
|
-
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
1043
|
-
success: /*#__PURE__*/z.boolean(),
|
|
1044
|
-
transaction_id: /*#__PURE__*/z.string(),
|
|
1045
|
-
errormsg: /*#__PURE__*/z.string().optional()
|
|
1046
|
-
});
|
|
1047
|
-
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
1048
|
-
baseAmount: /*#__PURE__*/z.number(),
|
|
1049
|
-
baseSymbol: /*#__PURE__*/z.string(),
|
|
1050
|
-
quoteSymbol: /*#__PURE__*/z.string()
|
|
1051
|
-
});
|
|
1052
|
-
var otcQuoteResponseParser = /*#__PURE__*/z.object({
|
|
1053
|
-
success: /*#__PURE__*/z.boolean(),
|
|
1054
|
-
token: /*#__PURE__*/z.string(),
|
|
1055
|
-
qty: /*#__PURE__*/z.number(),
|
|
1056
|
-
errormsg: /*#__PURE__*/z.string().optional()
|
|
1057
|
-
});
|
|
1058
|
-
var rateParser = /*#__PURE__*/z.object({
|
|
1059
|
-
counterCurrency: /*#__PURE__*/z.string(),
|
|
1060
|
-
price: /*#__PURE__*/z.number(),
|
|
1061
|
-
priceChangePercent: /*#__PURE__*/z.number(),
|
|
1062
|
-
marketCap: /*#__PURE__*/z.number(),
|
|
1063
|
-
volume: /*#__PURE__*/z.number(),
|
|
1064
|
-
timestamp: /*#__PURE__*/z.number()
|
|
1065
|
-
});
|
|
1066
|
-
var exchangeRateParser = /*#__PURE__*/z.object({
|
|
1067
|
-
contract: /*#__PURE__*/z.string(),
|
|
1068
|
-
symbol: /*#__PURE__*/z.string(),
|
|
1069
|
-
rank: /*#__PURE__*/z.number(),
|
|
1070
|
-
rates: /*#__PURE__*/z.array(rateParser)
|
|
1071
|
-
});
|
|
1072
|
-
var exchangeRatesParser = /*#__PURE__*/z.array(exchangeRateParser);
|
|
1073
|
-
var withdrawalFeeQuoteParser = /*#__PURE__*/z.object({
|
|
1074
|
-
quoteId: /*#__PURE__*/z.string(),
|
|
1075
|
-
estimatedFee: /*#__PURE__*/z.string(),
|
|
1076
|
-
currency: /*#__PURE__*/z.string(),
|
|
1077
|
-
network: /*#__PURE__*/z.string()
|
|
1078
|
-
});
|
|
1079
1050
|
|
|
1080
1051
|
var isSameToken = function isSameToken(token1, token2) {
|
|
1081
1052
|
return token1.xtokenSymbol === token2.xtokenSymbol && token1.xtokenPrecision === token2.xtokenPrecision && token1.xtokenContract === token2.xtokenContract;
|
|
1082
1053
|
};
|
|
1083
1054
|
|
|
1055
|
+
exports.ExtendedAssetParser = ExtendedAssetParser;
|
|
1084
1056
|
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
1085
1057
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
1086
1058
|
exports.accountParser = accountParser;
|
|
1087
1059
|
exports.addressParser = addressParser;
|
|
1088
1060
|
exports.authorizationParser = authorizationParser;
|
|
1089
1061
|
exports.authorizationsParser = authorizationsParser;
|
|
1062
|
+
exports.baseActionParser = baseActionParser;
|
|
1063
|
+
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
1090
1064
|
exports.depositBodyParser = depositBodyParser;
|
|
1091
1065
|
exports.exchangeRateParser = exchangeRateParser;
|
|
1092
1066
|
exports.exchangeRatesParser = exchangeRatesParser;
|
|
@@ -1101,9 +1075,10 @@ exports.otcOrderResponseParser = otcOrderResponseParser;
|
|
|
1101
1075
|
exports.otcQuoteBodyParser = otcQuoteBodyParser;
|
|
1102
1076
|
exports.otcQuoteResponseParser = otcQuoteResponseParser;
|
|
1103
1077
|
exports.rateParser = rateParser;
|
|
1104
|
-
exports.rawTransactionParser = rawTransactionParser;
|
|
1105
1078
|
exports.similarChains = similarChains;
|
|
1079
|
+
exports.singleActionTransactionParser = singleActionTransactionParser;
|
|
1106
1080
|
exports.transactionParser = transactionParser;
|
|
1081
|
+
exports.webauthActionParser = webauthActionParser;
|
|
1107
1082
|
exports.withdrawBodyParser = withdrawBodyParser;
|
|
1108
1083
|
exports.withdrawHistoryMetalResponseParser = withdrawHistoryMetalResponseParser;
|
|
1109
1084
|
exports.withdrawHistoryMetalSwapParser = withdrawHistoryMetalSwapParser;
|