Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coinbase/cbpay-js

Package Overview
Dependencies
Maintainers
11
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coinbase/cbpay-js - npm Package Compare versions

Comparing version 1.10.0 to 2.1.0

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

## [2.1.0] - 2024-03-14
- Add `theme` parameter
## [2.0.0] - 2024-01-25
- [BREAKING CHANGE] Rename `onrampToken` parameter to `sessionToken`
## [1.10.0] - 2024-01-11

@@ -7,0 +13,0 @@ - Add `onrampToken` parameter

24

dist/index.d.ts

@@ -40,12 +40,2 @@ declare type DestinationWallet = {

declare type GenerateOnRampURLOptions = {
/** This & destinationWallets or onrampToken are required. */
appId?: string;
destinationWallets?: OnRampAppParams['destinationWallets'];
host?: string;
/** This or appId & destinationWallets are required. */
onrampToken?: string;
} & Omit<OnRampAppParams, 'destinationWallets'>;
declare const generateOnRampURL: ({ host, destinationWallets, ...otherParams }: GenerateOnRampURLOptions) => string;
declare type OpenEvent = {

@@ -78,2 +68,3 @@ eventName: 'open';

declare type Experience = 'embedded' | 'popup' | 'new_tab';
declare type Theme = 'light' | 'dark';
declare type EmbeddedContentStyles = {

@@ -92,2 +83,3 @@ target?: string;

debug?: boolean;
theme?: Theme;
onExit?: (error?: Error) => void;

@@ -104,2 +96,13 @@ onSuccess?: () => void;

declare type GenerateOnRampURLOptions = {
/** This & destinationWallets or sessionToken are required. */
appId?: string;
destinationWallets?: OnRampAppParams['destinationWallets'];
host?: string;
/** This or appId & destinationWallets are required. */
sessionToken?: string;
theme?: Theme;
} & Omit<OnRampAppParams, 'destinationWallets'>;
declare const generateOnRampURL: ({ host, destinationWallets, ...otherParams }: GenerateOnRampURLOptions) => string;
/**

@@ -138,2 +141,3 @@ Matches a JSON object.

debug?: boolean;
theme?: Theme;
};

@@ -140,0 +144,0 @@

@@ -372,3 +372,3 @@ "use strict";

var CoinbasePixel = function CoinbasePixel(param) {
var _host = param.host, host = _host === void 0 ? DEFAULT_HOST : _host, appId = param.appId, appParams = param.appParams, onReady = param.onReady, onFallbackOpen = param.onFallbackOpen, debug = param.debug;
var _host = param.host, host = _host === void 0 ? DEFAULT_HOST : _host, appId = param.appId, appParams = param.appParams, onReady = param.onReady, onFallbackOpen = param.onFallbackOpen, debug = param.debug, theme = param.theme;
var _this = this;

@@ -415,2 +415,5 @@ _classCallCheck(this, CoinbasePixel);

widgetUrl.searchParams.append("type", "secure_standalone");
if (_this.theme) {
widgetUrl.searchParams.append("theme", _this.theme);
}
var experience = _this.isLoggedIn ? experienceLoggedIn : experienceLoggedOut || experienceLoggedIn;

@@ -932,2 +935,3 @@ widgetUrl.searchParams.append("nonce", nonce);

this.debug = debug || false;
this.theme = theme;
this.addPixelReadyListener();

@@ -1042,3 +1046,4 @@ this.addErrorListener();

appId: options.appId,
host: options.host
host: options.host,
theme: options.theme
}, widgetParameters));

@@ -1045,0 +1050,0 @@ window.open(url);

{
"name": "@coinbase/cbpay-js",
"version": "1.10.0",
"version": "2.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -68,3 +68,3 @@ # @coinbase/cbpay-js

let onrampInstance;
const instance = initOnRamp(options, (error, instance) => {
initOnRamp(options, (error, instance) => {
onrampInstance = instance;

@@ -71,0 +71,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc