alby-js-sdk
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -0,0 +0,0 @@ export declare class AlbyResponseError extends Error { |
import "websocket-polyfill"; | ||
//# sourceMappingURL=AlbyResponseError.test.d.ts.map |
export * from './OAuth2User'; | ||
export * from "./OAuth2Bearer"; | ||
//# sourceMappingURL=auth.d.ts.map |
@@ -0,0 +0,0 @@ import { RequestOptions } from "./request"; |
@@ -0,0 +0,0 @@ import { SendBoostagramRequestParams } from "./types"; |
@@ -0,0 +0,0 @@ export * as auth from "./auth"; |
@@ -0,0 +0,0 @@ import { AuthClient, AuthHeader } from "./types"; |
import { OAuthClient, AuthHeader, Token, GenerateAuthUrlOptions } from "./types"; | ||
import { RequestOptions } from "./request"; | ||
export declare type OAuth2Scopes = "account:read" | "invoices:create" | "invoices:read" | "transactions:read" | "balance:read" | "payments:send"; | ||
export type OAuth2Scopes = "account:read" | "invoices:create" | "invoices:read" | "transactions:read" | "balance:read" | "payments:send"; | ||
export interface OAuth2UserOptions { | ||
@@ -5,0 +5,0 @@ client_id: string; |
@@ -0,0 +0,0 @@ import { AuthClient } from "./types"; |
import { AlbyResponseError } from "./AlbyResponseError"; | ||
export declare type SuccessStatus = 200 | 201; | ||
export declare type ResponseType = "application/json"; | ||
export type SuccessStatus = 200 | 201; | ||
export type ResponseType = "application/json"; | ||
export interface AuthHeader { | ||
@@ -21,3 +21,3 @@ Authorization: string; | ||
} | ||
export declare type GenerateAuthUrlOptions = { | ||
export type GenerateAuthUrlOptions = { | ||
code_challenge_method?: string; | ||
@@ -49,10 +49,10 @@ code_challenge?: string; | ||
} | ||
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; | ||
export declare type GetSuccess<T> = { | ||
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; | ||
export type GetSuccess<T> = { | ||
[K in SuccessStatus & keyof T]: GetContent<T[K]>; | ||
}[SuccessStatus & keyof T]; | ||
export declare type AlbyResponse<T> = UnionToIntersection<ExtractAlbyResponse<T>>; | ||
export declare type GetContent<T> = "content" extends keyof T ? ResponseType extends keyof T["content"] ? T["content"][ResponseType] : never : never; | ||
export declare type ExtractAlbyResponse<T> = "responses" extends keyof T ? GetSuccess<T["responses"]> : never; | ||
export declare type InvoiceRequestParams = { | ||
export type AlbyResponse<T> = UnionToIntersection<ExtractAlbyResponse<T>>; | ||
export type GetContent<T> = "content" extends keyof T ? ResponseType extends keyof T["content"] ? T["content"][ResponseType] : never : never; | ||
export type ExtractAlbyResponse<T> = "responses" extends keyof T ? GetSuccess<T["responses"]> : never; | ||
export type InvoiceRequestParams = { | ||
description?: string; | ||
@@ -62,3 +62,3 @@ description_hash?: string; | ||
}; | ||
export declare type KeysendRequestParams = { | ||
export type KeysendRequestParams = { | ||
amount: number; | ||
@@ -69,7 +69,7 @@ destination: string; | ||
}; | ||
export declare type SendPaymentRequestParams = { | ||
export type SendPaymentRequestParams = { | ||
invoice: string; | ||
amount?: number; | ||
}; | ||
export declare type SendBoostagramRequestParams = { | ||
export type SendBoostagramRequestParams = { | ||
recipient: { | ||
@@ -83,3 +83,3 @@ address: string; | ||
}; | ||
export declare type SendToAlbyRequestParams = { | ||
export type SendToAlbyRequestParams = { | ||
account: string; | ||
@@ -89,3 +89,3 @@ amount: number; | ||
}; | ||
export declare type CreateWebhookEndpointParams = { | ||
export type CreateWebhookEndpointParams = { | ||
url: string; | ||
@@ -95,3 +95,3 @@ description?: string; | ||
}; | ||
export declare type BaseWebhookEndpointResponse = { | ||
export type BaseWebhookEndpointResponse = { | ||
url: string; | ||
@@ -103,6 +103,6 @@ description?: string; | ||
}; | ||
export declare type CreateWebhookEndpointResponse = BaseWebhookEndpointResponse & { | ||
export type CreateWebhookEndpointResponse = BaseWebhookEndpointResponse & { | ||
endpoint_secret: string; | ||
}; | ||
export declare type Invoice = { | ||
export type Invoice = { | ||
amount: number; | ||
@@ -156,3 +156,3 @@ boostagram?: { | ||
} & Record<string, unknown>; | ||
export declare type GetNWCAuthorizationUrlOptions = { | ||
export type GetNWCAuthorizationUrlOptions = { | ||
name?: string; | ||
@@ -165,3 +165,3 @@ returnTo?: string; | ||
}; | ||
export declare type SendPaymentResponse = { | ||
export type SendPaymentResponse = { | ||
amount: number; | ||
@@ -175,3 +175,3 @@ description: string; | ||
}; | ||
export declare type GetAccountBalanceResponse = { | ||
export type GetAccountBalanceResponse = { | ||
balance: number; | ||
@@ -181,3 +181,3 @@ currency: string; | ||
}; | ||
export declare type GetAccountInformationResponse = { | ||
export type GetAccountInformationResponse = { | ||
identifier: string; | ||
@@ -184,0 +184,0 @@ email: string; |
export declare function buildQueryString(query: Record<string, any>): string; | ||
export declare function basicAuthHeader(client_id: string, client_secret: string | undefined): string; | ||
//# sourceMappingURL=utils.d.ts.map |
export default AlbyOauthCallback; | ||
declare function AlbyOauthCallback(): any; | ||
//# sourceMappingURL=AlbyOauthCallback.d.ts.map |
export * from './NostrWeblnProvider'; | ||
export * from './OauthWeblnProvider'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -11,3 +11,3 @@ import { Relay, Event, UnsignedEvent } from 'nostr-tools'; | ||
} | ||
declare type Nip07Provider = { | ||
type Nip07Provider = { | ||
getPublicKey(): Promise<string>; | ||
@@ -14,0 +14,0 @@ signEvent(event: UnsignedEvent): Promise<Event>; |
import "websocket-polyfill"; | ||
//# sourceMappingURL=NostrWeblnProvider.test.d.ts.map |
@@ -0,0 +0,0 @@ import { Client } from '../client'; |
{ | ||
"name": "alby-js-sdk", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "The SDK to integrate with Nostr Wallet Connect and the Alby API", | ||
@@ -29,3 +29,4 @@ "repository": "https://github.com/getAlby/alby-js-sdk.git", | ||
"clean": "rm -rf dist", | ||
"build": "microbundle", | ||
"build:browser": "cp src/window.js dist && browserify dist/window.js > dist/index.browser.js", | ||
"build": "microbundle && yarn build:browser", | ||
"dev": "microbundle watch" | ||
@@ -35,3 +36,3 @@ }, | ||
"crypto-js": "^4.1.1", | ||
"nostr-tools": "^1.10.0" | ||
"nostr-tools": "^1.13.1" | ||
}, | ||
@@ -43,2 +44,3 @@ "devDependencies": { | ||
"@webbtc/webln-types": "^1.0.11", | ||
"browserify": "^17.0.0", | ||
"express": "^4.18.2", | ||
@@ -49,3 +51,3 @@ "jest": "^29.5.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.8.4", | ||
"typescript": "^5.1.6", | ||
"websocket-polyfill": "^0.0.3" | ||
@@ -52,0 +54,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
837980
46
14866
12
3
9
Updatednostr-tools@^1.13.1