Skip to content

Commit 0fbe891

Browse files
committed
Add Relay.Link Crypto Integration
1 parent 6caac67 commit 0fbe891

File tree

7 files changed

+973
-11
lines changed

7 files changed

+973
-11
lines changed

packages/payments/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ const client = createPaymentsClient({
3131

3232
const session = await client.createSession({
3333
kind: "crypto",
34-
destination: "eip155:747:0xRecipient", // CAIP-10 format
34+
destination: "eip155:747:0xRecipient", // CAIP-10: Flow EVM address
3535
currency: "USDC", // Symbol, EVM address, or Cadence vault identifier
3636
amount: "100.0", // Human-readable decimal format
37-
sourceChain: "eip155:1", // CAIP-2: source chain
37+
sourceChain: "eip155:1", // CAIP-2: Ethereum mainnet
3838
sourceCurrency: "USDC",
3939
})
4040

41-
// session.instructions contains provider-specific funding instructions
42-
console.log(session.instructions.address) // e.g., deposit address
41+
// session.instructions.address contains a unique deposit address
42+
// User sends USDC on Ethereum to this address, Relay bridges it to Flow EVM
43+
console.log(session.instructions.address)
4344
```
4445

4546
## Core Concepts

packages/payments/src/client.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe("createPaymentsClient", () => {
118118
}
119119

120120
await expect(client.createSession(intent)).rejects.toThrow(
121-
"No provider could create a session"
121+
"Failed to create session: no provider could handle the request"
122122
)
123123
})
124124

@@ -136,7 +136,7 @@ describe("createPaymentsClient", () => {
136136
}
137137

138138
await expect(client.createSession(intent)).rejects.toThrow(
139-
"No provider could create a session"
139+
"Failed to create session: no provider could handle the request"
140140
)
141141
})
142142

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
// Provider implementations are added in separate PRs
2-
// e.g., export {relayProvider} from "./relay"
3-
4-
// Placeholder export - providers will be added here
5-
export {}
1+
export {relayProvider} from "./relay"
2+
export type {RelayConfig} from "./relay"

0 commit comments

Comments
 (0)