@proton/wrap-constants 0.0.29 → 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/coins.d.ts +2 -1
- 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 +180 -196
- 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 +181 -201
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/coins.ts +12 -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
|
@@ -36,6 +36,7 @@ var _similarChains, _explorerLinkByChain;
|
|
|
36
36
|
Networks["Ropsten"] = "ropsten";
|
|
37
37
|
Networks["ERC20"] = "erc20";
|
|
38
38
|
Networks["BEP20"] = "bep20";
|
|
39
|
+
Networks["XLM"] = "xlm";
|
|
39
40
|
})(exports.Networks || (exports.Networks = {}));
|
|
40
41
|
|
|
41
42
|
var similarChains = (_similarChains = {}, _similarChains[exports.Chains.EthereumMainnet] = [exports.Chains.BinanceBEP20], _similarChains[exports.Chains.BinanceBEP20] = [exports.Chains.EthereumMainnet], _similarChains);
|
|
@@ -139,6 +140,14 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
139
140
|
precision: 18,
|
|
140
141
|
contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
141
142
|
hasWithdrawMemo: false
|
|
143
|
+
}, {
|
|
144
|
+
wallet: 'USDC-XLM',
|
|
145
|
+
symbol: 'USDC',
|
|
146
|
+
chain: exports.Chains.StellarMainnet,
|
|
147
|
+
network: exports.Networks.XLM,
|
|
148
|
+
precision: 7,
|
|
149
|
+
contract: undefined,
|
|
150
|
+
hasWithdrawMemo: true
|
|
142
151
|
}] : [], IS_TESTNET ? [{
|
|
143
152
|
wallet: 'USDC',
|
|
144
153
|
symbol: 'USDC',
|
|
@@ -462,7 +471,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
462
471
|
network: exports.Networks.Mainnet,
|
|
463
472
|
precision: 7,
|
|
464
473
|
contract: undefined,
|
|
465
|
-
hasWithdrawMemo:
|
|
474
|
+
hasWithdrawMemo: true
|
|
466
475
|
}] : [], IS_TESTNET ? [{
|
|
467
476
|
wallet: 'XLM',
|
|
468
477
|
symbol: 'XLM',
|
|
@@ -470,7 +479,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
470
479
|
network: exports.Networks.Testnet,
|
|
471
480
|
precision: 7,
|
|
472
481
|
contract: undefined,
|
|
473
|
-
hasWithdrawMemo:
|
|
482
|
+
hasWithdrawMemo: true
|
|
474
483
|
}] : []),
|
|
475
484
|
image: '/img/tokens/xxlm.png'
|
|
476
485
|
}, {
|
|
@@ -686,6 +695,75 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
686
695
|
};
|
|
687
696
|
};
|
|
688
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
|
+
|
|
689
767
|
function _extends() {
|
|
690
768
|
_extends = Object.assign || function (target) {
|
|
691
769
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -799,83 +877,25 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
799
877
|
return constants;
|
|
800
878
|
};
|
|
801
879
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
})
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
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);
|
|
813
892
|
|
|
814
|
-
var
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
var rawTransactionParser = /*#__PURE__*/z.object({
|
|
821
|
-
expiration: /*#__PURE__*/z.string(),
|
|
822
|
-
ref_block_num: /*#__PURE__*/z.number(),
|
|
823
|
-
ref_block_prefix: /*#__PURE__*/z.number(),
|
|
824
|
-
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
825
|
-
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
826
|
-
delay_sec: /*#__PURE__*/z.number(),
|
|
827
|
-
context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
|
|
828
|
-
transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
|
|
829
|
-
});
|
|
830
|
-
var generateAuthActionsBaseParser = /*#__PURE__*/z.object({
|
|
831
|
-
account: /*#__PURE__*/z.literal(WRAP_CONTRACT),
|
|
832
|
-
name: /*#__PURE__*/z.literal(WRAP_AUTH_ACTION),
|
|
833
|
-
data: /*#__PURE__*/z.object({
|
|
834
|
-
time: /*#__PURE__*/z.string(),
|
|
835
|
-
protonAccount: /*#__PURE__*/z.string()
|
|
836
|
-
}),
|
|
837
|
-
authorization: authorizationsParser
|
|
838
|
-
});
|
|
839
|
-
var generateAuthActionsWebAuthParser = /*#__PURE__*/z.object({
|
|
840
|
-
account: /*#__PURE__*/z.literal('webauthn'),
|
|
841
|
-
name: /*#__PURE__*/z.literal('exec'),
|
|
842
|
-
authorization: authorizationsParser,
|
|
843
|
-
data: /*#__PURE__*/z.object({
|
|
844
|
-
account: accountParser,
|
|
845
|
-
key: /*#__PURE__*/z.object({
|
|
846
|
-
key: /*#__PURE__*/z.array( /*#__PURE__*/z.string().or( /*#__PURE__*/z.object({
|
|
847
|
-
modulus: /*#__PURE__*/z.string(),
|
|
848
|
-
exponent: /*#__PURE__*/z.string()
|
|
849
|
-
}))),
|
|
850
|
-
user_presence: /*#__PURE__*/z.number(),
|
|
851
|
-
rpid: /*#__PURE__*/z.string()
|
|
852
|
-
}),
|
|
853
|
-
nonce: /*#__PURE__*/z.number(),
|
|
854
|
-
permissions: authorizationsParser,
|
|
855
|
-
signature: /*#__PURE__*/z.object({
|
|
856
|
-
auth_data: /*#__PURE__*/z.string(),
|
|
857
|
-
client_json: /*#__PURE__*/z.string(),
|
|
858
|
-
signature: /*#__PURE__*/z.string()
|
|
859
|
-
}),
|
|
860
|
-
trx: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
861
|
-
actions: /*#__PURE__*/z.array(z.object({
|
|
862
|
-
account: z.literal(WRAP_CONTRACT),
|
|
863
|
-
name: z.literal(WRAP_AUTH_ACTION),
|
|
864
|
-
data: z.string().or(z.object({
|
|
865
|
-
time: z.string(),
|
|
866
|
-
protonAccount: z.string()
|
|
867
|
-
})),
|
|
868
|
-
authorization: authorizationsParser
|
|
869
|
-
})).length(1)
|
|
870
|
-
}))
|
|
871
|
-
})
|
|
872
|
-
});
|
|
873
|
-
var generateAuthParser = /*#__PURE__*/z.object({
|
|
874
|
-
signer: authorizationParser,
|
|
875
|
-
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
876
|
-
transaction: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
877
|
-
actions: /*#__PURE__*/z.array(generateAuthActionsBaseParser.or(generateAuthActionsWebAuthParser)).length(1)
|
|
878
|
-
}))
|
|
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()
|
|
879
899
|
});
|
|
880
900
|
var generateAddressBodyParser = /*#__PURE__*/z.object({
|
|
881
901
|
coin: z.string(),
|
|
@@ -888,6 +908,28 @@ var generateAddressResponse = /*#__PURE__*/z.object({
|
|
|
888
908
|
wallet: /*#__PURE__*/z.string(),
|
|
889
909
|
memo: /*#__PURE__*/z.string().optional()
|
|
890
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
|
+
|
|
891
933
|
var depositBodyParser = /*#__PURE__*/z.object({
|
|
892
934
|
id: /*#__PURE__*/z.string(),
|
|
893
935
|
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
@@ -895,67 +937,51 @@ var depositBodyParser = /*#__PURE__*/z.object({
|
|
|
895
937
|
coin: /*#__PURE__*/z.string(),
|
|
896
938
|
wallet: /*#__PURE__*/z.string()
|
|
897
939
|
});
|
|
898
|
-
var
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
}),
|
|
911
|
-
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()
|
|
912
952
|
});
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}))),
|
|
924
|
-
user_presence: /*#__PURE__*/z.number(),
|
|
925
|
-
rpid: /*#__PURE__*/z.string()
|
|
926
|
-
}),
|
|
927
|
-
nonce: /*#__PURE__*/z.number(),
|
|
928
|
-
permissions: authorizationsParser,
|
|
929
|
-
signature: /*#__PURE__*/z.object({
|
|
930
|
-
auth_data: /*#__PURE__*/z.string(),
|
|
931
|
-
client_json: /*#__PURE__*/z.string(),
|
|
932
|
-
signature: /*#__PURE__*/z.string()
|
|
933
|
-
}),
|
|
934
|
-
trx: /*#__PURE__*/rawTransactionParser.merge( /*#__PURE__*/z.object({
|
|
935
|
-
actions: /*#__PURE__*/z.array(z.object({
|
|
936
|
-
account: accountParser,
|
|
937
|
-
name: z.literal('transfer'),
|
|
938
|
-
data: z.string().or(z.object({
|
|
939
|
-
from: z.string().refine(function (val) {
|
|
940
|
-
return val !== WRAP_CONTRACT;
|
|
941
|
-
}, {
|
|
942
|
-
message: WRAP_CONTRACT + " must be receiver"
|
|
943
|
-
}),
|
|
944
|
-
to: z.literal(WRAP_CONTRACT),
|
|
945
|
-
quantity: z.string(),
|
|
946
|
-
memo: z.string()
|
|
947
|
-
})),
|
|
948
|
-
authorization: authorizationsParser
|
|
949
|
-
})).length(1)
|
|
950
|
-
}))
|
|
951
|
-
})
|
|
953
|
+
|
|
954
|
+
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
955
|
+
success: /*#__PURE__*/z.boolean(),
|
|
956
|
+
transaction_id: /*#__PURE__*/z.string(),
|
|
957
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
958
|
+
});
|
|
959
|
+
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
960
|
+
baseAmount: /*#__PURE__*/z.number(),
|
|
961
|
+
baseSymbol: /*#__PURE__*/z.string(),
|
|
962
|
+
quoteSymbol: /*#__PURE__*/z.string()
|
|
952
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
|
+
};
|
|
953
981
|
var withdrawBodyParser = /*#__PURE__*/z.object({
|
|
954
982
|
signer: authorizationParser,
|
|
955
983
|
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
956
|
-
transaction: /*#__PURE__*/
|
|
957
|
-
actions: /*#__PURE__*/z.array(withdrawBodyBaseAction.or(withdrawBodyWebAuthAction)).length(1)
|
|
958
|
-
})),
|
|
984
|
+
transaction: /*#__PURE__*/singleActionTransactionParser('*', 'transfer', withdrawData),
|
|
959
985
|
quoteId: /*#__PURE__*/z.string(),
|
|
960
986
|
provider: /*#__PURE__*/z.string().optional()
|
|
961
987
|
});
|
|
@@ -963,6 +989,13 @@ var withdrawMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
963
989
|
success: /*#__PURE__*/z.boolean(),
|
|
964
990
|
id: /*#__PURE__*/z.string()
|
|
965
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
|
+
|
|
966
999
|
var withdrawHistoryMetalSwapParser = /*#__PURE__*/z.object({
|
|
967
1000
|
id: /*#__PURE__*/z.string(),
|
|
968
1001
|
status: /*#__PURE__*/z.string(),
|
|
@@ -981,10 +1014,14 @@ var withdrawHistoryMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
981
1014
|
totalPages: /*#__PURE__*/z.number(),
|
|
982
1015
|
totalElements: /*#__PURE__*/z.number()
|
|
983
1016
|
});
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
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
|
+
|
|
988
1025
|
var wrapStartParser = /*#__PURE__*/z.object({
|
|
989
1026
|
balance: ExtendedAssetParser,
|
|
990
1027
|
id: /*#__PURE__*/z.string(),
|
|
@@ -1010,74 +1047,20 @@ var wrapParser = /*#__PURE__*/z.object({
|
|
|
1010
1047
|
wrap_hash: /*#__PURE__*/z.string(),
|
|
1011
1048
|
confirmations: /*#__PURE__*/z.number()
|
|
1012
1049
|
});
|
|
1013
|
-
var transactionParser = /*#__PURE__*/z.object({
|
|
1014
|
-
id: /*#__PURE__*/z.string(),
|
|
1015
|
-
wallet: /*#__PURE__*/z.string(),
|
|
1016
|
-
value: /*#__PURE__*/z.number(),
|
|
1017
|
-
valueString: /*#__PURE__*/z.string(),
|
|
1018
|
-
address: /*#__PURE__*/z.string(),
|
|
1019
|
-
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
1020
|
-
state: /*#__PURE__*/z.string(),
|
|
1021
|
-
confirmations: /*#__PURE__*/z.number(),
|
|
1022
|
-
hash: /*#__PURE__*/z.string(),
|
|
1023
|
-
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
1024
|
-
blockHeight: /*#__PURE__*/z.number().optional().nullable()
|
|
1025
|
-
});
|
|
1026
|
-
var addressParser = /*#__PURE__*/z.object({
|
|
1027
|
-
index: /*#__PURE__*/z.number(),
|
|
1028
|
-
account: accountParser,
|
|
1029
|
-
chain: /*#__PURE__*/z.string(),
|
|
1030
|
-
address: /*#__PURE__*/z.string(),
|
|
1031
|
-
address_hash: /*#__PURE__*/z.string()
|
|
1032
|
-
});
|
|
1033
|
-
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
1034
|
-
success: /*#__PURE__*/z.boolean(),
|
|
1035
|
-
transaction_id: /*#__PURE__*/z.string(),
|
|
1036
|
-
errormsg: /*#__PURE__*/z.string().optional()
|
|
1037
|
-
});
|
|
1038
|
-
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
1039
|
-
baseAmount: /*#__PURE__*/z.number(),
|
|
1040
|
-
baseSymbol: /*#__PURE__*/z.string(),
|
|
1041
|
-
quoteSymbol: /*#__PURE__*/z.string()
|
|
1042
|
-
});
|
|
1043
|
-
var otcQuoteResponseParser = /*#__PURE__*/z.object({
|
|
1044
|
-
success: /*#__PURE__*/z.boolean(),
|
|
1045
|
-
token: /*#__PURE__*/z.string(),
|
|
1046
|
-
qty: /*#__PURE__*/z.number(),
|
|
1047
|
-
errormsg: /*#__PURE__*/z.string().optional()
|
|
1048
|
-
});
|
|
1049
|
-
var rateParser = /*#__PURE__*/z.object({
|
|
1050
|
-
counterCurrency: /*#__PURE__*/z.string(),
|
|
1051
|
-
price: /*#__PURE__*/z.number(),
|
|
1052
|
-
priceChangePercent: /*#__PURE__*/z.number(),
|
|
1053
|
-
marketCap: /*#__PURE__*/z.number(),
|
|
1054
|
-
volume: /*#__PURE__*/z.number(),
|
|
1055
|
-
timestamp: /*#__PURE__*/z.number()
|
|
1056
|
-
});
|
|
1057
|
-
var exchangeRateParser = /*#__PURE__*/z.object({
|
|
1058
|
-
contract: /*#__PURE__*/z.string(),
|
|
1059
|
-
symbol: /*#__PURE__*/z.string(),
|
|
1060
|
-
rank: /*#__PURE__*/z.number(),
|
|
1061
|
-
rates: /*#__PURE__*/z.array(rateParser)
|
|
1062
|
-
});
|
|
1063
|
-
var exchangeRatesParser = /*#__PURE__*/z.array(exchangeRateParser);
|
|
1064
|
-
var withdrawalFeeQuoteParser = /*#__PURE__*/z.object({
|
|
1065
|
-
quoteId: /*#__PURE__*/z.string(),
|
|
1066
|
-
estimatedFee: /*#__PURE__*/z.string(),
|
|
1067
|
-
currency: /*#__PURE__*/z.string(),
|
|
1068
|
-
network: /*#__PURE__*/z.string()
|
|
1069
|
-
});
|
|
1070
1050
|
|
|
1071
1051
|
var isSameToken = function isSameToken(token1, token2) {
|
|
1072
1052
|
return token1.xtokenSymbol === token2.xtokenSymbol && token1.xtokenPrecision === token2.xtokenPrecision && token1.xtokenContract === token2.xtokenContract;
|
|
1073
1053
|
};
|
|
1074
1054
|
|
|
1055
|
+
exports.ExtendedAssetParser = ExtendedAssetParser;
|
|
1075
1056
|
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
1076
1057
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
1077
1058
|
exports.accountParser = accountParser;
|
|
1078
1059
|
exports.addressParser = addressParser;
|
|
1079
1060
|
exports.authorizationParser = authorizationParser;
|
|
1080
1061
|
exports.authorizationsParser = authorizationsParser;
|
|
1062
|
+
exports.baseActionParser = baseActionParser;
|
|
1063
|
+
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
1081
1064
|
exports.depositBodyParser = depositBodyParser;
|
|
1082
1065
|
exports.exchangeRateParser = exchangeRateParser;
|
|
1083
1066
|
exports.exchangeRatesParser = exchangeRatesParser;
|
|
@@ -1092,9 +1075,10 @@ exports.otcOrderResponseParser = otcOrderResponseParser;
|
|
|
1092
1075
|
exports.otcQuoteBodyParser = otcQuoteBodyParser;
|
|
1093
1076
|
exports.otcQuoteResponseParser = otcQuoteResponseParser;
|
|
1094
1077
|
exports.rateParser = rateParser;
|
|
1095
|
-
exports.rawTransactionParser = rawTransactionParser;
|
|
1096
1078
|
exports.similarChains = similarChains;
|
|
1079
|
+
exports.singleActionTransactionParser = singleActionTransactionParser;
|
|
1097
1080
|
exports.transactionParser = transactionParser;
|
|
1081
|
+
exports.webauthActionParser = webauthActionParser;
|
|
1098
1082
|
exports.withdrawBodyParser = withdrawBodyParser;
|
|
1099
1083
|
exports.withdrawHistoryMetalResponseParser = withdrawHistoryMetalResponseParser;
|
|
1100
1084
|
exports.withdrawHistoryMetalSwapParser = withdrawHistoryMetalSwapParser;
|