@daimo/sdk 1.0.0-rc.1
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/client/createDaimoClient.d.ts +33 -0
- package/dist/client/createDaimoClient.d.ts.map +1 -0
- package/dist/client/createDaimoClient.js +79 -0
- package/dist/client/createDaimoClient.js.map +1 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/transport.d.ts +15 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/client/transport.js +95 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/common/api.d.ts +184 -0
- package/dist/common/api.d.ts.map +1 -0
- package/dist/common/api.js +40 -0
- package/dist/common/api.js.map +1 -0
- package/dist/common/chain.d.ts +35 -0
- package/dist/common/chain.d.ts.map +1 -0
- package/dist/common/chain.js +198 -0
- package/dist/common/chain.js.map +1 -0
- package/dist/common/errors.d.ts +29 -0
- package/dist/common/errors.d.ts.map +1 -0
- package/dist/common/errors.js +41 -0
- package/dist/common/errors.js.map +1 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +7 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/primitives.d.ts +13 -0
- package/dist/common/primitives.d.ts.map +1 -0
- package/dist/common/primitives.js +14 -0
- package/dist/common/primitives.js.map +1 -0
- package/dist/common/session.d.ts +140 -0
- package/dist/common/session.d.ts.map +1 -0
- package/dist/common/session.js +16 -0
- package/dist/common/session.js.map +1 -0
- package/dist/common/token.d.ts +130 -0
- package/dist/common/token.d.ts.map +1 -0
- package/dist/common/token.js +783 -0
- package/dist/common/token.js.map +1 -0
- package/dist/web/api/index.d.ts +3 -0
- package/dist/web/api/index.d.ts.map +1 -0
- package/dist/web/api/index.js +2 -0
- package/dist/web/api/index.js.map +1 -0
- package/dist/web/api/navTree.d.ts +52 -0
- package/dist/web/api/navTree.d.ts.map +1 -0
- package/dist/web/api/navTree.js +2 -0
- package/dist/web/api/navTree.js.map +1 -0
- package/dist/web/api/walletTypes.d.ts +25 -0
- package/dist/web/api/walletTypes.d.ts.map +1 -0
- package/dist/web/api/walletTypes.js +2 -0
- package/dist/web/api/walletTypes.js.map +1 -0
- package/dist/web/components/ChooseOptionPage.d.ts +9 -0
- package/dist/web/components/ChooseOptionPage.d.ts.map +1 -0
- package/dist/web/components/ChooseOptionPage.js +51 -0
- package/dist/web/components/ChooseOptionPage.js.map +1 -0
- package/dist/web/components/ConfirmationPage.d.ts +32 -0
- package/dist/web/components/ConfirmationPage.d.ts.map +1 -0
- package/dist/web/components/ConfirmationPage.js +72 -0
- package/dist/web/components/ConfirmationPage.js.map +1 -0
- package/dist/web/components/ConfirmationSpinner.d.ts +7 -0
- package/dist/web/components/ConfirmationSpinner.d.ts.map +1 -0
- package/dist/web/components/ConfirmationSpinner.js +20 -0
- package/dist/web/components/ConfirmationSpinner.js.map +1 -0
- package/dist/web/components/DaimoModal.d.ts +15 -0
- package/dist/web/components/DaimoModal.d.ts.map +1 -0
- package/dist/web/components/DaimoModal.js +314 -0
- package/dist/web/components/DaimoModal.js.map +1 -0
- package/dist/web/components/DeeplinkPage.d.ts +8 -0
- package/dist/web/components/DeeplinkPage.d.ts.map +1 -0
- package/dist/web/components/DeeplinkPage.js +13 -0
- package/dist/web/components/DeeplinkPage.js.map +1 -0
- package/dist/web/components/ErrorPage.d.ts +29 -0
- package/dist/web/components/ErrorPage.d.ts.map +1 -0
- package/dist/web/components/ErrorPage.js +47 -0
- package/dist/web/components/ErrorPage.js.map +1 -0
- package/dist/web/components/ExchangePage.d.ts +11 -0
- package/dist/web/components/ExchangePage.d.ts.map +1 -0
- package/dist/web/components/ExchangePage.js +13 -0
- package/dist/web/components/ExchangePage.js.map +1 -0
- package/dist/web/components/ExpiredPage.d.ts +9 -0
- package/dist/web/components/ExpiredPage.d.ts.map +1 -0
- package/dist/web/components/ExpiredPage.js +12 -0
- package/dist/web/components/ExpiredPage.js.map +1 -0
- package/dist/web/components/ModalSkeleton.d.ts +7 -0
- package/dist/web/components/ModalSkeleton.d.ts.map +1 -0
- package/dist/web/components/ModalSkeleton.js +13 -0
- package/dist/web/components/ModalSkeleton.js.map +1 -0
- package/dist/web/components/ProgressDots.d.ts +16 -0
- package/dist/web/components/ProgressDots.d.ts.map +1 -0
- package/dist/web/components/ProgressDots.js +55 -0
- package/dist/web/components/ProgressDots.js.map +1 -0
- package/dist/web/components/QRCode.d.ts +7 -0
- package/dist/web/components/QRCode.d.ts.map +1 -0
- package/dist/web/components/QRCode.js +69 -0
- package/dist/web/components/QRCode.js.map +1 -0
- package/dist/web/components/SelectAmountPage.d.ts +21 -0
- package/dist/web/components/SelectAmountPage.d.ts.map +1 -0
- package/dist/web/components/SelectAmountPage.js +27 -0
- package/dist/web/components/SelectAmountPage.js.map +1 -0
- package/dist/web/components/SelectTokenPage.d.ts +14 -0
- package/dist/web/components/SelectTokenPage.d.ts.map +1 -0
- package/dist/web/components/SelectTokenPage.js +71 -0
- package/dist/web/components/SelectTokenPage.js.map +1 -0
- package/dist/web/components/WaitingDepositAddressPage.d.ts +15 -0
- package/dist/web/components/WaitingDepositAddressPage.d.ts.map +1 -0
- package/dist/web/components/WaitingDepositAddressPage.js +126 -0
- package/dist/web/components/WaitingDepositAddressPage.js.map +1 -0
- package/dist/web/components/WalletAmountPage.d.ts +10 -0
- package/dist/web/components/WalletAmountPage.d.ts.map +1 -0
- package/dist/web/components/WalletAmountPage.js +158 -0
- package/dist/web/components/WalletAmountPage.js.map +1 -0
- package/dist/web/components/buttons.d.ts +15 -0
- package/dist/web/components/buttons.d.ts.map +1 -0
- package/dist/web/components/buttons.js +24 -0
- package/dist/web/components/buttons.js.map +1 -0
- package/dist/web/components/containers.d.ts +19 -0
- package/dist/web/components/containers.d.ts.map +1 -0
- package/dist/web/components/containers.js +77 -0
- package/dist/web/components/containers.js.map +1 -0
- package/dist/web/components/icons.d.ts +22 -0
- package/dist/web/components/icons.d.ts.map +1 -0
- package/dist/web/components/icons.js +33 -0
- package/dist/web/components/icons.js.map +1 -0
- package/dist/web/components/shared.d.ts +93 -0
- package/dist/web/components/shared.d.ts.map +1 -0
- package/dist/web/components/shared.js +202 -0
- package/dist/web/components/shared.js.map +1 -0
- package/dist/web/hooks/DaimoClientContext.d.ts +7 -0
- package/dist/web/hooks/DaimoClientContext.d.ts.map +1 -0
- package/dist/web/hooks/DaimoClientContext.js +15 -0
- package/dist/web/hooks/DaimoClientContext.js.map +1 -0
- package/dist/web/hooks/formatUserError.d.ts +3 -0
- package/dist/web/hooks/formatUserError.d.ts.map +1 -0
- package/dist/web/hooks/formatUserError.js +30 -0
- package/dist/web/hooks/formatUserError.js.map +1 -0
- package/dist/web/hooks/locale.d.ts +7 -0
- package/dist/web/hooks/locale.d.ts.map +1 -0
- package/dist/web/hooks/locale.js +15 -0
- package/dist/web/hooks/locale.js.map +1 -0
- package/dist/web/hooks/locales/en.d.ts +60 -0
- package/dist/web/hooks/locales/en.d.ts.map +1 -0
- package/dist/web/hooks/locales/en.js +76 -0
- package/dist/web/hooks/locales/en.js.map +1 -0
- package/dist/web/hooks/locales/es.d.ts +4 -0
- package/dist/web/hooks/locales/es.d.ts.map +1 -0
- package/dist/web/hooks/locales/es.js +60 -0
- package/dist/web/hooks/locales/es.js.map +1 -0
- package/dist/web/hooks/navEvent.d.ts +60 -0
- package/dist/web/hooks/navEvent.d.ts.map +1 -0
- package/dist/web/hooks/navEvent.js +12 -0
- package/dist/web/hooks/navEvent.js.map +1 -0
- package/dist/web/hooks/types.d.ts +72 -0
- package/dist/web/hooks/types.d.ts.map +1 -0
- package/dist/web/hooks/types.js +14 -0
- package/dist/web/hooks/types.js.map +1 -0
- package/dist/web/hooks/useCopyToClipboard.d.ts +6 -0
- package/dist/web/hooks/useCopyToClipboard.d.ts.map +1 -0
- package/dist/web/hooks/useCopyToClipboard.js +20 -0
- package/dist/web/hooks/useCopyToClipboard.js.map +1 -0
- package/dist/web/hooks/usePaymentCallbacks.d.ts +15 -0
- package/dist/web/hooks/usePaymentCallbacks.d.ts.map +1 -0
- package/dist/web/hooks/usePaymentCallbacks.js +27 -0
- package/dist/web/hooks/usePaymentCallbacks.js.map +1 -0
- package/dist/web/hooks/useSessionNav.d.ts +28 -0
- package/dist/web/hooks/useSessionNav.d.ts.map +1 -0
- package/dist/web/hooks/useSessionNav.js +422 -0
- package/dist/web/hooks/useSessionNav.js.map +1 -0
- package/dist/web/hooks/useSessionPolling.d.ts +10 -0
- package/dist/web/hooks/useSessionPolling.d.ts.map +1 -0
- package/dist/web/hooks/useSessionPolling.js +60 -0
- package/dist/web/hooks/useSessionPolling.js.map +1 -0
- package/dist/web/hooks/useWalletFlow.d.ts +22 -0
- package/dist/web/hooks/useWalletFlow.d.ts.map +1 -0
- package/dist/web/hooks/useWalletFlow.js +350 -0
- package/dist/web/hooks/useWalletFlow.js.map +1 -0
- package/dist/web/hooks/walletProvider.d.ts +34 -0
- package/dist/web/hooks/walletProvider.d.ts.map +1 -0
- package/dist/web/hooks/walletProvider.js +14 -0
- package/dist/web/hooks/walletProvider.js.map +1 -0
- package/dist/web/index.d.ts +33 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +30 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/theme.css +183 -0
- package/package.json +64 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
export const arbitrum = {
|
|
2
|
+
type: "evm",
|
|
3
|
+
chainId: 42161,
|
|
4
|
+
name: "Arbitrum",
|
|
5
|
+
cctpDomain: 3,
|
|
6
|
+
lzEid: 30110,
|
|
7
|
+
};
|
|
8
|
+
export const base = {
|
|
9
|
+
type: "evm",
|
|
10
|
+
chainId: 8453,
|
|
11
|
+
name: "Base",
|
|
12
|
+
cctpDomain: 6,
|
|
13
|
+
lzEid: 30184,
|
|
14
|
+
};
|
|
15
|
+
export const bsc = {
|
|
16
|
+
type: "evm",
|
|
17
|
+
chainId: 56,
|
|
18
|
+
name: "BNB Smart Chain",
|
|
19
|
+
cctpDomain: null,
|
|
20
|
+
lzEid: 30102,
|
|
21
|
+
};
|
|
22
|
+
export const celo = {
|
|
23
|
+
type: "evm",
|
|
24
|
+
chainId: 42220,
|
|
25
|
+
name: "Celo",
|
|
26
|
+
cctpDomain: null,
|
|
27
|
+
lzEid: 30125,
|
|
28
|
+
};
|
|
29
|
+
export const ethereum = {
|
|
30
|
+
type: "evm",
|
|
31
|
+
chainId: 1,
|
|
32
|
+
name: "Ethereum",
|
|
33
|
+
cctpDomain: 0,
|
|
34
|
+
lzEid: 30101,
|
|
35
|
+
};
|
|
36
|
+
export const gnosis = {
|
|
37
|
+
type: "evm",
|
|
38
|
+
chainId: 100,
|
|
39
|
+
name: "Gnosis",
|
|
40
|
+
cctpDomain: null,
|
|
41
|
+
lzEid: 30145,
|
|
42
|
+
};
|
|
43
|
+
export const hyperEvm = {
|
|
44
|
+
type: "evm",
|
|
45
|
+
chainId: 999,
|
|
46
|
+
name: "HyperEVM",
|
|
47
|
+
cctpDomain: 19,
|
|
48
|
+
lzEid: 30367,
|
|
49
|
+
};
|
|
50
|
+
export const linea = {
|
|
51
|
+
type: "evm",
|
|
52
|
+
chainId: 59144,
|
|
53
|
+
name: "Linea",
|
|
54
|
+
cctpDomain: 11,
|
|
55
|
+
lzEid: 30183,
|
|
56
|
+
};
|
|
57
|
+
export const monad = {
|
|
58
|
+
type: "evm",
|
|
59
|
+
chainId: 143,
|
|
60
|
+
name: "Monad",
|
|
61
|
+
cctpDomain: 15,
|
|
62
|
+
lzEid: 30390,
|
|
63
|
+
};
|
|
64
|
+
export const optimism = {
|
|
65
|
+
type: "evm",
|
|
66
|
+
chainId: 10,
|
|
67
|
+
name: "Optimism",
|
|
68
|
+
cctpDomain: 2,
|
|
69
|
+
lzEid: 30111,
|
|
70
|
+
};
|
|
71
|
+
export const polygon = {
|
|
72
|
+
type: "evm",
|
|
73
|
+
chainId: 137,
|
|
74
|
+
name: "Polygon",
|
|
75
|
+
cctpDomain: 7,
|
|
76
|
+
lzEid: 30109,
|
|
77
|
+
};
|
|
78
|
+
export const scroll = {
|
|
79
|
+
type: "evm",
|
|
80
|
+
chainId: 534352,
|
|
81
|
+
name: "Scroll",
|
|
82
|
+
cctpDomain: null,
|
|
83
|
+
lzEid: 30214,
|
|
84
|
+
};
|
|
85
|
+
export const worldchain = {
|
|
86
|
+
type: "evm",
|
|
87
|
+
chainId: 480,
|
|
88
|
+
name: "Worldchain",
|
|
89
|
+
cctpDomain: 14,
|
|
90
|
+
lzEid: 30319,
|
|
91
|
+
};
|
|
92
|
+
//
|
|
93
|
+
// Non-EVM chains: source only
|
|
94
|
+
//
|
|
95
|
+
export const tron = {
|
|
96
|
+
type: "tron",
|
|
97
|
+
chainId: 728126428,
|
|
98
|
+
name: "Tron",
|
|
99
|
+
cctpDomain: null,
|
|
100
|
+
lzEid: 30420,
|
|
101
|
+
};
|
|
102
|
+
export const solana = {
|
|
103
|
+
type: "solana",
|
|
104
|
+
chainId: 501,
|
|
105
|
+
name: "Solana",
|
|
106
|
+
cctpDomain: 5,
|
|
107
|
+
lzEid: 30168,
|
|
108
|
+
};
|
|
109
|
+
export const supportedChains = [
|
|
110
|
+
arbitrum,
|
|
111
|
+
base,
|
|
112
|
+
bsc,
|
|
113
|
+
celo,
|
|
114
|
+
ethereum,
|
|
115
|
+
gnosis,
|
|
116
|
+
hyperEvm,
|
|
117
|
+
linea,
|
|
118
|
+
monad,
|
|
119
|
+
optimism,
|
|
120
|
+
polygon,
|
|
121
|
+
scroll,
|
|
122
|
+
worldchain,
|
|
123
|
+
solana,
|
|
124
|
+
tron,
|
|
125
|
+
];
|
|
126
|
+
/** Given a chainId, return the chain. */
|
|
127
|
+
export function getChainById(chainId) {
|
|
128
|
+
const ret = supportedChains.find((c) => c.chainId === chainId);
|
|
129
|
+
if (ret == null)
|
|
130
|
+
throw new Error(`unknown chainId ${chainId}`);
|
|
131
|
+
return ret;
|
|
132
|
+
}
|
|
133
|
+
/** Returns the chain name for the given chainId. */
|
|
134
|
+
export function getChainName(chainId) {
|
|
135
|
+
return getChainById(chainId).name;
|
|
136
|
+
}
|
|
137
|
+
/** Returns the CCTP domain for the given chainId. */
|
|
138
|
+
export function getCCTPDomain(chainId) {
|
|
139
|
+
return getChainById(chainId).cctpDomain;
|
|
140
|
+
}
|
|
141
|
+
/** Returns the LayerZero endpoint ID for the given chainId. */
|
|
142
|
+
export function getLZEid(chainId) {
|
|
143
|
+
return getChainById(chainId).lzEid;
|
|
144
|
+
}
|
|
145
|
+
export function getChainExplorerByChainId(chainId) {
|
|
146
|
+
switch (chainId) {
|
|
147
|
+
case arbitrum.chainId:
|
|
148
|
+
return "https://arbiscan.io";
|
|
149
|
+
case base.chainId:
|
|
150
|
+
return "https://basescan.org";
|
|
151
|
+
case bsc.chainId:
|
|
152
|
+
return "https://bscscan.com";
|
|
153
|
+
case celo.chainId:
|
|
154
|
+
return "https://celoscan.io";
|
|
155
|
+
case ethereum.chainId:
|
|
156
|
+
return "https://etherscan.io";
|
|
157
|
+
case gnosis.chainId:
|
|
158
|
+
return "https://gnosisscan.io";
|
|
159
|
+
case hyperEvm.chainId:
|
|
160
|
+
return "https://hyperevmscan.io";
|
|
161
|
+
case linea.chainId:
|
|
162
|
+
return "https://lineascan.build";
|
|
163
|
+
case monad.chainId:
|
|
164
|
+
return "https://monadvision.com";
|
|
165
|
+
case optimism.chainId:
|
|
166
|
+
return "https://optimistic.etherscan.io";
|
|
167
|
+
case polygon.chainId:
|
|
168
|
+
return "https://polygonscan.com";
|
|
169
|
+
case scroll.chainId:
|
|
170
|
+
return "https://scrollscan.com";
|
|
171
|
+
case solana.chainId:
|
|
172
|
+
return "https://solscan.io";
|
|
173
|
+
case tron.chainId:
|
|
174
|
+
return "https://tronscan.org";
|
|
175
|
+
case worldchain.chainId:
|
|
176
|
+
return "https://worldscan.org";
|
|
177
|
+
default:
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export function getChainExplorerAddressUrl(chainId, address) {
|
|
182
|
+
const explorer = getChainExplorerByChainId(chainId);
|
|
183
|
+
if (!explorer)
|
|
184
|
+
return undefined;
|
|
185
|
+
if (chainId === tron.chainId)
|
|
186
|
+
return `${explorer}/#/address/${address}`;
|
|
187
|
+
return `${explorer}/address/${address}`;
|
|
188
|
+
}
|
|
189
|
+
export function getChainExplorerTxUrl(chainId, txHash) {
|
|
190
|
+
const explorer = getChainExplorerByChainId(chainId);
|
|
191
|
+
if (!explorer)
|
|
192
|
+
return undefined;
|
|
193
|
+
if (chainId === tron.chainId) {
|
|
194
|
+
return `${explorer}/#/transaction/${txHash.replace("0x", "")}`;
|
|
195
|
+
}
|
|
196
|
+
return `${explorer}/tx/${txHash}`;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/common/chain.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,UAAU;IAChB,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAU;IACxB,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,iBAAiB;IACvB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,KAAK;IACd,IAA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AAC,OAAO;YACrB,OAAO,uBAAuB,CAAC;QACjC;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,OAAe,EACf,OAAe;IAEf,MAAM,QAAQ,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,QAAQ,cAAc,OAAO,EAAE,CAAC;IACxE,OAAO,GAAG,QAAQ,YAAY,OAAO,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,OAAe,EACf,MAAc;IAEd,MAAM,QAAQ,GAAG,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;QAC7B,OAAO,GAAG,QAAQ,kBAAkB,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;IACjE,CAAC;IACD,OAAO,GAAG,QAAQ,OAAO,MAAM,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ApiError = {
|
|
2
|
+
type: string;
|
|
3
|
+
code: string;
|
|
4
|
+
message: string;
|
|
5
|
+
param?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ApiErrorEnvelope = {
|
|
8
|
+
error: ApiError;
|
|
9
|
+
};
|
|
10
|
+
export type DaimoRequestErrorArgs = {
|
|
11
|
+
status: number;
|
|
12
|
+
message: string;
|
|
13
|
+
requestId?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
code?: string;
|
|
16
|
+
param?: string;
|
|
17
|
+
raw?: unknown;
|
|
18
|
+
};
|
|
19
|
+
export declare class DaimoRequestError extends Error {
|
|
20
|
+
readonly status: number;
|
|
21
|
+
readonly requestId?: string;
|
|
22
|
+
readonly type?: string;
|
|
23
|
+
readonly code?: string;
|
|
24
|
+
readonly param?: string;
|
|
25
|
+
readonly raw?: unknown;
|
|
26
|
+
constructor(args: DaimoRequestErrorArgs);
|
|
27
|
+
}
|
|
28
|
+
export declare function getApiErrorEnvelope(value: unknown): ApiErrorEnvelope | null;
|
|
29
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;gBAEX,IAAI,EAAE,qBAAqB;CAUxC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAwB3E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export class DaimoRequestError extends Error {
|
|
2
|
+
status;
|
|
3
|
+
requestId;
|
|
4
|
+
type;
|
|
5
|
+
code;
|
|
6
|
+
param;
|
|
7
|
+
raw;
|
|
8
|
+
constructor(args) {
|
|
9
|
+
super(args.message);
|
|
10
|
+
this.name = "DaimoRequestError";
|
|
11
|
+
this.status = args.status;
|
|
12
|
+
this.requestId = args.requestId;
|
|
13
|
+
this.type = args.type;
|
|
14
|
+
this.code = args.code;
|
|
15
|
+
this.param = args.param;
|
|
16
|
+
this.raw = args.raw;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function getApiErrorEnvelope(value) {
|
|
20
|
+
if (typeof value !== "object" || value == null)
|
|
21
|
+
return null;
|
|
22
|
+
const candidate = value;
|
|
23
|
+
if (typeof candidate.error !== "object" || candidate.error == null) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const error = candidate.error;
|
|
27
|
+
if (typeof error.type !== "string" ||
|
|
28
|
+
typeof error.code !== "string" ||
|
|
29
|
+
typeof error.message !== "string") {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
error: {
|
|
34
|
+
type: error.type,
|
|
35
|
+
code: error.code,
|
|
36
|
+
message: error.message,
|
|
37
|
+
param: typeof error.param === "string" ? error.param : undefined,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,MAAM,CAAS;IACf,SAAS,CAAU;IACnB,IAAI,CAAU;IACd,IAAI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AAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;SACjE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type UUID = string;
|
|
3
|
+
export type SolanaAddress = string;
|
|
4
|
+
export type SolanaTxHash = string;
|
|
5
|
+
export type TronAddress = string;
|
|
6
|
+
export type TronTxHash = string;
|
|
7
|
+
export declare const zUUID: z.ZodString;
|
|
8
|
+
export declare const zAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
9
|
+
export declare const zHex: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
10
|
+
export declare const zTronAddress: z.ZodString;
|
|
11
|
+
export declare const zSolanaAddress: z.ZodString;
|
|
12
|
+
export declare const zUnixTimestamp: z.ZodNumber;
|
|
13
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/common/primitives.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,KAAK,aAAoB,CAAC;AAEvC,eAAO,MAAM,QAAQ,kDAAqD,CAAC;AAE3E,eAAO,MAAM,IAAI,kDAGuB,CAAC;AAEzC,eAAO,MAAM,YAAY,aAAkD,CAAC;AAE5E,eAAO,MAAM,cAAc,aAEc,CAAC;AAE1C,eAAO,MAAM,cAAc,aAAiC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getAddress } from "viem";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const zUUID = z.string().uuid();
|
|
4
|
+
export const zAddress = z.string().transform((value) => getAddress(value));
|
|
5
|
+
export const zHex = z
|
|
6
|
+
.string()
|
|
7
|
+
.regex(/^0x[0-9a-fA-F]*$/)
|
|
8
|
+
.refine((value) => true);
|
|
9
|
+
export const zTronAddress = z.string().regex(/^T[1-9A-HJ-NP-Za-km-z]{33}$/);
|
|
10
|
+
export const zSolanaAddress = z
|
|
11
|
+
.string()
|
|
12
|
+
.regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/);
|
|
13
|
+
export const zUnixTimestamp = z.number().int().nonnegative();
|
|
14
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/common/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAO,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;KAClB,MAAM,EAAE;KACR,KAAK,CAAC,kBAAkB,CAAC;KACzB,MAAM,CAAC,CAAC,KAAK,EAAgB,EAAE,CAAC,IAAI,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,KAAK,CAAC,+BAA+B,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Address, Hex } from "viem";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { SolanaAddress, SolanaTxHash, TronAddress, TronTxHash, UUID } from "./primitives.js";
|
|
4
|
+
export declare const zSessionStatus: z.ZodEnum<["requires_payment_method", "waiting_payment", "processing", "succeeded", "bounced", "expired"]>;
|
|
5
|
+
export type SessionStatus = z.infer<typeof zSessionStatus>;
|
|
6
|
+
/** UI display metadata. */
|
|
7
|
+
export type SessionDisplay = {
|
|
8
|
+
/** Title shown in the payment modal, e.g. "Deposit to Acme". */
|
|
9
|
+
title: string;
|
|
10
|
+
/** One-word verb for CTAs, e.g. "Deposit". */
|
|
11
|
+
verb: string;
|
|
12
|
+
/** Optional custom theme CSS URL. */
|
|
13
|
+
themeCssUrl?: string;
|
|
14
|
+
};
|
|
15
|
+
export type SessionDestination = SessionDestinationEvm;
|
|
16
|
+
export type SessionDestinationEvm = {
|
|
17
|
+
type: "evm";
|
|
18
|
+
/** Destination address, checksum encoded. */
|
|
19
|
+
address: Address;
|
|
20
|
+
/** Chain ID, e.g. 8453. */
|
|
21
|
+
chainId: number;
|
|
22
|
+
/** Chain name, e.g. "base". */
|
|
23
|
+
chainName: string;
|
|
24
|
+
/** Destination token address, checksum encoded. */
|
|
25
|
+
tokenAddress: Address;
|
|
26
|
+
/** Destination token symbol, e.g. "USDC". */
|
|
27
|
+
tokenSymbol: string;
|
|
28
|
+
/**
|
|
29
|
+
* Requested amount in destination token units. e.g. "1.23" for $1.23 USDC.
|
|
30
|
+
* Omitted for open-amount sessions.
|
|
31
|
+
*/
|
|
32
|
+
amountUnits?: string;
|
|
33
|
+
/** Optional calldata for the destination transaction. */
|
|
34
|
+
calldata?: Hex;
|
|
35
|
+
/**
|
|
36
|
+
* Present when status is "succeeded" or "bounced".
|
|
37
|
+
* On success, the delivery tx and amount received by the destination.
|
|
38
|
+
* On bounce, the refund tx and amount returned to the refundAddress.
|
|
39
|
+
*/
|
|
40
|
+
delivery?: {
|
|
41
|
+
/** Transaction hash of the delivery or refund. */
|
|
42
|
+
txHash: Hex;
|
|
43
|
+
/** Amount received in destination token units, e.g. "1.23". */
|
|
44
|
+
receivedUnits: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type PaymentMethod = PaymentMethodEvm | PaymentMethodTron | PaymentMethodSolana;
|
|
48
|
+
export type PaymentMethodEvm = {
|
|
49
|
+
type: "evm";
|
|
50
|
+
/** Address that receives user's funds, checksum encoded. */
|
|
51
|
+
receiverAddress: Address;
|
|
52
|
+
/** Populated once user initiates a transaction. */
|
|
53
|
+
source?: {
|
|
54
|
+
/** Sender address, checksum encoded. */
|
|
55
|
+
address?: Address;
|
|
56
|
+
/** Source chain ID, e.g. 8453. */
|
|
57
|
+
chainId: number;
|
|
58
|
+
/** Source chain name, e.g. "base". */
|
|
59
|
+
chainName: string;
|
|
60
|
+
/** Source token address, checksum encoded. */
|
|
61
|
+
tokenAddress: Address;
|
|
62
|
+
/** Source token symbol, e.g. "USDC". */
|
|
63
|
+
tokenSymbol: string;
|
|
64
|
+
/** Amount sent in source token units, e.g. "1.23". */
|
|
65
|
+
sentUnits: string;
|
|
66
|
+
/** Source transaction hash, set once tx is confirmed. */
|
|
67
|
+
txHash?: Hex;
|
|
68
|
+
};
|
|
69
|
+
/** When this payment method was created (unix seconds). */
|
|
70
|
+
createdAt: number;
|
|
71
|
+
};
|
|
72
|
+
export type PaymentMethodTron = {
|
|
73
|
+
type: "tron";
|
|
74
|
+
/** Address that receives user's funds. */
|
|
75
|
+
receiverAddress: TronAddress;
|
|
76
|
+
/** Populated once user initiates a transaction. */
|
|
77
|
+
source?: {
|
|
78
|
+
/** Sender address. */
|
|
79
|
+
address?: TronAddress;
|
|
80
|
+
chainId: 728126428;
|
|
81
|
+
chainName: "tron";
|
|
82
|
+
/** Source token address. */
|
|
83
|
+
tokenAddress: TronAddress;
|
|
84
|
+
/** Source token symbol, e.g. "USDT". */
|
|
85
|
+
tokenSymbol: string;
|
|
86
|
+
/** Amount sent in source token units, e.g. "1.23". */
|
|
87
|
+
sentUnits: string;
|
|
88
|
+
/** Source transaction hash, set once tx is confirmed. */
|
|
89
|
+
txHash?: TronTxHash;
|
|
90
|
+
};
|
|
91
|
+
/** When this payment method was created (unix seconds). */
|
|
92
|
+
createdAt: number;
|
|
93
|
+
};
|
|
94
|
+
export type PaymentMethodSolana = {
|
|
95
|
+
type: "solana";
|
|
96
|
+
/** Populated once user initiates a transaction. */
|
|
97
|
+
source?: {
|
|
98
|
+
/** Sender address. */
|
|
99
|
+
address?: SolanaAddress;
|
|
100
|
+
chainId: 501;
|
|
101
|
+
chainName: "solana";
|
|
102
|
+
/** Source token address (mint). */
|
|
103
|
+
tokenAddress: SolanaAddress;
|
|
104
|
+
/** Source token symbol, e.g. "USDC". */
|
|
105
|
+
tokenSymbol: string;
|
|
106
|
+
/** Amount sent in source token units, e.g. "1.23". */
|
|
107
|
+
sentUnits: string;
|
|
108
|
+
/** Source transaction hash, set once tx is confirmed. */
|
|
109
|
+
txHash?: SolanaTxHash;
|
|
110
|
+
};
|
|
111
|
+
/** When this payment method was created (unix seconds). */
|
|
112
|
+
createdAt: number;
|
|
113
|
+
};
|
|
114
|
+
export type UserMetadata = Record<string, string> | null;
|
|
115
|
+
export type SessionPublicInfo = {
|
|
116
|
+
/** Unique ID for this session. */
|
|
117
|
+
sessionId: UUID;
|
|
118
|
+
/** Overall status. */
|
|
119
|
+
status: SessionStatus;
|
|
120
|
+
/** Funds destination. */
|
|
121
|
+
destination: SessionDestination;
|
|
122
|
+
/** Display metadata for UI rendering. */
|
|
123
|
+
display: SessionDisplay;
|
|
124
|
+
/** Latest payment method. */
|
|
125
|
+
paymentMethod: PaymentMethod | null;
|
|
126
|
+
/** Created at (unix seconds). */
|
|
127
|
+
createdAt: number;
|
|
128
|
+
/** Expires at (unix seconds). */
|
|
129
|
+
expiresAt: number;
|
|
130
|
+
};
|
|
131
|
+
/** Full server view. */
|
|
132
|
+
export type Session = SessionPublicInfo & {
|
|
133
|
+
/** Metadata set at creation time. */
|
|
134
|
+
metadata: UserMetadata;
|
|
135
|
+
/** Session-scoped secret for client lifecycle management. */
|
|
136
|
+
clientSecret: string;
|
|
137
|
+
};
|
|
138
|
+
export declare function isSessionTerminal(status: SessionStatus): boolean;
|
|
139
|
+
export declare function isSessionActive(status: SessionStatus): boolean;
|
|
140
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/common/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,UAAU,EACV,IAAI,EACL,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,cAAc,4GAOzB,CAAC;AAEH,MAAM,MAAM,aAA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MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kCAAkC;IAClC,SAAS,EAAE,IAAI,CAAC;IAChB,sBAAsB;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,yBAAyB;IACzB,WAAW,EAAE,kBAAkB,CAAC;IAChC,yCAAyC;IACzC,OAAO,EAAE,cAAc,CAAC;IACxB,6BAA6B;IAC7B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAwB;AACxB,MAAM,MAAM,OAAO,GAAG,iBAAiB,GAAG;IACxC,qCAAqC;IACrC,QAAQ,EAAE,YAAY,CAAC;IACvB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAEhE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAE9D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const zSessionStatus = z.enum([
|
|
3
|
+
"requires_payment_method",
|
|
4
|
+
"waiting_payment",
|
|
5
|
+
"processing",
|
|
6
|
+
"succeeded",
|
|
7
|
+
"bounced",
|
|
8
|
+
"expired",
|
|
9
|
+
]);
|
|
10
|
+
export function isSessionTerminal(status) {
|
|
11
|
+
return status === "succeeded" || status === "bounced" || status === "expired";
|
|
12
|
+
}
|
|
13
|
+
export function isSessionActive(status) {
|
|
14
|
+
return !isSessionTerminal(status);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/common/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,yBAAyB;IACzB,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAqJH,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAqB;IACnD,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export type Token = {
|
|
3
|
+
/** Chain ID, eg 10 for OP Mainnet */
|
|
4
|
+
chainId: number;
|
|
5
|
+
/** Ethereum (capitalized) or Solana token address */
|
|
6
|
+
token: `0x${string}` | string;
|
|
7
|
+
/** Name, eg "Wrapped Bitcoin" */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Symbol, eg "WBTC" */
|
|
10
|
+
symbol: string;
|
|
11
|
+
/** Token decimals, eg 8 for WBTC */
|
|
12
|
+
decimals: number;
|
|
13
|
+
/** Fiat ISO code for stablecoins, eg "USD" or "EUR" */
|
|
14
|
+
fiatISO?: string;
|
|
15
|
+
/** Logo preview data URI. Generally SVG or 64x64 PNG. */
|
|
16
|
+
logoURI: TokenLogo | string;
|
|
17
|
+
/** Original source image URL. */
|
|
18
|
+
logoSourceURI: string;
|
|
19
|
+
};
|
|
20
|
+
export declare enum TokenLogo {
|
|
21
|
+
BNB = "https://daimo.com/coin-logos/bnb.png",
|
|
22
|
+
CELO = "https://daimo.com/coin-logos/celo.png",
|
|
23
|
+
cUSD = "https://daimo.com/coin-logos/cusd.png",
|
|
24
|
+
DAI = "https://daimo.com/coin-logos/dai.png",
|
|
25
|
+
ETH = "https://daimo.com/coin-logos/eth.png",
|
|
26
|
+
EURC = "https://daimo.com/coin-logos/eurc.png",
|
|
27
|
+
EURe = "https://daimo.com/coin-logos/eure.png",
|
|
28
|
+
HYPE = "https://daimo.com/coin-logos/hype.png",
|
|
29
|
+
MON = "https://daimo.com/coin-logos/mon.png",
|
|
30
|
+
POL = "https://daimo.com/coin-logos/pol.png",
|
|
31
|
+
SOL = "https://daimo.com/coin-logos/sol.png",
|
|
32
|
+
USDBc = "https://daimo.com/coin-logos/usdbc.png",
|
|
33
|
+
USDC = "https://daimo.com/coin-logos/usdc.png",
|
|
34
|
+
USDT = "https://daimo.com/coin-logos/usdt.png",
|
|
35
|
+
WBTC = "https://daimo.com/coin-logos/wbtc.png",
|
|
36
|
+
WETH = "https://daimo.com/coin-logos/weth.png",
|
|
37
|
+
WLD = "https://daimo.com/coin-logos/wld.jpeg",
|
|
38
|
+
XDAI = "https://daimo.com/coin-logos/xdai.png"
|
|
39
|
+
}
|
|
40
|
+
export declare const arbitrumETH: Token;
|
|
41
|
+
export declare const arbitrumWETH: Token;
|
|
42
|
+
export declare const arbitrumUSDC: Token;
|
|
43
|
+
export declare const arbitrumDAI: Token;
|
|
44
|
+
export declare const arbitrumUSDT: Token;
|
|
45
|
+
export declare const arbitrumUSDCe: Token;
|
|
46
|
+
export declare const baseETH: Token;
|
|
47
|
+
export declare const baseWETH: Token;
|
|
48
|
+
export declare const baseUSDC: Token;
|
|
49
|
+
export declare const baseEURC: Token;
|
|
50
|
+
export declare const baseUSDbC: Token;
|
|
51
|
+
export declare const baseDAI: Token;
|
|
52
|
+
export declare const baseUSDT: Token;
|
|
53
|
+
export declare const bscBNB: Token;
|
|
54
|
+
export declare const bscWBNB: Token;
|
|
55
|
+
export declare const bscUSDC: Token;
|
|
56
|
+
export declare const bscUSDT: Token;
|
|
57
|
+
export declare const celoCelo: Token;
|
|
58
|
+
export declare const celoUSDC: Token;
|
|
59
|
+
export declare const celoUSDT: Token;
|
|
60
|
+
export declare const celoCUSD: Token;
|
|
61
|
+
export declare const ethereumETH: Token;
|
|
62
|
+
export declare const ethereumWETH: Token;
|
|
63
|
+
export declare const ethereumUSDC: Token;
|
|
64
|
+
export declare const ethereumDAI: Token;
|
|
65
|
+
export declare const ethereumUSDT: Token;
|
|
66
|
+
export declare const ethereumEURC: Token;
|
|
67
|
+
export declare const gnosisXDAI: Token;
|
|
68
|
+
export declare const gnosisUSDCe: Token;
|
|
69
|
+
export declare const gnosisEURe: Token;
|
|
70
|
+
export declare const hyperEvmHYPE: Token;
|
|
71
|
+
export declare const hyperEvmWHYPE: Token;
|
|
72
|
+
export declare const hyperEvmUSDC: Token;
|
|
73
|
+
export declare const lineaETH: Token;
|
|
74
|
+
export declare const lineaWETH: Token;
|
|
75
|
+
export declare const lineaUSDC: Token;
|
|
76
|
+
export declare const lineaDAI: Token;
|
|
77
|
+
export declare const monadMON: Token;
|
|
78
|
+
export declare const monadWMON: Token;
|
|
79
|
+
export declare const monadUSDC: Token;
|
|
80
|
+
export declare const monadUSDT: Token;
|
|
81
|
+
export declare const optimismETH: Token;
|
|
82
|
+
export declare const optimismWETH: Token;
|
|
83
|
+
export declare const optimismUSDC: Token;
|
|
84
|
+
export declare const optimismDAI: Token;
|
|
85
|
+
export declare const optimismUSDT: Token;
|
|
86
|
+
export declare const optimismUSDCe: Token;
|
|
87
|
+
export declare const polygonPOL: Token;
|
|
88
|
+
export declare const polygonWPOL: Token;
|
|
89
|
+
export declare const polygonWETH: Token;
|
|
90
|
+
export declare const polygonUSDC: Token;
|
|
91
|
+
export declare const polygonDAI: Token;
|
|
92
|
+
export declare const polygonUSDT: Token;
|
|
93
|
+
export declare const polygonUSDCe: Token;
|
|
94
|
+
export declare const scrollETH: Token;
|
|
95
|
+
export declare const scrollWETH: Token;
|
|
96
|
+
export declare const scrollUSDC: Token;
|
|
97
|
+
export declare const scrollUSDT: Token;
|
|
98
|
+
export declare const solanaSOL: Token;
|
|
99
|
+
export declare const solanaWSOL: Token;
|
|
100
|
+
export declare const solanaUSDC: Token;
|
|
101
|
+
export declare const solanaUSDT: Token;
|
|
102
|
+
export declare const tronUSDT: Token;
|
|
103
|
+
export declare const worldchainETH: Token;
|
|
104
|
+
export declare const worldchainWETH: Token;
|
|
105
|
+
export declare const worldchainWBTC: Token;
|
|
106
|
+
export declare const worldchainUSDC: Token;
|
|
107
|
+
export declare const worldchainWLD: Token;
|
|
108
|
+
export declare const knownTokens: Token[];
|
|
109
|
+
export declare function getKnownToken(chainId: number, tokenAddress: string): Token | undefined;
|
|
110
|
+
export declare function isNativeToken(chainId: number, token: Address): boolean;
|
|
111
|
+
export declare function getChainNativeToken(chainId: number): Token;
|
|
112
|
+
export declare function getChainWrappedNativeToken(chainId: number): Token;
|
|
113
|
+
export declare function getChainNativeUSDC(chainId: number): Token | undefined;
|
|
114
|
+
/** Returns native USDC when available, otherwise bridged USDC. */
|
|
115
|
+
export declare function getChainBestUSDC(chainId: number): Token | undefined;
|
|
116
|
+
export declare function getChainDAI(chainId: number): Token | undefined;
|
|
117
|
+
/** Returns true if two tokens are equal (same chain and token address). */
|
|
118
|
+
export declare function tokensEqual(a: Token, b: Token): boolean;
|
|
119
|
+
export declare function isNativeOrWrappedNative(chainId: number, tokenAddr: string): boolean;
|
|
120
|
+
export declare function getWrappedAddressForLookup(chainId: number, tokenAddr: string): string;
|
|
121
|
+
export declare function token({ chainId, token, name, symbol, decimals, fiatISO, logoURI, }: {
|
|
122
|
+
chainId: number;
|
|
123
|
+
token: Address | string;
|
|
124
|
+
name: string;
|
|
125
|
+
symbol: string;
|
|
126
|
+
decimals: number;
|
|
127
|
+
fiatISO?: string;
|
|
128
|
+
logoURI: string;
|
|
129
|
+
}): Token;
|
|
130
|
+
//# sourceMappingURL=token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/common/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,MAAM,CA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