Skip to content

Commit 89efd8b

Browse files
committed
fix: use IPFS gateway for catting, not lambda
Signed-off-by: Bofu Chen <[email protected]>
1 parent 6369e52 commit 89efd8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ipfs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let ProjectSecret = "";
1212
let EstuaryInstance;
1313
let NumbersProtocolCaptureToken = ""; // Store the Capture Token
1414
let NumbersProtocolIpfsGatewayLambda = "https://mjacdgxzla.execute-api.us-east-1.amazonaws.com/default/ipfs-add-with-payment";
15+
let NumbersProtocolIpfsGateway = "https://ipfs-pin.numbersprotocol.io/ipfs";
1516

1617
export async function initInfura(projectId, projectSecret) {
1718
ProjectId = projectId;
@@ -142,7 +143,7 @@ export async function numbersProtocolIpfsAddBytes(bytes) {
142143
export async function numbersProtocolIpfsCat(cid) {
143144
try {
144145
// Use Numbers Protocol IPFS cat API endpoint with Capture Token
145-
const url = NumbersProtocolIpfsGatewayLambda;
146+
const url = `${NumbersProtocolIpfsGateway}/${cid}`;
146147
const requestConfig = {
147148
headers: {
148149
"Authorization": `token ${NumbersProtocolCaptureToken}`

0 commit comments

Comments
 (0)