create-message-kit 1.1.10-beta.1 → 1.1.10-beta.3
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
KEY= # the private key of the wallet
|
2
|
-
|
2
|
+
OPENAI_API_KEY= # sk-proj-...
|
@@ -24,19 +24,6 @@ export async function handleTip(context: XMTPContext) {
|
|
24
24
|
},
|
25
25
|
},
|
26
26
|
} = context;
|
27
|
-
|
28
|
-
|
29
|
-
return {
|
30
|
-
code: 400,
|
31
|
-
message: "Please provide an address to tip.",
|
32
|
-
};
|
33
|
-
}
|
34
|
-
const data = await getUserInfo(address);
|
35
|
-
|
36
|
-
let sendUrl = `${txpayUrl}/?&amount=1&token=USDC&receiver=${address}`;
|
37
|
-
|
38
|
-
return {
|
39
|
-
code: 200,
|
40
|
-
message: sendUrl,
|
41
|
-
};
|
27
|
+
console.log("tip", address);
|
28
|
+
await context.sendPay(1, "USDC", address);
|
42
29
|
}
|
@@ -18,6 +18,7 @@ export const frameUrl = "https://ens.steer.fun/";
|
|
18
18
|
export const ensUrl = "https://app.ens.domains/";
|
19
19
|
export const txpayUrl = "https://txpay.vercel.app";
|
20
20
|
|
21
|
+
// [!region skills]
|
21
22
|
export const skills = [
|
22
23
|
{
|
23
24
|
name: "Ens Domain Bot",
|
@@ -34,7 +35,9 @@ export const skills = [
|
|
34
35
|
],
|
35
36
|
},
|
36
37
|
];
|
38
|
+
// [!endregion skills]
|
37
39
|
|
40
|
+
// [!region run]
|
38
41
|
run(
|
39
42
|
async (context: XMTPContext) => {
|
40
43
|
const {
|
@@ -53,3 +56,5 @@ run(
|
|
53
56
|
},
|
54
57
|
{ skills },
|
55
58
|
);
|
59
|
+
|
60
|
+
// [!endregion run]
|
@@ -1,2 +1,2 @@
|
|
1
1
|
KEY= # the private key of the agent wallet
|
2
|
-
|
2
|
+
OPENAI_API_KEY= # the API key for OpenAI
|
@@ -1,2 +1,2 @@
|
|
1
1
|
KEY= # the private key of the agent wallet
|
2
|
-
|
2
|
+
OPENAI_API_KEY= # openai api key
|