@recoilpay/intent-core 0.3.0 → 0.4.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.
package/dist/index.cjs CHANGED
@@ -47,9 +47,12 @@ __export(index_exports, {
47
47
  createOfframpSession: () => createOfframpSession,
48
48
  explorerUrl: () => explorerUrl,
49
49
  extractIntents: () => extractIntents,
50
+ fiatClaimMessage: () => fiatClaimMessage,
50
51
  fiatConfirmMessage: () => fiatConfirmMessage,
51
52
  fiatDisputeMessage: () => fiatDisputeMessage,
52
53
  fiatPaymentSentMessage: () => fiatPaymentSentMessage,
54
+ fiatRevealMessage: () => fiatRevealMessage,
55
+ fiatStatementMessage: () => fiatStatementMessage,
53
56
  findAsset: () => findAsset,
54
57
  formatFiat: () => formatFiat,
55
58
  getPermit2Allowance: () => getPermit2Allowance,
@@ -1426,6 +1429,15 @@ function fiatDisputeMessage(tradeId, reason) {
1426
1429
  function fiatPaymentSentMessage(tradeId, reference) {
1427
1430
  return `RecoilPay: I have sent the fiat payment for trade ${tradeId}. Reference: ${reference.trim()}`;
1428
1431
  }
1432
+ function fiatClaimMessage(tradeId, reason) {
1433
+ return `RecoilPay: I claim the fiat payment for trade ${tradeId} never arrived. Reason: ${reason.trim()}`;
1434
+ }
1435
+ function fiatRevealMessage(tradeId) {
1436
+ return `RecoilPay: I reveal the bank details I gave for trade ${tradeId}.`;
1437
+ }
1438
+ function fiatStatementMessage(tradeId, text) {
1439
+ return `RecoilPay: My statement on trade ${tradeId}: ${text.trim()}`;
1440
+ }
1429
1441
 
1430
1442
  // src/fiat/offramp.ts
1431
1443
  var TERMINAL = ["settled_to_fiat_payer", "refunded_to_funder", "failed"];
@@ -1717,9 +1729,12 @@ function createOfframpSession(options = {}) {
1717
1729
  createOfframpSession,
1718
1730
  explorerUrl,
1719
1731
  extractIntents,
1732
+ fiatClaimMessage,
1720
1733
  fiatConfirmMessage,
1721
1734
  fiatDisputeMessage,
1722
1735
  fiatPaymentSentMessage,
1736
+ fiatRevealMessage,
1737
+ fiatStatementMessage,
1723
1738
  findAsset,
1724
1739
  formatFiat,
1725
1740
  getPermit2Allowance,
package/dist/index.d.cts CHANGED
@@ -1044,5 +1044,15 @@ declare function fiatConfirmMessage(tradeId: string): string;
1044
1044
  declare function fiatDisputeMessage(tradeId: string, reason: string): string;
1045
1045
  /** A user who pays fiat (on-ramp) says it is sent, with the transfer's reference. */
1046
1046
  declare function fiatPaymentSentMessage(tradeId: string, reference: string): string;
1047
+ /** After settlement, the fiat receiver says the payout never arrived: a late
1048
+ * claim against the solver's bond (within 72 hours of settlement). */
1049
+ declare function fiatClaimMessage(tradeId: string, reason: string): string;
1050
+ /** The user reveals the bank details they sealed, to prove in a dispute or
1051
+ * claim which account the solver was told to pay. The details go in the
1052
+ * request; the aggregator checks them against the trade's commitment and
1053
+ * keeps only the last four digits. */
1054
+ declare function fiatRevealMessage(tradeId: string): string;
1055
+ /** A user's statement on a contested trade; the text is part of what is signed. */
1056
+ declare function fiatStatementMessage(tradeId: string, text: string): string;
1047
1057
 
1048
- export { type AggregationMetadata, type AmountKind, type ApiClient, ApiError, type ApiOptions, type AssetAmount, type AssetLockReference, BANK_DETAILS_HINT, CHAIN_ALIASES, type CanonicalChain, type ChainInfo, type ChainReader, DEFAULT_API_URL, DEFAULT_INTENT_MODEL, EMPTY_SUPPORTED, FIAT_CORRIDORS, FIAT_CURRENCY_ALIASES, type FiatBank, type FiatCorridor, type FiatDirection, type FiatLockInstructions, type FiatPayee, type FiatTrade, type FiatTradeState, HF_ROUTER_URL, type Input, type IntentAction, type IntentPhase, type IntentPreview, type IntentRequest, type IntentSession, type IntentState, type IntentWallet, type InteropAddress, type IssueField, type IssueKind, MAX_UINT256, NG_BANKS, type OfframpOptions, type OfframpPhase, type OfframpPreview, type OfframpRequest, type OfframpSession, type OfframpState, type OpenFiatTradeRequest, type OpenFiatTradeResponse, type OpenedPayee, type Order, type OrderPayload, type OrderRequest, type OrderResponse, type OrderStatus, type OriginSubmission, type Output, PERMIT2_ADDRESS, type ParseResult, type ParserOptions, type PayeeIdentity, type Quote, type QuotePreview, type QuoteRequest, type QuotesResponse, type RankFiatQuotesRequest, type RankFiatQuotesResponse, type RankedFiatQuote, type RawIntent, type ResolvedIntent, SOLANA_CHAIN_IDS, type SealedPayee, type SessionOptions, type Settlement, type Solver, type SolverAsset, type SolverOptions, type SolverSupportedAssets, type SolversResponse, type SupportedSet, TEMPLATE_HINT, TOKEN_ALIASES, type TypedDataSigner, type ValidationIssue, buildOrderRequest, buildPermit2ApproveRequest, buildQuoteRequest, buildSupportedSet, canonicalPayeeIdentity, chainName, checkLock, createApiClient, createIntentSession, createOfframpSession, explorerUrl, extractIntents, fiatConfirmMessage, fiatDisputeMessage, fiatPaymentSentMessage, findAsset, formatFiat, getPermit2Allowance, hasPermit2Allowance, interopAddress, isTerminalStatus, looksLikeBankDetails, normalizeChain, normalizeFiatCurrency, normalizeToken, openPayee, parseIntent, payeeCommitment, payeeIdentity, resolveIntent, resolveOfframp, rpcReaders, sealPayee, signQuote, stripDomainType, validateIntent, validateOfframp, viemWallet };
1058
+ export { type AggregationMetadata, type AmountKind, type ApiClient, ApiError, type ApiOptions, type AssetAmount, type AssetLockReference, BANK_DETAILS_HINT, CHAIN_ALIASES, type CanonicalChain, type ChainInfo, type ChainReader, DEFAULT_API_URL, DEFAULT_INTENT_MODEL, EMPTY_SUPPORTED, FIAT_CORRIDORS, FIAT_CURRENCY_ALIASES, type FiatBank, type FiatCorridor, type FiatDirection, type FiatLockInstructions, type FiatPayee, type FiatTrade, type FiatTradeState, HF_ROUTER_URL, type Input, type IntentAction, type IntentPhase, type IntentPreview, type IntentRequest, type IntentSession, type IntentState, type IntentWallet, type InteropAddress, type IssueField, type IssueKind, MAX_UINT256, NG_BANKS, type OfframpOptions, type OfframpPhase, type OfframpPreview, type OfframpRequest, type OfframpSession, type OfframpState, type OpenFiatTradeRequest, type OpenFiatTradeResponse, type OpenedPayee, type Order, type OrderPayload, type OrderRequest, type OrderResponse, type OrderStatus, type OriginSubmission, type Output, PERMIT2_ADDRESS, type ParseResult, type ParserOptions, type PayeeIdentity, type Quote, type QuotePreview, type QuoteRequest, type QuotesResponse, type RankFiatQuotesRequest, type RankFiatQuotesResponse, type RankedFiatQuote, type RawIntent, type ResolvedIntent, SOLANA_CHAIN_IDS, type SealedPayee, type SessionOptions, type Settlement, type Solver, type SolverAsset, type SolverOptions, type SolverSupportedAssets, type SolversResponse, type SupportedSet, TEMPLATE_HINT, TOKEN_ALIASES, type TypedDataSigner, type ValidationIssue, buildOrderRequest, buildPermit2ApproveRequest, buildQuoteRequest, buildSupportedSet, canonicalPayeeIdentity, chainName, checkLock, createApiClient, createIntentSession, createOfframpSession, explorerUrl, extractIntents, fiatClaimMessage, fiatConfirmMessage, fiatDisputeMessage, fiatPaymentSentMessage, fiatRevealMessage, fiatStatementMessage, findAsset, formatFiat, getPermit2Allowance, hasPermit2Allowance, interopAddress, isTerminalStatus, looksLikeBankDetails, normalizeChain, normalizeFiatCurrency, normalizeToken, openPayee, parseIntent, payeeCommitment, payeeIdentity, resolveIntent, resolveOfframp, rpcReaders, sealPayee, signQuote, stripDomainType, validateIntent, validateOfframp, viemWallet };
package/dist/index.d.ts CHANGED
@@ -1044,5 +1044,15 @@ declare function fiatConfirmMessage(tradeId: string): string;
1044
1044
  declare function fiatDisputeMessage(tradeId: string, reason: string): string;
1045
1045
  /** A user who pays fiat (on-ramp) says it is sent, with the transfer's reference. */
1046
1046
  declare function fiatPaymentSentMessage(tradeId: string, reference: string): string;
1047
+ /** After settlement, the fiat receiver says the payout never arrived: a late
1048
+ * claim against the solver's bond (within 72 hours of settlement). */
1049
+ declare function fiatClaimMessage(tradeId: string, reason: string): string;
1050
+ /** The user reveals the bank details they sealed, to prove in a dispute or
1051
+ * claim which account the solver was told to pay. The details go in the
1052
+ * request; the aggregator checks them against the trade's commitment and
1053
+ * keeps only the last four digits. */
1054
+ declare function fiatRevealMessage(tradeId: string): string;
1055
+ /** A user's statement on a contested trade; the text is part of what is signed. */
1056
+ declare function fiatStatementMessage(tradeId: string, text: string): string;
1047
1057
 
1048
- export { type AggregationMetadata, type AmountKind, type ApiClient, ApiError, type ApiOptions, type AssetAmount, type AssetLockReference, BANK_DETAILS_HINT, CHAIN_ALIASES, type CanonicalChain, type ChainInfo, type ChainReader, DEFAULT_API_URL, DEFAULT_INTENT_MODEL, EMPTY_SUPPORTED, FIAT_CORRIDORS, FIAT_CURRENCY_ALIASES, type FiatBank, type FiatCorridor, type FiatDirection, type FiatLockInstructions, type FiatPayee, type FiatTrade, type FiatTradeState, HF_ROUTER_URL, type Input, type IntentAction, type IntentPhase, type IntentPreview, type IntentRequest, type IntentSession, type IntentState, type IntentWallet, type InteropAddress, type IssueField, type IssueKind, MAX_UINT256, NG_BANKS, type OfframpOptions, type OfframpPhase, type OfframpPreview, type OfframpRequest, type OfframpSession, type OfframpState, type OpenFiatTradeRequest, type OpenFiatTradeResponse, type OpenedPayee, type Order, type OrderPayload, type OrderRequest, type OrderResponse, type OrderStatus, type OriginSubmission, type Output, PERMIT2_ADDRESS, type ParseResult, type ParserOptions, type PayeeIdentity, type Quote, type QuotePreview, type QuoteRequest, type QuotesResponse, type RankFiatQuotesRequest, type RankFiatQuotesResponse, type RankedFiatQuote, type RawIntent, type ResolvedIntent, SOLANA_CHAIN_IDS, type SealedPayee, type SessionOptions, type Settlement, type Solver, type SolverAsset, type SolverOptions, type SolverSupportedAssets, type SolversResponse, type SupportedSet, TEMPLATE_HINT, TOKEN_ALIASES, type TypedDataSigner, type ValidationIssue, buildOrderRequest, buildPermit2ApproveRequest, buildQuoteRequest, buildSupportedSet, canonicalPayeeIdentity, chainName, checkLock, createApiClient, createIntentSession, createOfframpSession, explorerUrl, extractIntents, fiatConfirmMessage, fiatDisputeMessage, fiatPaymentSentMessage, findAsset, formatFiat, getPermit2Allowance, hasPermit2Allowance, interopAddress, isTerminalStatus, looksLikeBankDetails, normalizeChain, normalizeFiatCurrency, normalizeToken, openPayee, parseIntent, payeeCommitment, payeeIdentity, resolveIntent, resolveOfframp, rpcReaders, sealPayee, signQuote, stripDomainType, validateIntent, validateOfframp, viemWallet };
1058
+ export { type AggregationMetadata, type AmountKind, type ApiClient, ApiError, type ApiOptions, type AssetAmount, type AssetLockReference, BANK_DETAILS_HINT, CHAIN_ALIASES, type CanonicalChain, type ChainInfo, type ChainReader, DEFAULT_API_URL, DEFAULT_INTENT_MODEL, EMPTY_SUPPORTED, FIAT_CORRIDORS, FIAT_CURRENCY_ALIASES, type FiatBank, type FiatCorridor, type FiatDirection, type FiatLockInstructions, type FiatPayee, type FiatTrade, type FiatTradeState, HF_ROUTER_URL, type Input, type IntentAction, type IntentPhase, type IntentPreview, type IntentRequest, type IntentSession, type IntentState, type IntentWallet, type InteropAddress, type IssueField, type IssueKind, MAX_UINT256, NG_BANKS, type OfframpOptions, type OfframpPhase, type OfframpPreview, type OfframpRequest, type OfframpSession, type OfframpState, type OpenFiatTradeRequest, type OpenFiatTradeResponse, type OpenedPayee, type Order, type OrderPayload, type OrderRequest, type OrderResponse, type OrderStatus, type OriginSubmission, type Output, PERMIT2_ADDRESS, type ParseResult, type ParserOptions, type PayeeIdentity, type Quote, type QuotePreview, type QuoteRequest, type QuotesResponse, type RankFiatQuotesRequest, type RankFiatQuotesResponse, type RankedFiatQuote, type RawIntent, type ResolvedIntent, SOLANA_CHAIN_IDS, type SealedPayee, type SessionOptions, type Settlement, type Solver, type SolverAsset, type SolverOptions, type SolverSupportedAssets, type SolversResponse, type SupportedSet, TEMPLATE_HINT, TOKEN_ALIASES, type TypedDataSigner, type ValidationIssue, buildOrderRequest, buildPermit2ApproveRequest, buildQuoteRequest, buildSupportedSet, canonicalPayeeIdentity, chainName, checkLock, createApiClient, createIntentSession, createOfframpSession, explorerUrl, extractIntents, fiatClaimMessage, fiatConfirmMessage, fiatDisputeMessage, fiatPaymentSentMessage, fiatRevealMessage, fiatStatementMessage, findAsset, formatFiat, getPermit2Allowance, hasPermit2Allowance, interopAddress, isTerminalStatus, looksLikeBankDetails, normalizeChain, normalizeFiatCurrency, normalizeToken, openPayee, parseIntent, payeeCommitment, payeeIdentity, resolveIntent, resolveOfframp, rpcReaders, sealPayee, signQuote, stripDomainType, validateIntent, validateOfframp, viemWallet };
package/dist/index.js CHANGED
@@ -1348,6 +1348,15 @@ function fiatDisputeMessage(tradeId, reason) {
1348
1348
  function fiatPaymentSentMessage(tradeId, reference) {
1349
1349
  return `RecoilPay: I have sent the fiat payment for trade ${tradeId}. Reference: ${reference.trim()}`;
1350
1350
  }
1351
+ function fiatClaimMessage(tradeId, reason) {
1352
+ return `RecoilPay: I claim the fiat payment for trade ${tradeId} never arrived. Reason: ${reason.trim()}`;
1353
+ }
1354
+ function fiatRevealMessage(tradeId) {
1355
+ return `RecoilPay: I reveal the bank details I gave for trade ${tradeId}.`;
1356
+ }
1357
+ function fiatStatementMessage(tradeId, text) {
1358
+ return `RecoilPay: My statement on trade ${tradeId}: ${text.trim()}`;
1359
+ }
1351
1360
 
1352
1361
  // src/fiat/offramp.ts
1353
1362
  var TERMINAL = ["settled_to_fiat_payer", "refunded_to_funder", "failed"];
@@ -1638,9 +1647,12 @@ export {
1638
1647
  createOfframpSession,
1639
1648
  explorerUrl,
1640
1649
  extractIntents,
1650
+ fiatClaimMessage,
1641
1651
  fiatConfirmMessage,
1642
1652
  fiatDisputeMessage,
1643
1653
  fiatPaymentSentMessage,
1654
+ fiatRevealMessage,
1655
+ fiatStatementMessage,
1644
1656
  findAsset,
1645
1657
  formatFiat,
1646
1658
  getPermit2Allowance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recoilpay/intent-core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Headless RecoilPay intent flow: parse plain English, quote across solvers, sign, submit and track — no UI, no framework.",
5
5
  "keywords": [
6
6
  "recoilpay",