Skip to content

Commit 0284856

Browse files
committed
add metadata example configuration
1 parent c02b4e8 commit 0284856

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,26 @@ import { ActionConfig } from "@dialectlabs/blinks";
8989

9090
// your RPC_URL is used to create a connection to confirm the transaction after action execution
9191
setupTwitterObserver(new ActionConfig(RPC_URL, {
92-
signTransaction: async (tx: string) => { ... },
93-
connect: async () => { ... }
92+
metadata: {
93+
supportedBlockchainIds: [BlockchainIds.SOLANA_MAINNET]
94+
},
95+
connect: async () => { ... },
96+
signTransaction: async (tx: string) => { ... }
9497
}))
9598

9699
// or
97100

98101
import { type ActionAdapter } from "@dialectlabs/blinks";
99102

100103
class MyActionAdapter implements ActionAdapter {
101-
async signTransaction(tx: string) { ... }
102104
async connect() { ... }
105+
async signTransaction(tx: string) { ... }
103106
async confirmTransaction(sig: string) { ... }
107+
get metadata(): ActionAdapterMetadata {
108+
return {
109+
supportedBlockchainIds: [BlockchainIds.SOLANA_MAINNET],
110+
};
111+
}
104112
}
105113

106114
setupTwitterObserver(new MyActionAdapter());

0 commit comments

Comments
 (0)