Skip to content

Commit 02d4bac

Browse files
committed
feat: use Numbers' IPFS gateway lambda for adding
Signed-off-by: Bofu Chen <[email protected]>
1 parent 21b5551 commit 02d4bac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ipfs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let ProjectSecret = "";
1111

1212
let EstuaryInstance;
1313
let NumbersProtocolCaptureToken = ""; // Store the Capture Token
14+
let NumbersProtocolIpfsGatewayLambda = "https://mjacdgxzla.execute-api.us-east-1.amazonaws.com/default/ipfs-add-with-payment";
1415

1516
export async function initInfura(projectId, projectSecret) {
1617
ProjectId = projectId;
@@ -123,7 +124,7 @@ export async function numbersProtocolIpfsAddBytes(bytes) {
123124
formData.append('file', fileReadStream);
124125

125126
// Use Numbers Protocol IPFS add API endpoint with Capture Token in header
126-
const url = "https://eow75n0xni8ruiy.m.pipedream.net";
127+
const url = NumbersProtocolIpfsGatewayLambda;
127128
const headers = {
128129
"Authorization": `token ${NumbersProtocolCaptureToken}`,
129130
...formData.getHeaders(),
@@ -141,7 +142,7 @@ export async function numbersProtocolIpfsAddBytes(bytes) {
141142
export async function numbersProtocolIpfsCat(cid) {
142143
try {
143144
// Use Numbers Protocol IPFS cat API endpoint with Capture Token
144-
const url = `https://eobf91xa1ra7i2n.m.pipedream.net`;
145+
const url = NumbersProtocolIpfsGatewayLambda;
145146
const requestConfig = {
146147
headers: {
147148
"Authorization": `token ${NumbersProtocolCaptureToken}`
@@ -161,7 +162,7 @@ export async function numbersProtocolIpfsCat(cid) {
161162
export async function numbersProtocolIpfsUnpin(cid) {
162163
try {
163164
// Use Numbers Protocol IPFS unpin API endpoint with Capture Token
164-
const url = `https://eo3wcvdjj73vq4x.m.pipedream.net`;
165+
const url = NumbersProtocolIpfsGatewayLambda;
165166
const requestConfig = {
166167
headers: {
167168
"Authorization": `token ${NumbersProtocolCaptureToken}`

0 commit comments

Comments
 (0)