@proton/wrap-constants 0.0.30 → 0.0.34
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 +629 -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 +185 -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 +185 -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 +68 -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,79 @@ 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) {
|
|
720
|
+
return z.object({
|
|
721
|
+
account: contract === '*' ? accountParser : z.literal(contract),
|
|
722
|
+
name: z.literal(action),
|
|
723
|
+
data: z.object(data),
|
|
724
|
+
authorization: authorizationsParser
|
|
725
|
+
});
|
|
726
|
+
};
|
|
727
|
+
var baseActionSerializedParser = function baseActionSerializedParser(contract, action, data) {
|
|
728
|
+
return z.object({
|
|
729
|
+
account: contract === '*' ? accountParser : z.literal(contract),
|
|
730
|
+
name: z.literal(action),
|
|
731
|
+
data: z.string().or(z.object(data)),
|
|
732
|
+
authorization: authorizationsParser
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
var webauthActionParser = function webauthActionParser(contract, action, data) {
|
|
736
|
+
return z.object({
|
|
737
|
+
account: z.literal('webauthn'),
|
|
738
|
+
name: z.literal('exec'),
|
|
739
|
+
data: z.object({
|
|
740
|
+
account: accountParser,
|
|
741
|
+
key: z.object({
|
|
742
|
+
key: z.array(z.string().or(z.object({
|
|
743
|
+
modulus: z.string(),
|
|
744
|
+
exponent: z.string()
|
|
745
|
+
}))),
|
|
746
|
+
user_presence: z.number(),
|
|
747
|
+
rpid: z.string()
|
|
748
|
+
}),
|
|
749
|
+
nonce: z.number(),
|
|
750
|
+
permissions: authorizationsParser,
|
|
751
|
+
signature: z.object({
|
|
752
|
+
auth_data: z.string(),
|
|
753
|
+
client_json: z.string(),
|
|
754
|
+
signature: z.string()
|
|
755
|
+
}),
|
|
756
|
+
trx: rawTransactionParser.merge(z.object({
|
|
757
|
+
actions: z.array(baseActionSerializedParser(contract, action, data)).length(1)
|
|
758
|
+
}))
|
|
759
|
+
}),
|
|
760
|
+
authorization: authorizationsParser
|
|
761
|
+
});
|
|
762
|
+
};
|
|
763
|
+
var singleActionTransactionParser = function singleActionTransactionParser(contract, action, data) {
|
|
764
|
+
var baseAction = baseActionParser(contract, action, data);
|
|
765
|
+
var webauthAction = webauthActionParser(contract, action, data);
|
|
766
|
+
return rawTransactionParser.merge(z.object({
|
|
767
|
+
actions: z.array(baseAction.or(webauthAction)).length(1)
|
|
768
|
+
}));
|
|
769
|
+
};
|
|
770
|
+
|
|
689
771
|
function _extends() {
|
|
690
772
|
_extends = Object.assign || function (target) {
|
|
691
773
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -799,83 +881,25 @@ var initializeConstants = function initializeConstants(chain) {
|
|
|
799
881
|
return constants;
|
|
800
882
|
};
|
|
801
883
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
})
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
884
|
+
var createAbstractAuthParser = function createAbstractAuthParser(contract, action, data) {
|
|
885
|
+
return z.object({
|
|
886
|
+
signer: authorizationParser,
|
|
887
|
+
signatures: z.array(z.string()).length(1),
|
|
888
|
+
transaction: singleActionTransactionParser(contract, action, data)
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
var generateAuthData = {
|
|
892
|
+
time: /*#__PURE__*/z.string(),
|
|
893
|
+
protonAccount: /*#__PURE__*/z.string()
|
|
894
|
+
};
|
|
895
|
+
var generateAuthParser = /*#__PURE__*/createAbstractAuthParser(WRAP_CONTRACT, WRAP_AUTH_ACTION, generateAuthData);
|
|
813
896
|
|
|
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
|
-
}))
|
|
897
|
+
var addressParser = /*#__PURE__*/z.object({
|
|
898
|
+
index: /*#__PURE__*/z.number(),
|
|
899
|
+
account: accountParser,
|
|
900
|
+
chain: /*#__PURE__*/z.string(),
|
|
901
|
+
address: /*#__PURE__*/z.string(),
|
|
902
|
+
address_hash: /*#__PURE__*/z.string()
|
|
879
903
|
});
|
|
880
904
|
var generateAddressBodyParser = /*#__PURE__*/z.object({
|
|
881
905
|
coin: z.string(),
|
|
@@ -888,6 +912,28 @@ var generateAddressResponse = /*#__PURE__*/z.object({
|
|
|
888
912
|
wallet: /*#__PURE__*/z.string(),
|
|
889
913
|
memo: /*#__PURE__*/z.string().optional()
|
|
890
914
|
});
|
|
915
|
+
|
|
916
|
+
var rateParser = /*#__PURE__*/z.object({
|
|
917
|
+
counterCurrency: /*#__PURE__*/z.string(),
|
|
918
|
+
price: /*#__PURE__*/z.number(),
|
|
919
|
+
priceChangePercent: /*#__PURE__*/z.number(),
|
|
920
|
+
marketCap: /*#__PURE__*/z.number(),
|
|
921
|
+
volume: /*#__PURE__*/z.number(),
|
|
922
|
+
timestamp: /*#__PURE__*/z.number()
|
|
923
|
+
});
|
|
924
|
+
var exchangeRateParser = /*#__PURE__*/z.object({
|
|
925
|
+
contract: /*#__PURE__*/z.string(),
|
|
926
|
+
symbol: /*#__PURE__*/z.string(),
|
|
927
|
+
rank: /*#__PURE__*/z.number(),
|
|
928
|
+
rates: /*#__PURE__*/z.array(rateParser)
|
|
929
|
+
});
|
|
930
|
+
var exchangeRatesParser = /*#__PURE__*/z.array(exchangeRateParser);
|
|
931
|
+
|
|
932
|
+
(function (Type) {
|
|
933
|
+
Type["RECEIVE"] = "receive";
|
|
934
|
+
Type["SEND"] = "send";
|
|
935
|
+
})(exports.Type || (exports.Type = {}));
|
|
936
|
+
|
|
891
937
|
var depositBodyParser = /*#__PURE__*/z.object({
|
|
892
938
|
id: /*#__PURE__*/z.string(),
|
|
893
939
|
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
@@ -895,67 +941,51 @@ var depositBodyParser = /*#__PURE__*/z.object({
|
|
|
895
941
|
coin: /*#__PURE__*/z.string(),
|
|
896
942
|
wallet: /*#__PURE__*/z.string()
|
|
897
943
|
});
|
|
898
|
-
var
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
}),
|
|
911
|
-
authorization: authorizationsParser
|
|
944
|
+
var transactionParser = /*#__PURE__*/z.object({
|
|
945
|
+
id: /*#__PURE__*/z.string(),
|
|
946
|
+
wallet: /*#__PURE__*/z.string(),
|
|
947
|
+
value: /*#__PURE__*/z.number(),
|
|
948
|
+
valueString: /*#__PURE__*/z.string(),
|
|
949
|
+
address: /*#__PURE__*/z.string(),
|
|
950
|
+
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
951
|
+
state: /*#__PURE__*/z.string(),
|
|
952
|
+
confirmations: /*#__PURE__*/z.number(),
|
|
953
|
+
hash: /*#__PURE__*/z.string(),
|
|
954
|
+
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
955
|
+
blockHeight: /*#__PURE__*/z.number().optional().nullable()
|
|
912
956
|
});
|
|
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
|
-
})
|
|
957
|
+
|
|
958
|
+
var otcOrderResponseParser = /*#__PURE__*/z.object({
|
|
959
|
+
success: /*#__PURE__*/z.boolean(),
|
|
960
|
+
transaction_id: /*#__PURE__*/z.string(),
|
|
961
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
962
|
+
});
|
|
963
|
+
var otcQuoteBodyParser = /*#__PURE__*/z.object({
|
|
964
|
+
baseAmount: /*#__PURE__*/z.number(),
|
|
965
|
+
baseSymbol: /*#__PURE__*/z.string(),
|
|
966
|
+
quoteSymbol: /*#__PURE__*/z.string()
|
|
952
967
|
});
|
|
968
|
+
var otcQuoteResponseParser = /*#__PURE__*/z.object({
|
|
969
|
+
success: /*#__PURE__*/z.boolean(),
|
|
970
|
+
token: /*#__PURE__*/z.string(),
|
|
971
|
+
qty: /*#__PURE__*/z.number(),
|
|
972
|
+
errormsg: /*#__PURE__*/z.string().optional()
|
|
973
|
+
});
|
|
974
|
+
|
|
975
|
+
var withdrawData = {
|
|
976
|
+
from: /*#__PURE__*/z.string().refine(function (val) {
|
|
977
|
+
return val !== WRAP_CONTRACT;
|
|
978
|
+
}, {
|
|
979
|
+
message: WRAP_CONTRACT + " must be receiver"
|
|
980
|
+
}),
|
|
981
|
+
to: /*#__PURE__*/z.literal(WRAP_CONTRACT),
|
|
982
|
+
quantity: /*#__PURE__*/z.string(),
|
|
983
|
+
memo: /*#__PURE__*/z.string()
|
|
984
|
+
};
|
|
953
985
|
var withdrawBodyParser = /*#__PURE__*/z.object({
|
|
954
986
|
signer: authorizationParser,
|
|
955
987
|
signatures: /*#__PURE__*/z.array(z.string()).length(1),
|
|
956
|
-
transaction: /*#__PURE__*/
|
|
957
|
-
actions: /*#__PURE__*/z.array(withdrawBodyBaseAction.or(withdrawBodyWebAuthAction)).length(1)
|
|
958
|
-
})),
|
|
988
|
+
transaction: /*#__PURE__*/singleActionTransactionParser('*', 'transfer', withdrawData),
|
|
959
989
|
quoteId: /*#__PURE__*/z.string(),
|
|
960
990
|
provider: /*#__PURE__*/z.string().optional()
|
|
961
991
|
});
|
|
@@ -963,6 +993,13 @@ var withdrawMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
963
993
|
success: /*#__PURE__*/z.boolean(),
|
|
964
994
|
id: /*#__PURE__*/z.string()
|
|
965
995
|
});
|
|
996
|
+
var withdrawalFeeQuoteParser = /*#__PURE__*/z.object({
|
|
997
|
+
quoteId: /*#__PURE__*/z.string(),
|
|
998
|
+
estimatedFee: /*#__PURE__*/z.string(),
|
|
999
|
+
currency: /*#__PURE__*/z.string(),
|
|
1000
|
+
network: /*#__PURE__*/z.string()
|
|
1001
|
+
});
|
|
1002
|
+
|
|
966
1003
|
var withdrawHistoryMetalSwapParser = /*#__PURE__*/z.object({
|
|
967
1004
|
id: /*#__PURE__*/z.string(),
|
|
968
1005
|
status: /*#__PURE__*/z.string(),
|
|
@@ -981,10 +1018,14 @@ var withdrawHistoryMetalResponseParser = /*#__PURE__*/z.object({
|
|
|
981
1018
|
totalPages: /*#__PURE__*/z.number(),
|
|
982
1019
|
totalElements: /*#__PURE__*/z.number()
|
|
983
1020
|
});
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1021
|
+
|
|
1022
|
+
(function (Status) {
|
|
1023
|
+
Status["PENDING"] = "pending";
|
|
1024
|
+
Status["SUCCESS"] = "success";
|
|
1025
|
+
Status["FAIL"] = "fail";
|
|
1026
|
+
Status["PROCESSING"] = "processing";
|
|
1027
|
+
})(exports.Status || (exports.Status = {}));
|
|
1028
|
+
|
|
988
1029
|
var wrapStartParser = /*#__PURE__*/z.object({
|
|
989
1030
|
balance: ExtendedAssetParser,
|
|
990
1031
|
id: /*#__PURE__*/z.string(),
|
|
@@ -1010,74 +1051,21 @@ var wrapParser = /*#__PURE__*/z.object({
|
|
|
1010
1051
|
wrap_hash: /*#__PURE__*/z.string(),
|
|
1011
1052
|
confirmations: /*#__PURE__*/z.number()
|
|
1012
1053
|
});
|
|
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
1054
|
|
|
1071
1055
|
var isSameToken = function isSameToken(token1, token2) {
|
|
1072
1056
|
return token1.xtokenSymbol === token2.xtokenSymbol && token1.xtokenPrecision === token2.xtokenPrecision && token1.xtokenContract === token2.xtokenContract;
|
|
1073
1057
|
};
|
|
1074
1058
|
|
|
1059
|
+
exports.ExtendedAssetParser = ExtendedAssetParser;
|
|
1075
1060
|
exports.WRAP_AUTH_ACTION = WRAP_AUTH_ACTION;
|
|
1076
1061
|
exports.WRAP_CONTRACT = WRAP_CONTRACT;
|
|
1077
1062
|
exports.accountParser = accountParser;
|
|
1078
1063
|
exports.addressParser = addressParser;
|
|
1079
1064
|
exports.authorizationParser = authorizationParser;
|
|
1080
1065
|
exports.authorizationsParser = authorizationsParser;
|
|
1066
|
+
exports.baseActionParser = baseActionParser;
|
|
1067
|
+
exports.baseActionSerializedParser = baseActionSerializedParser;
|
|
1068
|
+
exports.createAbstractAuthParser = createAbstractAuthParser;
|
|
1081
1069
|
exports.depositBodyParser = depositBodyParser;
|
|
1082
1070
|
exports.exchangeRateParser = exchangeRateParser;
|
|
1083
1071
|
exports.exchangeRatesParser = exchangeRatesParser;
|
|
@@ -1092,9 +1080,10 @@ exports.otcOrderResponseParser = otcOrderResponseParser;
|
|
|
1092
1080
|
exports.otcQuoteBodyParser = otcQuoteBodyParser;
|
|
1093
1081
|
exports.otcQuoteResponseParser = otcQuoteResponseParser;
|
|
1094
1082
|
exports.rateParser = rateParser;
|
|
1095
|
-
exports.rawTransactionParser = rawTransactionParser;
|
|
1096
1083
|
exports.similarChains = similarChains;
|
|
1084
|
+
exports.singleActionTransactionParser = singleActionTransactionParser;
|
|
1097
1085
|
exports.transactionParser = transactionParser;
|
|
1086
|
+
exports.webauthActionParser = webauthActionParser;
|
|
1098
1087
|
exports.withdrawBodyParser = withdrawBodyParser;
|
|
1099
1088
|
exports.withdrawHistoryMetalResponseParser = withdrawHistoryMetalResponseParser;
|
|
1100
1089
|
exports.withdrawHistoryMetalSwapParser = withdrawHistoryMetalSwapParser;
|