edge-core-js 2.42.0 → 2.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,6 +231,8 @@ export const asEdgeTxActionGiftCard = asObject({
231
231
  actionType: asValue('giftCard'),
232
232
  orderId: asString,
233
233
  orderUri: asOptional(asString),
234
+ productId: asOptional(asString),
235
+ quoteId: asOptional(asString),
234
236
 
235
237
  provider: asObject({
236
238
  providerId: asString,
package/lib/flow/types.js CHANGED
@@ -326,6 +326,8 @@ export type EdgeTxActionGiftCard = {
326
326
  actionType: "giftCard";
327
327
  orderId: string;
328
328
  orderUri?: string;
329
+ productId?: string;
330
+ quoteId?: string;
329
331
 
330
332
  provider: {
331
333
  providerId: string;
package/lib/node/index.js CHANGED
@@ -4831,6 +4831,8 @@ const asEdgeTxActionGiftCard = cleaners.asObject({
4831
4831
  actionType: cleaners.asValue('giftCard'),
4832
4832
  orderId: cleaners.asString,
4833
4833
  orderUri: cleaners.asOptional(cleaners.asString),
4834
+ productId: cleaners.asOptional(cleaners.asString),
4835
+ quoteId: cleaners.asOptional(cleaners.asString),
4834
4836
  provider: cleaners.asObject({
4835
4837
  providerId: cleaners.asString,
4836
4838
  displayName: cleaners.asString,
@@ -2232,6 +2232,8 @@ export * from './server-types'
2232
2232
 
2233
2233
 
2234
2234
 
2235
+
2236
+
2235
2237
 
2236
2238
 
2237
2239
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-core-js",
3
- "version": "2.42.0",
3
+ "version": "2.43.0",
4
4
  "description": "Edge account & wallet management library",
5
5
  "keywords": [
6
6
  "bitcoin",
@@ -324,6 +324,8 @@ export interface EdgeTxActionGiftCard {
324
324
  actionType: 'giftCard'
325
325
  orderId: string
326
326
  orderUri?: string
327
+ productId?: string
328
+ quoteId?: string
327
329
 
328
330
  provider: {
329
331
  providerId: string
package/lib/flow/webby.js DELETED
@@ -1,35 +0,0 @@
1
- // @flow
2
-
3
- import { Buffer } from "buffer";
4
- import http from "http";
5
- import { createProxyServer } from "http-proxy";
6
-
7
- const proxy = createProxyServer({});
8
-
9
- // Rust WebDAV server running on port 3000
10
- const WEBDAV_TARGET = "http://localhost:3000";
11
- const OTHER_TARGET = "http://localhost:4000";
12
-
13
- const AUTH_USER = "william";
14
- const AUTH_PASS = "hunter2";
15
-
16
- const mainServer = http.createServer((req, res) => {
17
- if (isAuthorized(req)) {
18
- proxy.web(req, res, { target: WEBDAV_TARGET });
19
- } else {
20
- proxy.web(req, res, { target: OTHER_TARGET });
21
- }
22
- });
23
-
24
- mainServer.listen(8080, () => {
25
- console.log("Node proxy running on port 8080");
26
- });
27
-
28
- function isAuthorized(req) {
29
- const authHeader = req.headers.authorization;
30
- if (!authHeader || !authHeader.startsWith("Basic ")) return false;
31
-
32
- const encoded = authHeader.slice(6);
33
- const decoded = Buffer.from(encoded, "base64").toString("utf8");
34
- return decoded === `${AUTH_USER}:${AUTH_PASS}`;
35
- }
@@ -1,33 +0,0 @@
1
- import { Buffer } from 'buffer'
2
- import http from 'http'
3
- import { createProxyServer } from 'http-proxy'
4
-
5
- const proxy = createProxyServer({})
6
-
7
- // Rust WebDAV server running on port 3000
8
- const WEBDAV_TARGET = 'http://localhost:3000'
9
- const OTHER_TARGET = 'http://localhost:4000'
10
-
11
- const AUTH_USER = 'william'
12
- const AUTH_PASS = 'hunter2'
13
-
14
- const mainServer = http.createServer((req, res) => {
15
- if (isAuthorized(req)) {
16
- proxy.web(req, res, { target: WEBDAV_TARGET })
17
- } else {
18
- proxy.web(req, res, { target: OTHER_TARGET })
19
- }
20
- })
21
-
22
- mainServer.listen(8080, () => {
23
- console.log('Node proxy running on port 8080')
24
- })
25
-
26
- function isAuthorized(req) {
27
- const authHeader = req.headers.authorization
28
- if (!authHeader || !authHeader.startsWith('Basic ')) return false
29
-
30
- const encoded = authHeader.slice(6)
31
- const decoded = Buffer.from(encoded, 'base64').toString('utf8')
32
- return decoded === `${AUTH_USER}:${AUTH_PASS}`
33
- }