@armory-sh/base 0.2.1 → 0.2.4

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.
@@ -66,14 +66,6 @@ export declare function createPaymentRequiredHeaders(requirements: PaymentRequir
66
66
  * Create settlement response headers
67
67
  */
68
68
  export declare function createSettlementHeaders(settlement: SettlementResponse): Record<string, string>;
69
- export declare const encodePaymentV1: typeof encodePayment;
70
- export declare const decodePaymentV1: typeof decodePayment;
71
- export declare const encodePaymentV2: typeof encodePayment;
72
- export declare const decodePaymentV2: typeof decodePayment;
73
- export declare const encodeSettlementV1: typeof encodeSettlementResponse;
74
- export declare const decodeSettlementV1: typeof decodeSettlementResponse;
75
- export declare const encodeSettlementV2: typeof encodeSettlementResponse;
76
- export declare const decodeSettlementV2: typeof decodeSettlementResponse;
77
69
  /**
78
70
  * Type guards for legacy compatibility
79
71
  */
package/dist/index.d.ts CHANGED
@@ -16,4 +16,4 @@ export type { TypedDataDomain, EIP712Domain, TransferWithAuthorization, TypedDat
16
16
  export { EIP712_TYPES, USDC_DOMAIN, createEIP712Domain, createTransferWithAuthorization, validateTransferWithAuthorization, } from "./eip712";
17
17
  export { resolveNetwork, resolveToken, resolveFacilitator, checkFacilitatorSupport, validatePaymentConfig, validateAcceptConfig, getAvailableNetworks, getAvailableTokens, isValidationError, isResolvedNetwork, isResolvedToken, createError, } from "./validation";
18
18
  export { encodePaymentV1, decodePaymentV1, encodeSettlementV1, decodeSettlementV1, encodePaymentV2, decodePaymentV2, encodeSettlementV2, decodeSettlementV2, detectPaymentVersion as detectPaymentVersionLegacy, decodePayment as decodePaymentLegacy, decodeSettlement as decodeSettlementLegacy, isPaymentV1, isPaymentV2, isSettlementV1, isSettlementV2, } from "./encoding";
19
- export type { NetworkId, TokenId, FacilitatorConfig, AcceptPaymentOptions, PaymentResult, PaymentError, PaymentErrorCode, ArmoryPaymentResult, ResolvedNetwork, ResolvedToken, ResolvedFacilitator, ResolvedPaymentConfig, ValidationError, } from "./types/simple";
19
+ export type { NetworkId, TokenId, FacilitatorConfig, AcceptPaymentOptions, PricingConfig, PaymentResult, PaymentError, PaymentErrorCode, ArmoryPaymentResult, ResolvedNetwork, ResolvedToken, ResolvedFacilitator, ResolvedPaymentConfig, ValidationError, } from "./types/simple";
@@ -31,6 +31,19 @@ export interface FacilitatorConfig {
31
31
  /** Tokens this facilitator supports (optional) */
32
32
  tokens?: TokenId[];
33
33
  }
34
+ /**
35
+ * Pricing configuration for a specific network/token/facilitator combination
36
+ */
37
+ export interface PricingConfig {
38
+ /** Network for this pricing */
39
+ network?: NetworkId;
40
+ /** Token for this pricing */
41
+ token?: TokenId;
42
+ /** Facilitator URL for this pricing (optional - applies to all facilitators if not specified) */
43
+ facilitator?: string;
44
+ /** Amount to charge */
45
+ amount: string;
46
+ }
34
47
  /**
35
48
  * Payment accept options for merchants (v2 multi-support)
36
49
  */
@@ -43,6 +56,8 @@ export interface AcceptPaymentOptions {
43
56
  facilitators?: FacilitatorConfig | FacilitatorConfig[];
44
57
  /** Protocol version (default: auto-detect) */
45
58
  version?: 1 | 2 | "auto";
59
+ /** Pricing configurations - if not provided, uses amount from top-level config */
60
+ pricing?: PricingConfig[];
46
61
  }
47
62
  /**
48
63
  * Result of a payment attempt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armory-sh/base",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "license": "MIT",
5
5
  "author": "Sawyer Cutler <sawyer@dirtroad.dev>",
6
6
  "type": "module",