From 9a7fb38a56c697ced3ca56f191798dd6baed66c3 Mon Sep 17 00:00:00 2001 From: Howard Xie Date: Wed, 9 Oct 2024 17:55:06 -0700 Subject: [PATCH 1/4] Update README.md --- quickstart-template/webhook/README.md | 32 +++++---------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/quickstart-template/webhook/README.md b/quickstart-template/webhook/README.md index 65308036..0b79a535 100644 --- a/quickstart-template/webhook/README.md +++ b/quickstart-template/webhook/README.md @@ -3,38 +3,16 @@ This is a template repository for quickly getting started with a Webhook App, which can be used for setting up Webhooks for listening to blockchain event notifications. -## Local Webhook App - -To set up the template, run the following commands from this `webhook` folder: - -```bash -npm install -npm run start-webhook-app -``` - -This command will set up a webhook app locally. - -Once the local webhook app is setup, in another terminal window, you can test it with: - -```bash -curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' http://localhost:3000/callback -``` - ## Public Webhook App -To setup a temporary public URL that points to this local webhook app, -you can use [Pinggy](https://pinggy.io/) in another terminal window: - -```bash -ssh -p 443 -R0:localhost:3000 -L4300:localhost:4300 qr@a.pinggy.io -``` - -You can also use [Vercel](https://vercel.com/) or other hosting solutions for your webhook app. +You can use [webhook.site](https://webhook.site/) or [Vercel](https://vercel.com/) or other hosting solutions to create a simple webapp with public facing URL which can receive data from webhook POST calls. -Once the public webhook app is setup, copy the URL provided and test it with: +Once the public webapp is setup, copy the URL provided and test it locally. Below is an example from webhook.site: ```bash -curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' {url_copied_from_pinggy_io}/callback +curl -X POST 'https://webhook.site/00000000-0000-0000-0000-000000000000' \ + -H 'content-type: application/json' \ + -d $'{"id": 7, "name": "Jack Daniels", "position": "Assistant"}' ``` This URL (ie Notification URL) can now be used to create Webhook either From 3c3a3af705830cc4c5888791b998076d63317440 Mon Sep 17 00:00:00 2001 From: Howard Xie Date: Fri, 11 Oct 2024 12:23:29 -0700 Subject: [PATCH 2/4] Revert "Update README.md" This reverts commit 9a7fb38a56c697ced3ca56f191798dd6baed66c3. --- quickstart-template/webhook/README.md | 32 ++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/quickstart-template/webhook/README.md b/quickstart-template/webhook/README.md index 0b79a535..65308036 100644 --- a/quickstart-template/webhook/README.md +++ b/quickstart-template/webhook/README.md @@ -3,16 +3,38 @@ This is a template repository for quickly getting started with a Webhook App, which can be used for setting up Webhooks for listening to blockchain event notifications. +## Local Webhook App + +To set up the template, run the following commands from this `webhook` folder: + +```bash +npm install +npm run start-webhook-app +``` + +This command will set up a webhook app locally. + +Once the local webhook app is setup, in another terminal window, you can test it with: + +```bash +curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' http://localhost:3000/callback +``` + ## Public Webhook App -You can use [webhook.site](https://webhook.site/) or [Vercel](https://vercel.com/) or other hosting solutions to create a simple webapp with public facing URL which can receive data from webhook POST calls. +To setup a temporary public URL that points to this local webhook app, +you can use [Pinggy](https://pinggy.io/) in another terminal window: + +```bash +ssh -p 443 -R0:localhost:3000 -L4300:localhost:4300 qr@a.pinggy.io +``` + +You can also use [Vercel](https://vercel.com/) or other hosting solutions for your webhook app. -Once the public webapp is setup, copy the URL provided and test it locally. Below is an example from webhook.site: +Once the public webhook app is setup, copy the URL provided and test it with: ```bash -curl -X POST 'https://webhook.site/00000000-0000-0000-0000-000000000000' \ - -H 'content-type: application/json' \ - -d $'{"id": 7, "name": "Jack Daniels", "position": "Assistant"}' +curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' {url_copied_from_pinggy_io}/callback ``` This URL (ie Notification URL) can now be used to create Webhook either From 17a2f1ab6c5ca542cceb0f8ab78d79f45992a400 Mon Sep 17 00:00:00 2001 From: Howard Xie Date: Fri, 11 Oct 2024 12:27:36 -0700 Subject: [PATCH 3/4] Update README.md --- quickstart-template/webhook/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstart-template/webhook/README.md b/quickstart-template/webhook/README.md index 65308036..5e982f78 100644 --- a/quickstart-template/webhook/README.md +++ b/quickstart-template/webhook/README.md @@ -23,13 +23,13 @@ curl -X POST -H "Content-Type:application/json" -d '{"app": "webhook"}' http://l ## Public Webhook App To setup a temporary public URL that points to this local webhook app, -you can use [Pinggy](https://pinggy.io/) in another terminal window: +you can use [Pinggy](https://pinggy.io/) or [ngrok](https://ngrok.com/) in another terminal window: ```bash ssh -p 443 -R0:localhost:3000 -L4300:localhost:4300 qr@a.pinggy.io ``` -You can also use [Vercel](https://vercel.com/) or other hosting solutions for your webhook app. +You can also use [Vercel](https://vercel.com/), [webhook.site](https://webhook.site/) or other hosting solutions for your webhook app. Once the public webhook app is setup, copy the URL provided and test it with: From 2b6d4774ff0bf543dcffa315aa37c61bc3357400 Mon Sep 17 00:00:00 2001 From: Howard Xie Date: Fri, 11 Oct 2024 12:27:40 -0700 Subject: [PATCH 4/4] 0.8.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96475b08..71386877 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@coinbase/coinbase-sdk", - "version": "0.6.1", + "version": "0.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@coinbase/coinbase-sdk", - "version": "0.6.1", + "version": "0.8.1", "license": "ISC", "dependencies": { "@scure/bip32": "^1.4.0", diff --git a/package.json b/package.json index 9a854db6..eba756a6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "ISC", "description": "Coinbase Platform SDK", "repository": "https://github.com/coinbase/coinbase-sdk-nodejs", - "version": "0.8.0", + "version": "0.8.1", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": {