@rozoai/intent-pay 0.0.29-beta.2 → 0.0.29-beta.20
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/build/components/Common/ConnectorList/index.d.ts +3 -1
- package/build/hooks/useDepositAddressOptions.d.ts +2 -1
- package/build/hooks/usePaymentState.d.ts +5 -1
- package/build/package.json.js +6 -3
- package/build/package.json.js.map +1 -1
- package/build/src/components/Common/AmountInput/index.js +1 -1
- package/build/src/components/Common/AmountInput/index.js.map +1 -1
- package/build/src/components/Common/ConnectorList/index.js +12 -7
- package/build/src/components/Common/ConnectorList/index.js.map +1 -1
- package/build/src/components/Common/Modal/styles.js +8 -15
- package/build/src/components/Common/Modal/styles.js.map +1 -1
- package/build/src/components/Common/OrderHeader/index.js +7 -4
- package/build/src/components/Common/OrderHeader/index.js.map +1 -1
- package/build/src/components/Common/SelectAnotherMethodButton/index.js +6 -3
- package/build/src/components/Common/SelectAnotherMethodButton/index.js.map +1 -1
- package/build/src/components/Pages/Confirmation/index.js +27 -23
- package/build/src/components/Pages/Confirmation/index.js.map +1 -1
- package/build/src/components/Pages/Connectors/index.js +11 -4
- package/build/src/components/Pages/Connectors/index.js.map +1 -1
- package/build/src/components/Pages/DownloadApp/index.js +0 -1
- package/build/src/components/Pages/DownloadApp/index.js.map +1 -1
- package/build/src/components/Pages/MobileConnectors/index.js +8 -2
- package/build/src/components/Pages/MobileConnectors/index.js.map +1 -1
- package/build/src/components/Pages/SelectDepositAddressAmount/index.js +0 -1
- package/build/src/components/Pages/SelectDepositAddressAmount/index.js.map +1 -1
- package/build/src/components/Pages/SelectMethod/index.js +4 -4
- package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
- package/build/src/components/Pages/SelectWalletAmount/index.js +1 -1
- package/build/src/components/Pages/SelectWalletAmount/index.js.map +1 -1
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +3 -3
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js +3 -3
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js.map +1 -1
- package/build/src/components/Pages/WaitingDepositAddress/index.js +0 -2
- package/build/src/components/Pages/WaitingDepositAddress/index.js.map +1 -1
- package/build/src/hooks/useDepositAddressOptions.js +10 -6
- package/build/src/hooks/useDepositAddressOptions.js.map +1 -1
- package/build/src/hooks/usePaymentState.js +66 -72
- package/build/src/hooks/usePaymentState.js.map +1 -1
- package/build/src/hooks/useSolanaPaymentOptions.js +26 -4
- package/build/src/hooks/useSolanaPaymentOptions.js.map +1 -1
- package/build/src/hooks/useStellarPaymentOptions.js +8 -6
- package/build/src/hooks/useStellarPaymentOptions.js.map +1 -1
- package/build/src/hooks/useWalletPaymentOptions.js +61 -48
- package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
- package/build/src/provider/DaimoPayProvider.js +3 -3
- package/build/src/provider/DaimoPayProvider.js.map +1 -1
- package/build/src/provider/StellarContextProvider.js +11 -0
- package/build/src/provider/StellarContextProvider.js.map +1 -1
- package/build/src/utils/format.js +7 -2
- package/build/src/utils/format.js.map +1 -1
- package/build/src/utils/index.js +11 -1
- package/build/src/utils/index.js.map +1 -1
- package/build/src/utils/stellar/types.js +67 -0
- package/build/src/utils/stellar/types.js.map +1 -0
- package/build/src/utils/stellar/walletconnect.module.js +251 -0
- package/build/src/utils/stellar/walletconnect.module.js.map +1 -0
- package/build/src/wallets/walletConfigs.js +29 -28
- package/build/src/wallets/walletConfigs.js.map +1 -1
- package/build/utils/index.d.ts +5 -0
- package/build/utils/stellar/index.d.ts +6 -0
- package/build/utils/stellar/types.d.ts +41 -0
- package/build/utils/stellar/walletconnect.module.d.ts +87 -0
- package/build/wallets/walletConfigs.d.ts +6 -1
- package/package.json +6 -3
|
@@ -40,8 +40,8 @@ const walletConfigs = {
|
|
|
40
40
|
},
|
|
41
41
|
showInMobileConnectors: true,
|
|
42
42
|
deeplinkScheme: "cbwallet://",
|
|
43
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
44
|
-
return
|
|
43
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
44
|
+
return `cbwallet://dapp?url=${customDeeplink ?? getEncodedRozoPayUrl(payId, appId)}`;
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
// baseAccount: {
|
|
@@ -59,7 +59,7 @@ const walletConfigs = {
|
|
|
59
59
|
// },
|
|
60
60
|
// showInMobileConnectors: false,
|
|
61
61
|
// deeplinkScheme: "cbwallet://",
|
|
62
|
-
// getRozoPayDeeplink: (payId: string) => {
|
|
62
|
+
// getRozoPayDeeplink: ({payId, ref, appId, customDeeplink}: {payId: string; ref?: string; appId?: string; customDeeplink?: string}) => {
|
|
63
63
|
// return "cbwallet://dapp?url=" + getEncodedRozoPayUrl(payId);
|
|
64
64
|
// },
|
|
65
65
|
// },
|
|
@@ -69,8 +69,8 @@ const walletConfigs = {
|
|
|
69
69
|
icon: jsx(Logos.Backpack, {}),
|
|
70
70
|
iconShape: "squircle",
|
|
71
71
|
showInMobileConnectors: true,
|
|
72
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
73
|
-
const url = encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
72
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
73
|
+
const url = customDeeplink ?? encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
74
74
|
return `https://backpack.app/ul/v1/browse/${url}`;
|
|
75
75
|
},
|
|
76
76
|
},
|
|
@@ -80,8 +80,8 @@ const walletConfigs = {
|
|
|
80
80
|
iconShape: "squircle",
|
|
81
81
|
showInMobileConnectors: true,
|
|
82
82
|
deeplinkScheme: "bitkeep://",
|
|
83
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
84
|
-
return
|
|
83
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
84
|
+
return `bitkeep://bkconnect?action=dapp&url=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
"co.family.wallet": {
|
|
@@ -95,8 +95,8 @@ const walletConfigs = {
|
|
|
95
95
|
ios: "https://family.co/download",
|
|
96
96
|
},
|
|
97
97
|
deeplinkScheme: "familywallet://",
|
|
98
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
99
|
-
return
|
|
98
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
99
|
+
return `familywallet://browser?url=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
100
100
|
},
|
|
101
101
|
showInMobileConnectors: true,
|
|
102
102
|
},
|
|
@@ -118,9 +118,9 @@ const walletConfigs = {
|
|
|
118
118
|
},
|
|
119
119
|
showInMobileConnectors: false,
|
|
120
120
|
deeplinkScheme: "metamask://",
|
|
121
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
122
|
-
const rozoPayUrl = getRozoPayUrl(payId, appId);
|
|
123
|
-
return
|
|
121
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
122
|
+
const rozoPayUrl = customDeeplink ?? getRozoPayUrl(payId, appId);
|
|
123
|
+
return `https://metamask.app.link/dapp/${rozoPayUrl.replace("https://", "")}`;
|
|
124
124
|
},
|
|
125
125
|
},
|
|
126
126
|
"app.phantom": {
|
|
@@ -129,8 +129,8 @@ const walletConfigs = {
|
|
|
129
129
|
iconShape: "squircle",
|
|
130
130
|
showInMobileConnectors: true,
|
|
131
131
|
deeplinkScheme: "phantom://",
|
|
132
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
133
|
-
const url = encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
132
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
133
|
+
const url = customDeeplink ?? encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
134
134
|
const urlRef = encodeURIComponent(ref || window.location.origin);
|
|
135
135
|
return `https://phantom.app/ul/browse/${url}?ref=${urlRef}`;
|
|
136
136
|
},
|
|
@@ -140,7 +140,7 @@ const walletConfigs = {
|
|
|
140
140
|
// icon: <Logos.Farcaster />,
|
|
141
141
|
// iconShape: "squircle",
|
|
142
142
|
// showInMobileConnectors: true,
|
|
143
|
-
// getRozoPayDeeplink: (payId: string
|
|
143
|
+
// getRozoPayDeeplink: ({payId, ref, appId, customDeeplink}: {payId: string; ref?: string; appId?: string; customDeeplink?: string}) => {
|
|
144
144
|
// return (
|
|
145
145
|
// "https://farcaster.xyz/miniapps/sGRsevnRvM9P/rozo-pay/?id=" + payId
|
|
146
146
|
// );
|
|
@@ -151,9 +151,10 @@ const walletConfigs = {
|
|
|
151
151
|
icon: jsx(Logos.MiniPay, {}),
|
|
152
152
|
iconShape: "squircle",
|
|
153
153
|
showInMobileConnectors: true,
|
|
154
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
155
|
-
|
|
156
|
-
encodeURIComponent(getEncodedRozoPayUrl(payId, appId))
|
|
154
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
155
|
+
const url = customDeeplink ??
|
|
156
|
+
encodeURIComponent(getEncodedRozoPayUrl(payId, appId));
|
|
157
|
+
return `https://cash.minipay.xyz/browse?url=${url}`;
|
|
157
158
|
},
|
|
158
159
|
},
|
|
159
160
|
"me.rainbow": {
|
|
@@ -172,8 +173,8 @@ const walletConfigs = {
|
|
|
172
173
|
},
|
|
173
174
|
showInMobileConnectors: true,
|
|
174
175
|
deeplinkScheme: "rainbow://",
|
|
175
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
176
|
-
return
|
|
176
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
177
|
+
return `rainbow://dapp?url=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
177
178
|
},
|
|
178
179
|
},
|
|
179
180
|
// "io.rabby": {
|
|
@@ -200,8 +201,8 @@ const walletConfigs = {
|
|
|
200
201
|
},
|
|
201
202
|
showInMobileConnectors: true,
|
|
202
203
|
deeplinkScheme: "trust://",
|
|
203
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
204
|
-
return
|
|
204
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
205
|
+
return `trust://open_url?coin_id=60&url=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
205
206
|
},
|
|
206
207
|
},
|
|
207
208
|
okx: {
|
|
@@ -209,8 +210,8 @@ const walletConfigs = {
|
|
|
209
210
|
icon: jsx(Logos.OKX, {}),
|
|
210
211
|
showInMobileConnectors: true,
|
|
211
212
|
deeplinkScheme: "okx://",
|
|
212
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
213
|
-
return
|
|
213
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
214
|
+
return `okx://wallet/dapp/url?dappUrl=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
214
215
|
},
|
|
215
216
|
},
|
|
216
217
|
solflare: {
|
|
@@ -218,8 +219,8 @@ const walletConfigs = {
|
|
|
218
219
|
icon: jsx(Logos.Solflare, {}),
|
|
219
220
|
showInMobileConnectors: true,
|
|
220
221
|
deeplinkScheme: "solflare://",
|
|
221
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
222
|
-
const url = encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
222
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
223
|
+
const url = customDeeplink ?? encodeURIComponent(getRozoPayUrl(payId, appId));
|
|
223
224
|
const reff = encodeURIComponent(window.location.origin);
|
|
224
225
|
return `https://solflare.com/ul/v1/browse/${url}?ref=${reff}`;
|
|
225
226
|
},
|
|
@@ -254,8 +255,8 @@ const walletConfigs = {
|
|
|
254
255
|
},
|
|
255
256
|
showInMobileConnectors: true,
|
|
256
257
|
deeplinkScheme: "zerion://",
|
|
257
|
-
getRozoPayDeeplink: (payId, ref, appId) => {
|
|
258
|
-
return
|
|
258
|
+
getRozoPayDeeplink: ({ payId, ref, appId, customDeeplink, }) => {
|
|
259
|
+
return `zerion://browser?url=${customDeeplink ?? getRozoPayUrl(payId, appId)}`;
|
|
259
260
|
},
|
|
260
261
|
},
|
|
261
262
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletConfigs.js","sources":["../../../src/wallets/walletConfigs.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAGA;AACA;AACA,IAAI,WAAW,GAAG,gBAAgB,CAAC;AAE7B,SAAU,+BAA+B,CAAC,MAAc,EAAA;AAC5D,IAAA,IAAI,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;QACzC,WAAW,GAAG,uBAAuB,CAAC;KACvC;AAAM,SAAA,IAAI,MAAM,CAAC,UAAU,CAAC,gCAAgC,CAAC,EAAE;QAC9D,WAAW,GAAG,4BAA4B,CAAC;KAC5C;SAAM;QACL,WAAW,GAAG,gBAAgB,CAAC;KAChC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAa,EAAE,KAAc,EAAA;AAClD,IAAA,OAAO,GAAG,WAAW,CAAA,aAAA,EAAgB,KAAK,CAAA,EAAG,KAAK,GAAG,CAAA,OAAA,EAAU,KAAK,CAAE,CAAA,GAAG,EAAE,EAAE,CAAC;AAChF,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa,EAAE,KAAc,EAAA;IACzD,IAAI,GAAG,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,IAAA,IAAI,UAAU,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACzC,IAAA,OAAO,UAAU,CAAC;AACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"walletConfigs.js","sources":["../../../src/wallets/walletConfigs.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AA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Q;AACd,QAAA,IAAI,EAAEA,GAAA,CAAC,KAAK,CAAC,MAAM,EAAG,EAAA,CAAA;AACtB,QAAA,YAAY,EAAE;AACZ,YAAA,QAAQ,EAAE,8CAA8C;AACxD,YAAA,GAAG,EAAE,qDAAqD;AAC1D,YAAA,OAAO,EACL,iEAAiE;AACnE,YAAA,OAAO,EAAE,oBAAoB;AAC9B,SAAA;AACD,QAAA,sBAAsB,EAAE,IAAI;AAC5B,QAAA,cAAc,EAAE,WAAW;AAC3B,QAAA,kBAAkB,EAAE,CAAC,EACnB,KAAK,EACL,GAAG,EACH,KAAK,EACL,cAAc,GAMf,KAAI;YACH,OAAO,CAAA,qBAAA,EACL,cAAc,IAAI,aAAa,CAAC,KAAK,EAAE,KAAK,CAC9C,CAAA,CAAE,CAAC;SACJ;AACF,KAAA;;;;;"}
|
package/build/utils/index.d.ts
CHANGED
|
@@ -15,4 +15,9 @@ export declare const isPhantomConnector: (connectorId?: string) => connectorId i
|
|
|
15
15
|
export declare const isLedgerConnector: (connectorId?: string) => connectorId is "ledger";
|
|
16
16
|
export declare const isSafeConnector: (connectorId?: string) => connectorId is "safe";
|
|
17
17
|
export declare const isInjectedConnector: (connectorId?: string) => connectorId is "injected";
|
|
18
|
+
export declare function parseError(e: any): {
|
|
19
|
+
code: any;
|
|
20
|
+
message: any;
|
|
21
|
+
ext: any;
|
|
22
|
+
};
|
|
18
23
|
export { flattenChildren, nFormatter, truncateENSAddress, truncateEthAddress };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./walletconnect.module";
|
|
3
|
+
export { STELLAR_NETWORKS, defineStellarChain, isStellarChain } from "./types";
|
|
4
|
+
export type { StellarChainConfig } from "./types";
|
|
5
|
+
export { WALLET_CONNECT_ID, WalletConnectAllowedMethods, WalletConnectModule, WalletConnectTargetChain, } from "./walletconnect.module";
|
|
6
|
+
export type { IParsedWalletConnectSession, IWalletConnectConstructorParams, } from "./walletconnect.module";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare module "@reown/appkit/networks" {
|
|
2
|
+
interface ChainNamespace {
|
|
3
|
+
stellar: "stellar";
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
namespace ChainNamespace {
|
|
8
|
+
type Stellar = "stellar";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare module "@reown/appkit" {
|
|
12
|
+
interface AppKitNetwork {
|
|
13
|
+
chainNamespace?: "stellar";
|
|
14
|
+
caipNetworkId?: `stellar:${"pubnet" | "testnet"}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export interface StellarChainConfig {
|
|
18
|
+
id: "pubnet" | "testnet";
|
|
19
|
+
name: string;
|
|
20
|
+
nativeCurrency: {
|
|
21
|
+
name: string;
|
|
22
|
+
symbol: string;
|
|
23
|
+
decimals: number;
|
|
24
|
+
};
|
|
25
|
+
rpcUrls: {
|
|
26
|
+
default: {
|
|
27
|
+
http: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
blockExplorers: {
|
|
31
|
+
default: {
|
|
32
|
+
name: string;
|
|
33
|
+
url: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
chainNamespace: "stellar";
|
|
37
|
+
caipNetworkId: `stellar:${"pubnet" | "testnet"}`;
|
|
38
|
+
}
|
|
39
|
+
export declare const defineStellarChain: (config: StellarChainConfig) => any;
|
|
40
|
+
export declare const isStellarChain: (chain: any) => chain is StellarChainConfig;
|
|
41
|
+
export declare const STELLAR_NETWORKS: Record<"pubnet" | "testnet", StellarChainConfig>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ModuleInterface, ModuleType, WalletNetwork } from "@creit.tech/stellar-wallets-kit";
|
|
2
|
+
import { createAppKit } from "@reown/appkit";
|
|
3
|
+
import { SignClient } from "@walletconnect/sign-client";
|
|
4
|
+
export interface IParsedWalletConnectSession {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
url: string;
|
|
9
|
+
icons: string;
|
|
10
|
+
accounts: Array<{
|
|
11
|
+
network: "pubnet" | "testnet";
|
|
12
|
+
publicKey: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export declare const WALLET_CONNECT_ID = "wallet_connect";
|
|
16
|
+
export declare class WalletConnectModule implements ModuleInterface {
|
|
17
|
+
wcParams: IWalletConnectConstructorParams;
|
|
18
|
+
moduleType: ModuleType;
|
|
19
|
+
productId: string;
|
|
20
|
+
productName: string;
|
|
21
|
+
productUrl: string;
|
|
22
|
+
productIcon: string;
|
|
23
|
+
private client?;
|
|
24
|
+
private activeSession?;
|
|
25
|
+
private qrModal;
|
|
26
|
+
isAvailable(): Promise<boolean>;
|
|
27
|
+
isPlatformWrapper(): Promise<boolean>;
|
|
28
|
+
constructor(wcParams: IWalletConnectConstructorParams);
|
|
29
|
+
getAddress(): Promise<{
|
|
30
|
+
address: string;
|
|
31
|
+
}>;
|
|
32
|
+
signTransaction(xdr: string, opts?: {
|
|
33
|
+
networkPassphrase?: string;
|
|
34
|
+
address?: string;
|
|
35
|
+
path?: string;
|
|
36
|
+
submit?: boolean;
|
|
37
|
+
submitUrl?: string;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
signedTxXdr: string;
|
|
40
|
+
signerAddress?: string;
|
|
41
|
+
}>;
|
|
42
|
+
signAuthEntry(): Promise<{
|
|
43
|
+
signedAuthEntry: string;
|
|
44
|
+
signerAddress?: string;
|
|
45
|
+
}>;
|
|
46
|
+
signMessage(): Promise<{
|
|
47
|
+
signedMessage: string;
|
|
48
|
+
signerAddress?: string;
|
|
49
|
+
}>;
|
|
50
|
+
getNetwork(): Promise<{
|
|
51
|
+
network: string;
|
|
52
|
+
networkPassphrase: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Allows manually setting the current active session to be used in the kit when doing WalletConnect requests
|
|
56
|
+
*
|
|
57
|
+
* @param sessionId The session ID is a placeholder for the session "topic", term used in WalletConnect
|
|
58
|
+
* */
|
|
59
|
+
setSession(sessionId: string): void;
|
|
60
|
+
onSessionDeleted(cb: (sessionId: string) => void): void;
|
|
61
|
+
connectWalletConnect(): Promise<IParsedWalletConnectSession>;
|
|
62
|
+
disconnect(): Promise<void>;
|
|
63
|
+
closeSession(sessionId: string, reason?: string): Promise<void>;
|
|
64
|
+
getSessions(): Promise<IParsedWalletConnectSession[]>;
|
|
65
|
+
private getTargetSession;
|
|
66
|
+
}
|
|
67
|
+
export interface IWalletConnectConstructorParams {
|
|
68
|
+
projectId: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
url: string;
|
|
72
|
+
icons: string[];
|
|
73
|
+
method: WalletConnectAllowedMethods;
|
|
74
|
+
network: WalletNetwork;
|
|
75
|
+
sessionId?: string;
|
|
76
|
+
client?: typeof SignClient;
|
|
77
|
+
modal?: ReturnType<typeof createAppKit>;
|
|
78
|
+
onSessionDeleted?: (sessionId: string) => void;
|
|
79
|
+
}
|
|
80
|
+
export declare enum WalletConnectTargetChain {
|
|
81
|
+
PUBLIC = "stellar:pubnet",
|
|
82
|
+
TESTNET = "stellar:testnet"
|
|
83
|
+
}
|
|
84
|
+
export declare enum WalletConnectAllowedMethods {
|
|
85
|
+
SIGN = "stellar_signXDR",
|
|
86
|
+
SIGN_AND_SUBMIT = "stellar_signAndSubmitXDR"
|
|
87
|
+
}
|
|
@@ -20,7 +20,12 @@ export type WalletConfigProps = {
|
|
|
20
20
|
safari?: string;
|
|
21
21
|
};
|
|
22
22
|
deeplinkScheme?: string;
|
|
23
|
-
getRozoPayDeeplink?: (payId
|
|
23
|
+
getRozoPayDeeplink?: ({ payId, ref, appId, customDeeplink, }: {
|
|
24
|
+
payId: string;
|
|
25
|
+
ref?: string;
|
|
26
|
+
appId?: string;
|
|
27
|
+
customDeeplink?: string;
|
|
28
|
+
}) => string;
|
|
24
29
|
showInMobileConnectors?: boolean;
|
|
25
30
|
isSolanaOnly?: boolean;
|
|
26
31
|
isStellarOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozoai/intent-pay",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.29-beta.
|
|
4
|
+
"version": "0.0.29-beta.20",
|
|
5
5
|
"author": "RozoAI",
|
|
6
6
|
"homepage": "https://github.com/RozoAI/intent-pay",
|
|
7
7
|
"license": "BSD-2-Clause",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@albedo-link/intent": "^0.13.0",
|
|
52
|
-
"@creit.tech/stellar-wallets-kit": "^1.
|
|
52
|
+
"@creit.tech/stellar-wallets-kit": "^1.9.5",
|
|
53
53
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
54
|
-
"@rozoai/intent-common": "
|
|
54
|
+
"@rozoai/intent-common": "w0.0.23-beta.2",
|
|
55
55
|
"@solana/spl-token": "^0.4.13",
|
|
56
56
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
57
57
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
"@stellar/stellar-sdk": "^13.3.0",
|
|
60
60
|
"@trpc/client": "^11.0.0-next-beta.318",
|
|
61
61
|
"@trpc/server": "^11.0.0-next-beta.318",
|
|
62
|
+
"@reown/appkit": "^1.7.0",
|
|
63
|
+
"@walletconnect/sign-client": "^2.22.3",
|
|
62
64
|
"@worldcoin/minikit-js": "^1.9.7",
|
|
63
65
|
"alchemy-sdk": "^3.6.3",
|
|
64
66
|
"bs58": "^6.0.0",
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
"@types/react-dom": "^18.2.18",
|
|
94
96
|
"@types/rollup-plugin-peer-deps-external": "^2.2.5",
|
|
95
97
|
"@types/styled-components": "^5.1.25",
|
|
98
|
+
"@walletconnect/types": "^2.22.3",
|
|
96
99
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
97
100
|
"rollup": "^3.29.5",
|
|
98
101
|
"rollup-plugin-dts": "^6.1.1",
|