Skip to content

Commit

Permalink
Merge pull request #19 from decentldotland/ao
Browse files Browse the repository at this point in the history
fix: re-add Near atom
  • Loading branch information
charmful0x authored Mar 20, 2024
2 parents e20361a + 395f0e1 commit 18fa4a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
getTransaction
} from "./molecules/balances/atom";
import { deployFunction } from "./molecules/mem-factory/atom";
import { authenticateNearSignature } from "./molecules/near/signMessage/atom";
import { getSplTokenTransfer } from "./molecules/solana/atom";
import { aoDryRunData } from "./molecules/ao/atom";
import type { Strategy } from "@/types";
Expand Down Expand Up @@ -118,6 +119,20 @@ app.get(
},
);

app.get(
"/near/signature/:message/:nonce/:accountId/:publicKey/:signature",
async (req: Request, res: Response) => {
let { message, nonce, accountId, publicKey, signature } = req.params;
const result = await authenticateNearSignature(
message,
accountId,
publicKey,
nonce,
signature
);
res.send(result);
}
);

app.listen(port, () => {
console.log(`[molecule-ext-1] running on port: ${port}`);
Expand Down

0 comments on commit 18fa4a7

Please sign in to comment.