@rhinestone/deposit-modal 0.19.0 → 0.20.1
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.
- package/README.md +154 -61
- package/dist/BankOnrampStep-3SNUX6V2.cjs +435 -0
- package/dist/BankOnrampStep-4D24HVHV.mjs +435 -0
- package/dist/{DepositModalReown-UITYXJ6W.cjs → DepositModalReown-7EHOJTFW.cjs} +21 -20
- package/dist/{DepositModalReown-XBNY6QCI.mjs → DepositModalReown-SYQ2SCHC.mjs} +6 -5
- package/dist/WithdrawModal-LLJLEYXZ.cjs +12 -0
- package/dist/WithdrawModal-LXDIT4UV.mjs +12 -0
- package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
- package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
- package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
- package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
- package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
- package/dist/{chunk-EG4H7OMC.cjs → chunk-CIVFT5KR.cjs} +171 -130
- package/dist/{chunk-PYOC6K24.cjs → chunk-D3R3O4CY.cjs} +1 -1
- package/dist/chunk-E7IMWVMN.mjs +346 -0
- package/dist/chunk-EJDBIWNH.mjs +113 -0
- package/dist/chunk-FKJ6EJHH.cjs +346 -0
- package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
- package/dist/{chunk-NITKDXHR.mjs → chunk-FW7ZMXQS.mjs} +849 -674
- package/dist/chunk-G264OM23.cjs +224 -0
- package/dist/chunk-IPHKBBUV.cjs +113 -0
- package/dist/{chunk-BIL4ENC3.mjs → chunk-IPKT3FU6.mjs} +73 -32
- package/dist/chunk-JPX4MEHV.mjs +19 -0
- package/dist/{chunk-HMUGY66O.cjs → chunk-KXSU24RU.cjs} +1569 -1019
- package/dist/{chunk-ISLVD5HQ.cjs → chunk-LVMNNMOZ.cjs} +10 -5
- package/dist/chunk-O5OW4S7L.cjs +19 -0
- package/dist/{chunk-5NWLS5BQ.mjs → chunk-OZPMRTW3.mjs} +1511 -961
- package/dist/{chunk-OCWSMLOP.cjs → chunk-PVFEZ3UG.cjs} +1164 -989
- package/dist/{chunk-ZGHVJ2XM.mjs → chunk-YQCRXJIL.mjs} +8 -3
- package/dist/chunk-YY4ZOAH5.mjs +224 -0
- package/dist/{chunk-X6N2XPTO.mjs → chunk-ZOJMB5TZ.mjs} +1 -1
- package/dist/compliance.cjs +4 -7
- package/dist/compliance.d.cts +26 -3
- package/dist/compliance.d.ts +26 -3
- package/dist/compliance.mjs +6 -9
- package/dist/constants-BQDxVNgr.d.cts +29 -0
- package/dist/constants-DjGQW5N5.d.ts +29 -0
- package/dist/constants.cjs +3 -37
- package/dist/constants.d.cts +4 -20
- package/dist/constants.d.ts +4 -20
- package/dist/constants.mjs +4 -38
- package/dist/deposit.cjs +7 -6
- package/dist/deposit.d.cts +5 -3
- package/dist/deposit.d.ts +5 -3
- package/dist/deposit.mjs +6 -5
- package/dist/embed.cjs +21 -20
- package/dist/embed.d.cts +3 -2
- package/dist/embed.d.ts +3 -2
- package/dist/embed.mjs +7 -6
- package/dist/index.cjs +8 -35
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +9 -36
- package/dist/onramp.cjs +4 -33
- package/dist/onramp.d.cts +51 -33
- package/dist/onramp.d.ts +51 -33
- package/dist/onramp.mjs +5 -34
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
- package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
- package/dist/styles.css +255 -0
- package/dist/{types-BOxa1DE-.d.ts → types-BEEMfNi2.d.cts} +24 -4
- package/dist/{types-BShYNpvO.d.cts → types-DQDUqzsZ.d.ts} +24 -4
- package/dist/withdraw.cjs +6 -5
- package/dist/withdraw.d.cts +4 -3
- package/dist/withdraw.d.ts +4 -3
- package/dist/withdraw.mjs +5 -4
- package/package.json +9 -17
- package/dist/WithdrawModal-DY6A55OA.mjs +0 -11
- package/dist/WithdrawModal-V42OK7L3.cjs +0 -11
- package/dist/chunk-ADEWTBSN.cjs +0 -19
- package/dist/chunk-EAGMY3QE.mjs +0 -962
- package/dist/chunk-OY5N3E6L.cjs +0 -962
- package/dist/chunk-PP4QE32S.mjs +0 -19
- package/dist/constants-BT4ctuHo.d.cts +0 -64
- package/dist/constants-D21ZdNOP.d.ts +0 -64
- package/dist/offramp.cjs +0 -25
- package/dist/offramp.d.cts +0 -28
- package/dist/offramp.d.ts +0 -28
- package/dist/offramp.mjs +0 -25
- package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
- package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
package/dist/chunk-PP4QE32S.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/core/ramp-utils.ts
|
|
2
|
-
function rampQuery(value) {
|
|
3
|
-
return new URLSearchParams(
|
|
4
|
-
Object.entries(value).filter(([, value2]) => value2 !== void 0).map(([key, value2]) => [key, String(value2)])
|
|
5
|
-
).toString();
|
|
6
|
-
}
|
|
7
|
-
function rampResourceId(value) {
|
|
8
|
-
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(
|
|
9
|
-
value
|
|
10
|
-
)) {
|
|
11
|
-
throw new Error("Invalid ramp resource ID");
|
|
12
|
-
}
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
rampQuery,
|
|
18
|
-
rampResourceId
|
|
19
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { D as DisplayChainId } from './caip-BMi-9t09.cjs';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
|
|
4
|
-
declare function getChainIcon(chainId: DisplayChainId): string | undefined;
|
|
5
|
-
declare function tokenIconUrl(symbol: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use {@link tokenIconUrl} and render via `<TokenIcon>` (or your own
|
|
8
|
-
* `<img onError>`). Kept as a compatibility alias for existing consumers: it now
|
|
9
|
-
* always returns the CDN URL (icons moved off the inline bundle), so it no
|
|
10
|
-
* longer signals "unknown" with `undefined` — a symbol with no hosted SVG yields
|
|
11
|
-
* a URL that 404s. Handle load failure at the render site.
|
|
12
|
-
*/
|
|
13
|
-
declare function getTokenIcon(symbol: string): string;
|
|
14
|
-
|
|
15
|
-
declare const NATIVE_TOKEN_ADDRESS: Address;
|
|
16
|
-
/**
|
|
17
|
-
* Source chains this release knows by name, in picker order.
|
|
18
|
-
*
|
|
19
|
-
* Ids, not viem `Chain` objects: `/chains` is the source of truth for what a
|
|
20
|
-
* chain IS — its name, RPC, explorer, gas token — and this is only the
|
|
21
|
-
* curated subset with a bundled token matrix and display order.
|
|
22
|
-
*/
|
|
23
|
-
declare const SUPPORTED_CHAIN_IDS: readonly number[];
|
|
24
|
-
type ChainRegistryToken = {
|
|
25
|
-
symbol: string;
|
|
26
|
-
address: Address;
|
|
27
|
-
decimals: number;
|
|
28
|
-
};
|
|
29
|
-
type ChainRegistryEntry = {
|
|
30
|
-
name: string;
|
|
31
|
-
tokens: readonly ChainRegistryToken[];
|
|
32
|
-
};
|
|
33
|
-
declare const chainRegistry: Record<string, ChainRegistryEntry>;
|
|
34
|
-
type SupportedTokenOption = {
|
|
35
|
-
symbol: string;
|
|
36
|
-
address: Address;
|
|
37
|
-
decimals: number;
|
|
38
|
-
};
|
|
39
|
-
declare function getChainId(chain: {
|
|
40
|
-
id: number;
|
|
41
|
-
} | number): number;
|
|
42
|
-
declare function getUsdcAddress(chainId: number): Address | undefined;
|
|
43
|
-
declare function getUsdcDecimals(chainId: number): number;
|
|
44
|
-
declare function getTokenAddress(symbol: string, chainId: number): Address | undefined;
|
|
45
|
-
declare function getTokenDecimals(symbol: string, chainId: number): number;
|
|
46
|
-
declare function getTargetTokenSymbolsForChain(chainId: number): string[];
|
|
47
|
-
declare function getSupportedTokenSymbolsForChain(chainId: number): string[];
|
|
48
|
-
declare function getSupportedChainIds(): number[];
|
|
49
|
-
declare function isSupportedTokenAddressForChain(token: Address, chainId: number): boolean;
|
|
50
|
-
declare function getSupportedTargetTokens(chainId: number): SupportedTokenOption[];
|
|
51
|
-
declare function getTokenDecimalsByAddress(token: Address, chainId?: number): number;
|
|
52
|
-
declare function findChainIdForToken(address: Address): number | undefined;
|
|
53
|
-
declare function getTokenSymbol(token: Address, chainId?: number): string;
|
|
54
|
-
declare function getChainName(chainId: DisplayChainId): string;
|
|
55
|
-
declare function getChainBadge(chainId: DisplayChainId): {
|
|
56
|
-
shortLabel: string;
|
|
57
|
-
color: string;
|
|
58
|
-
bg: string;
|
|
59
|
-
};
|
|
60
|
-
declare function getExplorerUrl(chainId: DisplayChainId): string | undefined;
|
|
61
|
-
declare function getExplorerTxUrl(chainId: DisplayChainId, txHash: string): string | undefined;
|
|
62
|
-
declare function getExplorerName(chainId: DisplayChainId): string;
|
|
63
|
-
|
|
64
|
-
export { NATIVE_TOKEN_ADDRESS as N, SUPPORTED_CHAIN_IDS as S, getChainIcon as a, getChainId as b, chainRegistry as c, getChainName as d, getExplorerName as e, findChainIdForToken as f, getChainBadge as g, getExplorerTxUrl as h, getExplorerUrl as i, getSupportedChainIds as j, getSupportedTargetTokens as k, getSupportedTokenSymbolsForChain as l, getTargetTokenSymbolsForChain as m, getTokenAddress as n, getTokenDecimals as o, getTokenDecimalsByAddress as p, getTokenIcon as q, getTokenSymbol as r, getUsdcAddress as s, getUsdcDecimals as t, isSupportedTokenAddressForChain as u, tokenIconUrl as v, type SupportedTokenOption as w };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { D as DisplayChainId } from './caip-BMi-9t09.js';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
|
|
4
|
-
declare function getChainIcon(chainId: DisplayChainId): string | undefined;
|
|
5
|
-
declare function tokenIconUrl(symbol: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use {@link tokenIconUrl} and render via `<TokenIcon>` (or your own
|
|
8
|
-
* `<img onError>`). Kept as a compatibility alias for existing consumers: it now
|
|
9
|
-
* always returns the CDN URL (icons moved off the inline bundle), so it no
|
|
10
|
-
* longer signals "unknown" with `undefined` — a symbol with no hosted SVG yields
|
|
11
|
-
* a URL that 404s. Handle load failure at the render site.
|
|
12
|
-
*/
|
|
13
|
-
declare function getTokenIcon(symbol: string): string;
|
|
14
|
-
|
|
15
|
-
declare const NATIVE_TOKEN_ADDRESS: Address;
|
|
16
|
-
/**
|
|
17
|
-
* Source chains this release knows by name, in picker order.
|
|
18
|
-
*
|
|
19
|
-
* Ids, not viem `Chain` objects: `/chains` is the source of truth for what a
|
|
20
|
-
* chain IS — its name, RPC, explorer, gas token — and this is only the
|
|
21
|
-
* curated subset with a bundled token matrix and display order.
|
|
22
|
-
*/
|
|
23
|
-
declare const SUPPORTED_CHAIN_IDS: readonly number[];
|
|
24
|
-
type ChainRegistryToken = {
|
|
25
|
-
symbol: string;
|
|
26
|
-
address: Address;
|
|
27
|
-
decimals: number;
|
|
28
|
-
};
|
|
29
|
-
type ChainRegistryEntry = {
|
|
30
|
-
name: string;
|
|
31
|
-
tokens: readonly ChainRegistryToken[];
|
|
32
|
-
};
|
|
33
|
-
declare const chainRegistry: Record<string, ChainRegistryEntry>;
|
|
34
|
-
type SupportedTokenOption = {
|
|
35
|
-
symbol: string;
|
|
36
|
-
address: Address;
|
|
37
|
-
decimals: number;
|
|
38
|
-
};
|
|
39
|
-
declare function getChainId(chain: {
|
|
40
|
-
id: number;
|
|
41
|
-
} | number): number;
|
|
42
|
-
declare function getUsdcAddress(chainId: number): Address | undefined;
|
|
43
|
-
declare function getUsdcDecimals(chainId: number): number;
|
|
44
|
-
declare function getTokenAddress(symbol: string, chainId: number): Address | undefined;
|
|
45
|
-
declare function getTokenDecimals(symbol: string, chainId: number): number;
|
|
46
|
-
declare function getTargetTokenSymbolsForChain(chainId: number): string[];
|
|
47
|
-
declare function getSupportedTokenSymbolsForChain(chainId: number): string[];
|
|
48
|
-
declare function getSupportedChainIds(): number[];
|
|
49
|
-
declare function isSupportedTokenAddressForChain(token: Address, chainId: number): boolean;
|
|
50
|
-
declare function getSupportedTargetTokens(chainId: number): SupportedTokenOption[];
|
|
51
|
-
declare function getTokenDecimalsByAddress(token: Address, chainId?: number): number;
|
|
52
|
-
declare function findChainIdForToken(address: Address): number | undefined;
|
|
53
|
-
declare function getTokenSymbol(token: Address, chainId?: number): string;
|
|
54
|
-
declare function getChainName(chainId: DisplayChainId): string;
|
|
55
|
-
declare function getChainBadge(chainId: DisplayChainId): {
|
|
56
|
-
shortLabel: string;
|
|
57
|
-
color: string;
|
|
58
|
-
bg: string;
|
|
59
|
-
};
|
|
60
|
-
declare function getExplorerUrl(chainId: DisplayChainId): string | undefined;
|
|
61
|
-
declare function getExplorerTxUrl(chainId: DisplayChainId, txHash: string): string | undefined;
|
|
62
|
-
declare function getExplorerName(chainId: DisplayChainId): string;
|
|
63
|
-
|
|
64
|
-
export { NATIVE_TOKEN_ADDRESS as N, SUPPORTED_CHAIN_IDS as S, getChainIcon as a, getChainId as b, chainRegistry as c, getChainName as d, getExplorerName as e, findChainIdForToken as f, getChainBadge as g, getExplorerTxUrl as h, getExplorerUrl as i, getSupportedChainIds as j, getSupportedTargetTokens as k, getSupportedTokenSymbolsForChain as l, getTargetTokenSymbolsForChain as m, getTokenAddress as n, getTokenDecimals as o, getTokenDecimalsByAddress as p, getTokenIcon as q, getTokenSymbol as r, getUsdcAddress as s, getUsdcDecimals as t, isSupportedTokenAddressForChain as u, tokenIconUrl as v, type SupportedTokenOption as w };
|
package/dist/offramp.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkADEWTBSNcjs = require('./chunk-ADEWTBSN.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkISLVD5HQcjs = require('./chunk-ISLVD5HQ.cjs');
|
|
9
|
-
require('./chunk-PYOC6K24.cjs');
|
|
10
|
-
|
|
11
|
-
// src/core/offramp-service.ts
|
|
12
|
-
function createOfframpService(options) {
|
|
13
|
-
const request = _chunkISLVD5HQcjs.createBearerTransport.call(void 0, options);
|
|
14
|
-
return {
|
|
15
|
-
createSession: (body) => request("/offramp/noah/sessions", body),
|
|
16
|
-
getSession: (id) => request(`/offramp/noah/sessions/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`),
|
|
17
|
-
getOptions: (intent) => request(`/offramp/noah/options?${_chunkADEWTBSNcjs.rampQuery.call(void 0, intent)}`),
|
|
18
|
-
listPayments: (page = {}) => request(`/offramp/noah/payments?${_chunkADEWTBSNcjs.rampQuery.call(void 0, page)}`),
|
|
19
|
-
getPayment: (id) => request(`/offramp/noah/payments/${_chunkADEWTBSNcjs.rampResourceId.call(void 0, id)}`)
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.ScopedRequestError = _chunkISLVD5HQcjs.ScopedRequestError; exports.createOfframpService = createOfframpService;
|
package/dist/offramp.d.cts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.cjs';
|
|
2
|
-
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.cjs';
|
|
3
|
-
import { B as BankIntent, R as RampPayment, P as PaymentLegStatus, a as PaymentReturnStatus, b as RampSession, c as RampPage, d as RampOption, e as RampPagination } from './ramp-types-C6aUz4SZ.cjs';
|
|
4
|
-
export { H as HostedNextAction, f as RampCurrency } from './ramp-types-C6aUz4SZ.cjs';
|
|
5
|
-
|
|
6
|
-
interface OfframpSessionRequest extends BankIntent {
|
|
7
|
-
purpose: "beneficiary_collection";
|
|
8
|
-
}
|
|
9
|
-
interface OfframpOptionsRequest extends BankIntent {
|
|
10
|
-
/** Decimal fiat major units the recipient receives, not crypto input. */
|
|
11
|
-
amount: string;
|
|
12
|
-
}
|
|
13
|
-
interface OfframpPayment extends RampPayment {
|
|
14
|
-
funding: PaymentLegStatus;
|
|
15
|
-
payout: PaymentLegStatus;
|
|
16
|
-
reversal: PaymentReturnStatus;
|
|
17
|
-
cryptoReturn: PaymentReturnStatus;
|
|
18
|
-
}
|
|
19
|
-
/** No requests until an offramp method is called. */
|
|
20
|
-
declare function createOfframpService(options: CustomerSessionOptions): {
|
|
21
|
-
createSession: (body: OfframpSessionRequest) => Promise<RampSession>;
|
|
22
|
-
getSession: (id: string) => Promise<RampSession>;
|
|
23
|
-
getOptions: (intent: OfframpOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
24
|
-
listPayments: (page?: RampPagination) => Promise<RampPage<OfframpPayment>>;
|
|
25
|
-
getPayment: (id: string) => Promise<OfframpPayment>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { CustomerSessionOptions, type OfframpOptionsRequest, type OfframpPayment, type OfframpSessionRequest, PaymentLegStatus, PaymentReturnStatus, RampOption, RampPage, RampPagination, RampSession, createOfframpService };
|
package/dist/offramp.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { C as CustomerSessionOptions } from './bearer-transport-CVHNBgoV.js';
|
|
2
|
-
export { a as CustomerSession, S as ScopedRequestError } from './bearer-transport-CVHNBgoV.js';
|
|
3
|
-
import { B as BankIntent, R as RampPayment, P as PaymentLegStatus, a as PaymentReturnStatus, b as RampSession, c as RampPage, d as RampOption, e as RampPagination } from './ramp-types-C6aUz4SZ.js';
|
|
4
|
-
export { H as HostedNextAction, f as RampCurrency } from './ramp-types-C6aUz4SZ.js';
|
|
5
|
-
|
|
6
|
-
interface OfframpSessionRequest extends BankIntent {
|
|
7
|
-
purpose: "beneficiary_collection";
|
|
8
|
-
}
|
|
9
|
-
interface OfframpOptionsRequest extends BankIntent {
|
|
10
|
-
/** Decimal fiat major units the recipient receives, not crypto input. */
|
|
11
|
-
amount: string;
|
|
12
|
-
}
|
|
13
|
-
interface OfframpPayment extends RampPayment {
|
|
14
|
-
funding: PaymentLegStatus;
|
|
15
|
-
payout: PaymentLegStatus;
|
|
16
|
-
reversal: PaymentReturnStatus;
|
|
17
|
-
cryptoReturn: PaymentReturnStatus;
|
|
18
|
-
}
|
|
19
|
-
/** No requests until an offramp method is called. */
|
|
20
|
-
declare function createOfframpService(options: CustomerSessionOptions): {
|
|
21
|
-
createSession: (body: OfframpSessionRequest) => Promise<RampSession>;
|
|
22
|
-
getSession: (id: string) => Promise<RampSession>;
|
|
23
|
-
getOptions: (intent: OfframpOptionsRequest) => Promise<RampPage<RampOption>>;
|
|
24
|
-
listPayments: (page?: RampPagination) => Promise<RampPage<OfframpPayment>>;
|
|
25
|
-
getPayment: (id: string) => Promise<OfframpPayment>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { CustomerSessionOptions, type OfframpOptionsRequest, type OfframpPayment, type OfframpSessionRequest, PaymentLegStatus, PaymentReturnStatus, RampOption, RampPage, RampPagination, RampSession, createOfframpService };
|
package/dist/offramp.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
rampQuery,
|
|
3
|
-
rampResourceId
|
|
4
|
-
} from "./chunk-PP4QE32S.mjs";
|
|
5
|
-
import {
|
|
6
|
-
ScopedRequestError,
|
|
7
|
-
createBearerTransport
|
|
8
|
-
} from "./chunk-ZGHVJ2XM.mjs";
|
|
9
|
-
import "./chunk-X6N2XPTO.mjs";
|
|
10
|
-
|
|
11
|
-
// src/core/offramp-service.ts
|
|
12
|
-
function createOfframpService(options) {
|
|
13
|
-
const request = createBearerTransport(options);
|
|
14
|
-
return {
|
|
15
|
-
createSession: (body) => request("/offramp/noah/sessions", body),
|
|
16
|
-
getSession: (id) => request(`/offramp/noah/sessions/${rampResourceId(id)}`),
|
|
17
|
-
getOptions: (intent) => request(`/offramp/noah/options?${rampQuery(intent)}`),
|
|
18
|
-
listPayments: (page = {}) => request(`/offramp/noah/payments?${rampQuery(page)}`),
|
|
19
|
-
getPayment: (id) => request(`/offramp/noah/payments/${rampResourceId(id)}`)
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
ScopedRequestError,
|
|
24
|
-
createOfframpService
|
|
25
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
type RampCurrency = "EUR" | "USD";
|
|
2
|
-
interface BankIntent {
|
|
3
|
-
country: string;
|
|
4
|
-
currency: RampCurrency;
|
|
5
|
-
paymentMethod: "bank_transfer";
|
|
6
|
-
optionId?: string;
|
|
7
|
-
}
|
|
8
|
-
interface HostedNextAction {
|
|
9
|
-
type: "hosted";
|
|
10
|
-
url: string;
|
|
11
|
-
presentation: "iframe";
|
|
12
|
-
}
|
|
13
|
-
interface RampSession {
|
|
14
|
-
id: string;
|
|
15
|
-
/** Interaction completion never proves settlement. */
|
|
16
|
-
status: "pending" | "completed" | "expired" | "failed";
|
|
17
|
-
expiresAt: string;
|
|
18
|
-
nextAction?: HostedNextAction;
|
|
19
|
-
}
|
|
20
|
-
interface RampOption {
|
|
21
|
-
optionId: string;
|
|
22
|
-
currency: RampCurrency;
|
|
23
|
-
paymentMethod: "bank_transfer";
|
|
24
|
-
}
|
|
25
|
-
type PaymentLegStatus = "not_started" | "pending" | "on_hold" | "processing" | "submitted" | "completed" | "failed";
|
|
26
|
-
type PaymentReturnStatus = "none" | "pending" | "processing" | "completed" | "failed";
|
|
27
|
-
interface RampPayment {
|
|
28
|
-
id: string;
|
|
29
|
-
amount: string;
|
|
30
|
-
currency: RampCurrency;
|
|
31
|
-
createdAt: string;
|
|
32
|
-
updatedAt: string;
|
|
33
|
-
}
|
|
34
|
-
interface RampPage<T> {
|
|
35
|
-
items: T[];
|
|
36
|
-
nextCursor?: string;
|
|
37
|
-
}
|
|
38
|
-
interface RampPagination {
|
|
39
|
-
cursor?: string;
|
|
40
|
-
limit?: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type { BankIntent as B, HostedNextAction as H, PaymentLegStatus as P, RampPayment as R, PaymentReturnStatus as a, RampSession as b, RampPage as c, RampOption as d, RampPagination as e, RampCurrency as f };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
type RampCurrency = "EUR" | "USD";
|
|
2
|
-
interface BankIntent {
|
|
3
|
-
country: string;
|
|
4
|
-
currency: RampCurrency;
|
|
5
|
-
paymentMethod: "bank_transfer";
|
|
6
|
-
optionId?: string;
|
|
7
|
-
}
|
|
8
|
-
interface HostedNextAction {
|
|
9
|
-
type: "hosted";
|
|
10
|
-
url: string;
|
|
11
|
-
presentation: "iframe";
|
|
12
|
-
}
|
|
13
|
-
interface RampSession {
|
|
14
|
-
id: string;
|
|
15
|
-
/** Interaction completion never proves settlement. */
|
|
16
|
-
status: "pending" | "completed" | "expired" | "failed";
|
|
17
|
-
expiresAt: string;
|
|
18
|
-
nextAction?: HostedNextAction;
|
|
19
|
-
}
|
|
20
|
-
interface RampOption {
|
|
21
|
-
optionId: string;
|
|
22
|
-
currency: RampCurrency;
|
|
23
|
-
paymentMethod: "bank_transfer";
|
|
24
|
-
}
|
|
25
|
-
type PaymentLegStatus = "not_started" | "pending" | "on_hold" | "processing" | "submitted" | "completed" | "failed";
|
|
26
|
-
type PaymentReturnStatus = "none" | "pending" | "processing" | "completed" | "failed";
|
|
27
|
-
interface RampPayment {
|
|
28
|
-
id: string;
|
|
29
|
-
amount: string;
|
|
30
|
-
currency: RampCurrency;
|
|
31
|
-
createdAt: string;
|
|
32
|
-
updatedAt: string;
|
|
33
|
-
}
|
|
34
|
-
interface RampPage<T> {
|
|
35
|
-
items: T[];
|
|
36
|
-
nextCursor?: string;
|
|
37
|
-
}
|
|
38
|
-
interface RampPagination {
|
|
39
|
-
cursor?: string;
|
|
40
|
-
limit?: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type { BankIntent as B, HostedNextAction as H, PaymentLegStatus as P, RampPayment as R, PaymentReturnStatus as a, RampSession as b, RampPage as c, RampOption as d, RampPagination as e, RampCurrency as f };
|