@namefi/api-client 0.0.0-pre.5 → 0.0.0-pre.6

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
@@ -1,3 +1,3 @@
1
- 'use strict';var client=require('@orpc/client'),fetch=require('@orpc/openapi-client/fetch');var m=Object.defineProperty;var r=(o,t)=>m(o,"name",{value:t,configurable:true});var i={dnsRecords:{getRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records",method:"GET",tags:["dns"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}},route:{path:"/dns/records",method:"GET",tags:["dns"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}}},createDnsRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records",method:"POST",tags:["dns"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}},route:{path:"/dns/records",method:"POST",tags:["dns"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}}},updateRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/{id}",method:"PUT",tags:["dns"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}}},deleteRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}}},updateRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"PUT",tags:["dns"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}}},createRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"POST",tags:["dns"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}},route:{path:"/dns/records/batch",method:"POST",tags:["dns"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}}},deleteRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"DELETE",tags:["dns"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}}},parkDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}},route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}}},isDomainParked:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}},route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}}}},user:{getDomains:{"~orpc":{errorMap:{},meta:{route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}},route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}}},requestNfscFaucet:{"~orpc":{errorMap:{},meta:{route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}},route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}}},getUserOrders:{"~orpc":{errorMap:{},meta:{route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}},route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}}}},orders:{getOrder:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}},route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}}},getOrderItems:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}},route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}}},registerDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain",method:"POST",tags:["orders"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}},route:{path:"/orders/register-domain",method:"POST",tags:["orders"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}}},registerWithRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}},route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}}},getOrderPaymentMethodsDetails:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}},route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}}}},balance:{getBalance:{"~orpc":{errorMap:{},meta:{route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}},route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}}}},search:{checkAvailability:{"~orpc":{errorMap:{},meta:{route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}},route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}}},getSuggestions:{"~orpc":{errorMap:{},meta:{route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}},route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}}}}};function v({authentication:o,logger:t,baseUrl:n="https://backend.astra.namefi.io"}){let{apiKey:d}=o,a=t?typeof t=="object"?t:{info:r((...e)=>console.log(...e),"info"),error:r((...e)=>console.error(...e),"error")}:void 0,s=new URL(n);s.pathname="/"+[...s.pathname.split("/").filter(Boolean),"v-next"].join("/");let c=new fetch.OpenAPILink(i,{url:s.toString(),headers:r(()=>({"x-api-key":d}),"headers"),fetch:r((e,p)=>globalThis.fetch(e,{...p,credentials:"include"}),"fetch"),interceptors:[client.onError(e=>{a?.error(e);}),client.onFinish(e=>{a?.info("Request finished");}),client.onStart(e=>{a?.info("Request started");}),client.onSuccess(e=>{a?.info("Request succeeded");})]});return client.createORPCClient(c)}r(v,"createNamefiClient");
2
- exports.createNamefiClient=v;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var client=require('@orpc/client'),fetch=require('@orpc/openapi-client/fetch');var h=Object.defineProperty;var n=(t,r)=>h(t,"name",{value:r,configurable:true});var p={dnsRecords:{getRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["ZoneSelectEnvelope"],types:{ZoneSelect:[{name:"zoneName",type:"string"}],ZoneSelectEnvelope:[{name:"payload",type:"ZoneSelect"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records",method:"GET",tags:["dns","EIP712"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}},route:{path:"/dns/records",method:"GET",tags:["dns","EIP712"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}}},createDnsRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["CreateDnsRecordEnvelope"],types:{CreateDnsRecord:[{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"},{name:"zoneName",type:"string"}],CreateDnsRecordEnvelope:[{name:"payload",type:"CreateDnsRecord"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records",method:"POST",tags:["dns","EIP712"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}},route:{path:"/dns/records",method:"POST",tags:["dns","EIP712"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}}},updateRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["UpdateDnsRecordEnvelope"],types:{UpdateDnsRecord:[{name:"id",type:"string"},{name:"zoneName",type:"string"},{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"}],UpdateDnsRecordEnvelope:[{name:"payload",type:"UpdateDnsRecord"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns","EIP712"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns","EIP712"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}}},deleteRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["RecordSelectEnvelope"],types:{RecordSelect:[{name:"id",type:"string"},{name:"zoneName",type:"string"}],RecordSelectEnvelope:[{name:"payload",type:"RecordSelect"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns","EIP712"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns","EIP712"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}}},updateRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["UpdateRecordsEnvelope"],types:{UpdateZoneRecord:[{name:"id",type:"string"},{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"}],UpdateRecords:[{name:"records",type:"UpdateZoneRecord[]"},{name:"zoneName",type:"string"}],UpdateRecordsEnvelope:[{name:"payload",type:"UpdateRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns","EIP712"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns","EIP712"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}}},createRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["CreateRecordsEnvelope"],types:{CreateRecords:[{name:"zoneName",type:"string"}],CreateRecordsEnvelope:[{name:"payload",type:"CreateRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"POST",tags:["dns","EIP712"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}},route:{path:"/dns/records/batch",method:"POST",tags:["dns","EIP712"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}}},deleteRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["DeleteRecordsEnvelope"],types:{DeleteRecords:[{name:"recordsIds",type:"string[]"},{name:"zoneName",type:"string"}],DeleteRecordsEnvelope:[{name:"payload",type:"DeleteRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns","EIP712"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns","EIP712"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}}},parkDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}},route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}}},isDomainParked:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}},route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}}}},user:{getDomains:{"~orpc":{errorMap:{},meta:{route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}},route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}}},requestNfscFaucet:{"~orpc":{errorMap:{},meta:{route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}},route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}}},getUserOrders:{"~orpc":{errorMap:{},meta:{route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}},route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}}}},orders:{getOrder:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}},route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}}},getOrderItems:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}},route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}}},registerDomain:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["InstantRegisterDomainEnvelope","InstantRegisterDomainDefaultWalletEnvelope"],types:{InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet:[{name:"chainId",type:"uint256"}],InstantRegisterDomain:[{name:"normalizedDomainName",type:"string"},{name:"durationInYears",type:"uint256"},{name:"nftReceivinggWallet",type:"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet"}],InstantRegisterDomainEnvelope:[{name:"payload",type:"InstantRegisterDomain"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}],InstantRegisterDomainDefaultWallet:[{name:"normalizedDomainName",type:"string"},{name:"durationInYears",type:"uint256"}],InstantRegisterDomainDefaultWalletEnvelope:[{name:"payload",type:"InstantRegisterDomainDefaultWallet"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/orders/register-domain",method:"POST",tags:["orders","EIP712"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}},route:{path:"/orders/register-domain",method:"POST",tags:["orders","EIP712"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}}},registerWithRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}},route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}}},getOrderPaymentMethodsDetails:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}},route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}}}},balance:{getBalance:{"~orpc":{errorMap:{},meta:{route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}},route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}}}},search:{checkAvailability:{"~orpc":{errorMap:{},meta:{route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}},route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}}},getSuggestions:{"~orpc":{errorMap:{},meta:{route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}},route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}}}}};function A({authentication:t,logger:r,baseUrl:a="https://backend.astra.namefi.io"}){let{type:o}=t,s=r?typeof r=="object"?r:{info:n((...e)=>console.log(...e),"info"),error:n((...e)=>console.error(...e),"error")}:void 0,i=new URL(a);i.pathname="/"+[...i.pathname.split("/").filter(Boolean),"v-next"].join("/");let l=new fetch.OpenAPILink(p,{url:i.toString(),headers:n(async(e,d,u)=>{if(o==="API_KEY")return {"x-api-key":t.apiKey};let m=N(d,p)?.["~orpc"]?.meta?.eip712,c=m?.input?.acceptedPrimaryTypes?.[0],{signature:g,address:y}=await t.signer.signTypedData({domain:{name:"Namefi",version:"1"},types:m?.input?.types??{},primaryType:c,message:{payload:u,timestamp:Math.trunc(Date.now()/1e3),nonce:t.signer.generateNonce()}});return {"x-namefi-signer":y,"x-namefi-signature":g,"x-namefi-eip712-type":c}},"headers"),fetch:n((e,d)=>globalThis.fetch(e,{...d,credentials:"include"}),"fetch"),interceptors:[client.onError(e=>{s?.error(e);}),client.onFinish(e=>{s?.info("Request finished");}),client.onStart(e=>{s?.info("Request started");}),client.onSuccess(e=>{s?.info("Request succeeded");})]});return client.createORPCClient(l)}n(A,"createNamefiClient");function N(t,r){let a=r;for(let o of t)if(a&&o in a)a=a[o];else return;return a}n(N,"getPath");
2
+ exports.createNamefiClient=A;//# sourceMappingURL=index.cjs.map
3
3
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../contract.json"],"names":["contract_default","createNamefiClient","authentication","logger","baseUrl","apiKey","_logger","__name","args","url","link","OpenAPILink","request","init","onError","error","onFinish","response","onStart","onSuccess","createORPCClient"],"mappings":"4FAEA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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QAASF,CAAA,CAAA,KAAO,CACd,WAAA,CAAaF,CACf,CAAA,CAAA,CAFS,SAGT,CAAA,CAAA,KAAA,CAAOE,CAAA,CAAA,CAACK,CAASC,CAAAA,CAAAA,GACR,UAAW,CAAA,KAAA,CAAMD,CAAS,CAAA,CAC/B,GAAGC,CACH,CAAA,WAAA,CAAa,SACf,CAAC,CAJI,CAAA,OAAA,CAAA,CAMP,YAAc,CAAA,CACZC,eAASC,CAAU,EAAA,CACjBT,CAAS,EAAA,KAAA,CAAMS,CAAK,EACtB,CAAC,CAAA,CACDC,gBAAUC,CAAa,EAAA,CACrBX,CAAS,EAAA,IAAA,CAAK,kBAAkB,EAClC,CAAC,CAAA,CACDY,cAASN,CAAAA,CAAAA,EAAY,CACnBN,CAAAA,EAAS,IAAK,CAAA,iBAAiB,EACjC,CAAC,EACDa,gBAAWF,CAAAA,CAAAA,EAAa,CACtBX,CAAAA,EAAS,IAAK,CAAA,mBAAmB,EACnC,CAAC,CACH,CACF,CAAC,CAKD,CAAA,OAFEc,uBAAiBV,CAAAA,CAAI,CAGzB,CAlDgBH,EAAAN,CAAA,CAAA,oBAAA,CAAA","file":"index.cjs","sourcesContent":["import type { JsonifiedClient } from '@orpc/openapi-client';\nimport type { ContractRouterClient } from '@orpc/contract';\nimport {\n createORPCClient,\n onError,\n onFinish,\n onStart,\n onSuccess,\n} from '@orpc/client';\nimport { OpenAPILink } from '@orpc/openapi-client/fetch';\nimport contract from '../contract.json';\nimport type { orpcRouter as router } from '@namefi-astra/backend/openapi';\n\ntype CreateNamefiClientOptions = {\n authentication: {\n apiKey: string;\n type: 'API_KEY';\n };\n logger:\n | {\n info: (...args: any[]) => void;\n error: (...args: any[]) => void;\n }\n | boolean\n | undefined;\n baseUrl?: string;\n};\n\nexport function createNamefiClient({\n authentication,\n logger,\n baseUrl = 'https://backend.astra.namefi.io',\n}: CreateNamefiClientOptions) {\n const { apiKey } = authentication;\n const _logger = logger\n ? typeof logger === 'object'\n ? logger\n : {\n info: (...args: any[]) => console.log(...args),\n error: (...args: any[]) => console.error(...args),\n }\n : undefined;\n\n const url = new URL(baseUrl);\n url.pathname =\n '/' + [...url.pathname.split('/').filter(Boolean), 'v-next'].join('/');\n\n const link = new OpenAPILink(contract as unknown as typeof router, {\n url: url.toString(),\n headers: () => ({\n 'x-api-key': apiKey,\n }),\n fetch: (request, init) => {\n return globalThis.fetch(request, {\n ...init,\n credentials: 'include', // Include cookies for cross-origin requests\n });\n },\n interceptors: [\n onError((error) => {\n _logger?.error(error);\n }),\n onFinish((response) => {\n _logger?.info('Request finished');\n }),\n onStart((request) => {\n _logger?.info('Request started');\n }),\n onSuccess((response) => {\n _logger?.info('Request succeeded');\n }),\n ],\n });\n\n const client: JsonifiedClient<ContractRouterClient<typeof router>> =\n createORPCClient(link);\n\n return client;\n}\n","{\n \"dnsRecords\": {\n \"getRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n }\n },\n \"createDnsRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n }\n },\n \"updateRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n }\n },\n \"deleteRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n }\n },\n \"updateRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n }\n },\n \"createRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n }\n },\n \"deleteRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n }\n },\n \"parkDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n }\n },\n \"isDomainParked\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n }\n }\n },\n \"user\": {\n \"getDomains\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n },\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n }\n },\n \"requestNfscFaucet\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n },\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n }\n },\n \"getUserOrders\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n }\n }\n },\n \"orders\": {\n \"getOrder\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n }\n },\n \"getOrderItems\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n }\n },\n \"registerDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n }\n },\n \"registerWithRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n }\n },\n \"getOrderPaymentMethodsDetails\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n }\n }\n },\n \"balance\": {\n \"getBalance\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n },\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n }\n }\n },\n \"search\": {\n \"checkAvailability\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n },\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n }\n },\n \"getSuggestions\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n },\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../contract.json","../src/index.ts"],"names":["contract_default","createNamefiClient","authentication","logger","baseUrl","type","_logger","__name","args","url","link","OpenAPILink","options","path","input","eip712Ctx","getPath","primaryType","signature","address","request","init","onError","error","onFinish","response","onStart","onSuccess","createORPCClient","parts","object","current","part"],"mappings":"6KAAA,IAAAA,CAAAA,CAAA,CACE,UAAc,CAAA,CACZ,UAAc,CAAA,CACZ,OAAS,CAAA,CACP,SAAY,EAAC,CACb,KAAQ,CACN,MAAA,CAAU,CACR,KAAS,CAAA,CACP,oBAAwB,CAAA,CAAC,oBAAoB,CAAA,CAC7C,MAAS,CACP,UAAA,CAAc,CAAC,CAAE,IAAQ,CAAA,UAAA,CAAY,KAAQ,QAAS,CAAC,CACvD,CAAA,kBAAA,CAAsB,CACpB,CAAE,KAAQ,SAAW,CAAA,IAAA,CAAQ,YAAa,CAC1C,CAAA,CAAE,KAAQ,WAAa,CAAA,IAAA,CAAQ,SAAU,CAAA,CACzC,CAAE,IAAA,CAAQ,QAAS,IAAQ,CAAA,QAAS,CACtC,CACF,CACF,CACF,EACA,KAAS,CAAA,CACP,IAAQ,CAAA,cAAA,CACR,MAAU,CAAA,KAAA,CACV,KAAQ,CAAC,KAAA,CAAO,QAAQ,CACxB,CAAA,WAAA,CAAe,gBACf,OAAW,CAAA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CAAAA,CAAQa,EAA0BC,CAAiC,CAAA,CAC1E,IAAIC,CAAeD,CAAAA,CAAAA,CACnB,IAAWE,IAAAA,CAAAA,IAAQH,CACjB,CAAA,GAAME,GAAWC,CAAQD,IAAAA,CAAAA,CACvBA,CAAUA,CAAAA,CAAAA,CAAQC,CAAI,CAAA,CAAA,YAK1B,OAAOD,CACT,CAVSxB,CAAAA,CAAAS,CAAA,CAAA,SAAA,CAAA","file":"index.cjs","sourcesContent":["{\n \"dnsRecords\": {\n \"getRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"ZoneSelectEnvelope\"],\n \"types\": {\n \"ZoneSelect\": [{ \"name\": \"zoneName\", \"type\": \"string\" }],\n \"ZoneSelectEnvelope\": [\n { \"name\": \"payload\", \"type\": \"ZoneSelect\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n }\n },\n \"createDnsRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"CreateDnsRecordEnvelope\"],\n \"types\": {\n \"CreateDnsRecord\": [\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"CreateDnsRecordEnvelope\": [\n { \"name\": \"payload\", \"type\": \"CreateDnsRecord\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n }\n },\n \"updateRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"UpdateDnsRecordEnvelope\"],\n \"types\": {\n \"UpdateDnsRecord\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"zoneName\", \"type\": \"string\" },\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" }\n ],\n \"UpdateDnsRecordEnvelope\": [\n { \"name\": \"payload\", \"type\": \"UpdateDnsRecord\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n }\n },\n \"deleteRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"RecordSelectEnvelope\"],\n \"types\": {\n \"RecordSelect\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"RecordSelectEnvelope\": [\n { \"name\": \"payload\", \"type\": \"RecordSelect\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n }\n },\n \"updateRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"UpdateRecordsEnvelope\"],\n \"types\": {\n \"UpdateZoneRecord\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" }\n ],\n \"UpdateRecords\": [\n { \"name\": \"records\", \"type\": \"UpdateZoneRecord[]\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"UpdateRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"UpdateRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n }\n },\n \"createRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"CreateRecordsEnvelope\"],\n \"types\": {\n \"CreateRecords\": [{ \"name\": \"zoneName\", \"type\": \"string\" }],\n \"CreateRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"CreateRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n }\n },\n \"deleteRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"DeleteRecordsEnvelope\"],\n \"types\": {\n \"DeleteRecords\": [\n { \"name\": \"recordsIds\", \"type\": \"string[]\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"DeleteRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"DeleteRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n }\n },\n \"parkDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n }\n },\n \"isDomainParked\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n }\n }\n },\n \"user\": {\n \"getDomains\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n },\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n }\n },\n \"requestNfscFaucet\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n },\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n }\n },\n \"getUserOrders\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n }\n }\n },\n \"orders\": {\n \"getOrder\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n }\n },\n \"getOrderItems\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n }\n },\n \"registerDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\n \"InstantRegisterDomainEnvelope\",\n \"InstantRegisterDomainDefaultWalletEnvelope\"\n ],\n \"types\": {\n \"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet\": [\n { \"name\": \"chainId\", \"type\": \"uint256\" }\n ],\n \"InstantRegisterDomain\": [\n { \"name\": \"normalizedDomainName\", \"type\": \"string\" },\n { \"name\": \"durationInYears\", \"type\": \"uint256\" },\n {\n \"name\": \"nftReceivinggWallet\",\n \"type\": \"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet\"\n }\n ],\n \"InstantRegisterDomainEnvelope\": [\n { \"name\": \"payload\", \"type\": \"InstantRegisterDomain\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ],\n \"InstantRegisterDomainDefaultWallet\": [\n { \"name\": \"normalizedDomainName\", \"type\": \"string\" },\n { \"name\": \"durationInYears\", \"type\": \"uint256\" }\n ],\n \"InstantRegisterDomainDefaultWalletEnvelope\": [\n {\n \"name\": \"payload\",\n \"type\": \"InstantRegisterDomainDefaultWallet\"\n },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\", \"EIP712\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\", \"EIP712\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n }\n },\n \"registerWithRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n }\n },\n \"getOrderPaymentMethodsDetails\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n }\n }\n },\n \"balance\": {\n \"getBalance\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n },\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n }\n }\n },\n \"search\": {\n \"checkAvailability\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n },\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n }\n },\n \"getSuggestions\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n },\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n }\n }\n }\n}\n","import type { JsonifiedClient } from '@orpc/openapi-client';\nimport type { ContractRouterClient } from '@orpc/contract';\nimport {\n createORPCClient,\n onError,\n onFinish,\n onStart,\n onSuccess,\n} from '@orpc/client';\nimport { OpenAPILink } from '@orpc/openapi-client/fetch';\nimport contract from '../contract.json';\nimport type { orpcRouter as router } from '@namefi-astra/backend/openapi';\n\nexport type EIP712Signer = {\n signTypedData: (data: {\n domain: {\n name: string;\n version: string;\n chainId?: number;\n verifyingContract?: `0x${string}`;\n };\n types: {\n [key: string]: {\n name: string;\n type: string;\n }[];\n };\n primaryType: string;\n message: Record<string, unknown>;\n }) => Promise<{ signature: string; address: string }>;\n generateNonce: () => string;\n};\n\nexport type CreateNamefiClientAuth =\n | {\n apiKey: string;\n type: 'API_KEY';\n }\n | {\n type: 'EIP712';\n signer: EIP712Signer;\n };\ntype CreateNamefiClientOptions = {\n authentication: CreateNamefiClientAuth;\n logger:\n | {\n info: (...args: any[]) => void;\n error: (...args: any[]) => void;\n }\n | boolean\n | undefined;\n baseUrl?: string;\n};\n\nexport function createNamefiClient({\n authentication,\n logger,\n baseUrl = 'https://backend.astra.namefi.io',\n}: CreateNamefiClientOptions) {\n const { type } = authentication;\n const _logger = logger\n ? typeof logger === 'object'\n ? logger\n : {\n info: (...args: any[]) => console.log(...args),\n error: (...args: any[]) => console.error(...args),\n }\n : undefined;\n\n const url = new URL(baseUrl);\n url.pathname =\n '/' + [...url.pathname.split('/').filter(Boolean), 'v-next'].join('/');\n\n const link = new OpenAPILink(contract as unknown as typeof router, {\n url: url.toString(),\n headers: async (options, path, input) => {\n if (type === 'API_KEY') {\n return {\n 'x-api-key': authentication.apiKey,\n };\n }\n\n const eip712Ctx = getPath(path, contract)?.['~orpc']?.meta?.eip712;\n const primaryType = eip712Ctx?.input?.acceptedPrimaryTypes?.[0];\n\n const { signature, address } = await authentication.signer.signTypedData({\n domain: {\n name: 'Namefi',\n version: '1',\n },\n types: eip712Ctx?.input?.types ?? {},\n primaryType,\n message: {\n payload: input as unknown as Record<string, unknown>,\n timestamp: Math.trunc(Date.now() / 1000),\n nonce: authentication.signer.generateNonce(),\n },\n });\n return {\n 'x-namefi-signer': address,\n 'x-namefi-signature': signature,\n 'x-namefi-eip712-type': primaryType,\n };\n },\n fetch: (request, init) => {\n return globalThis.fetch(request, {\n ...init,\n credentials: 'include', // Include cookies for cross-origin requests\n });\n },\n interceptors: [\n onError((error) => {\n _logger?.error(error);\n }),\n onFinish((response) => {\n _logger?.info('Request finished');\n }),\n onStart((request) => {\n _logger?.info('Request started');\n }),\n onSuccess((response) => {\n _logger?.info('Request succeeded');\n }),\n ],\n });\n\n const client: JsonifiedClient<ContractRouterClient<typeof router>> =\n createORPCClient(link);\n\n return client;\n}\n\nfunction getPath(parts: readonly string[], object: Record<string, unknown>) {\n let current: any = object;\n for (const part of parts) {\n if (!!current && part in current) {\n current = current[part];\n } else {\n return undefined;\n }\n }\n return current;\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -1,11 +1,37 @@
1
1
  import * as _orpc_client from '@orpc/client';
2
2
  import * as zod from 'zod';
3
3
 
4
+ type EIP712Signer = {
5
+ signTypedData: (data: {
6
+ domain: {
7
+ name: string;
8
+ version: string;
9
+ chainId?: number;
10
+ verifyingContract?: `0x${string}`;
11
+ };
12
+ types: {
13
+ [key: string]: {
14
+ name: string;
15
+ type: string;
16
+ }[];
17
+ };
18
+ primaryType: string;
19
+ message: Record<string, unknown>;
20
+ }) => Promise<{
21
+ signature: string;
22
+ address: string;
23
+ }>;
24
+ generateNonce: () => string;
25
+ };
26
+ type CreateNamefiClientAuth = {
27
+ apiKey: string;
28
+ type: 'API_KEY';
29
+ } | {
30
+ type: 'EIP712';
31
+ signer: EIP712Signer;
32
+ };
4
33
  type CreateNamefiClientOptions = {
5
- authentication: {
6
- apiKey: string;
7
- type: 'API_KEY';
8
- };
34
+ authentication: CreateNamefiClientAuth;
9
35
  logger: {
10
36
  info: (...args: any[]) => void;
11
37
  error: (...args: any[]) => void;
@@ -29,9 +55,9 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
29
55
  id: string;
30
56
  }[], Error>;
31
57
  createDnsRecord: _orpc_client.Client<Record<never, never>, {
32
- type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF";
33
58
  zoneName: string;
34
59
  rdata: string;
60
+ type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF";
35
61
  name?: string | undefined;
36
62
  ttl?: number | undefined;
37
63
  }, {
@@ -75,9 +101,9 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
75
101
  records: {
76
102
  id: string;
77
103
  name?: string | undefined;
78
- type?: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF" | undefined;
79
- ttl?: number | undefined;
80
104
  rdata?: string | undefined;
105
+ ttl?: number | undefined;
106
+ type?: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF" | undefined;
81
107
  }[];
82
108
  zoneName: string;
83
109
  }, {
@@ -283,6 +309,21 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
283
309
  };
284
310
  } | undefined;
285
311
  backfilled_started_finished_at?: boolean | undefined;
312
+ legacyOrderMetadata?: {
313
+ source: "legacy";
314
+ type: "legacy-migration";
315
+ legacyOrderId: string;
316
+ useNfscBalance: boolean;
317
+ migratedAt: string;
318
+ legacyPaymentIntentId?: string | undefined;
319
+ legacyPaymentDetails?: {
320
+ status: string;
321
+ provider: string;
322
+ paymentType: string;
323
+ txHash?: string | undefined;
324
+ externalId?: string | undefined;
325
+ } | undefined;
326
+ } | undefined;
286
327
  freeClaim?: boolean | undefined;
287
328
  groupOrCampaignKey?: string | undefined;
288
329
  claimId?: string | undefined;
@@ -335,6 +376,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
335
376
  timeoutMs?: number | undefined;
336
377
  } | undefined;
337
378
  backfilled_started_finished_at?: boolean | undefined;
379
+ legacyOrderItemMetadata?: {
380
+ source: "legacy";
381
+ type: "legacy-migration";
382
+ legacyItemId: string;
383
+ chainId: number;
384
+ receivingWalletAddress: string | null;
385
+ } | undefined;
338
386
  } | null | undefined;
339
387
  }[];
340
388
  payments: {
@@ -354,7 +402,30 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
354
402
  paymentMethodId?: string | undefined;
355
403
  } | null;
356
404
  metadata: {
357
- [x: string]: never;
405
+ legacyPaymentMetadata?: {
406
+ id: string;
407
+ amountinusdcents: number;
408
+ externalid: string | null;
409
+ paymenttype: string;
410
+ status: string;
411
+ txhash: string | null;
412
+ modified: boolean | null;
413
+ refundtxhash: string | null;
414
+ stripeRefund?: {
415
+ paymentIntentId: string;
416
+ amount: number;
417
+ fullRefund: boolean;
418
+ totalRefundAmount: number;
419
+ refundsDetails: {
420
+ type: string;
421
+ paymentId: string;
422
+ amountInUSDCents: number;
423
+ status: string;
424
+ createdAt: string;
425
+ paymentProviderReferenceId: string;
426
+ }[];
427
+ } | undefined;
428
+ } | undefined;
358
429
  } | null;
359
430
  amountInUSDCents: number;
360
431
  id: string;
@@ -418,6 +489,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
418
489
  timeoutMs?: number | undefined;
419
490
  } | undefined;
420
491
  backfilled_started_finished_at?: boolean | undefined;
492
+ legacyOrderItemMetadata?: {
493
+ source: "legacy";
494
+ type: "legacy-migration";
495
+ legacyItemId: string;
496
+ chainId: number;
497
+ receivingWalletAddress: string | null;
498
+ } | undefined;
421
499
  } | null | undefined;
422
500
  }[], Error>;
423
501
  registerDomain: _orpc_client.Client<Record<never, never>, {
@@ -480,6 +558,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
480
558
  timeoutMs?: number | undefined;
481
559
  } | undefined;
482
560
  backfilled_started_finished_at?: boolean | undefined;
561
+ legacyOrderItemMetadata?: {
562
+ source: "legacy";
563
+ type: "legacy-migration";
564
+ legacyItemId: string;
565
+ chainId: number;
566
+ receivingWalletAddress: string | null;
567
+ } | undefined;
483
568
  } | undefined;
484
569
  }[];
485
570
  }, Error>;
@@ -549,6 +634,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
549
634
  timeoutMs?: number | undefined;
550
635
  } | undefined;
551
636
  backfilled_started_finished_at?: boolean | undefined;
637
+ legacyOrderItemMetadata?: {
638
+ source: "legacy";
639
+ type: "legacy-migration";
640
+ legacyItemId: string;
641
+ chainId: number;
642
+ receivingWalletAddress: string | null;
643
+ } | undefined;
552
644
  } | undefined;
553
645
  }[];
554
646
  }, Error>;
@@ -659,4 +751,4 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
659
751
  };
660
752
  };
661
753
 
662
- export { createNamefiClient };
754
+ export { type CreateNamefiClientAuth, type EIP712Signer, createNamefiClient };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,37 @@
1
1
  import * as _orpc_client from '@orpc/client';
2
2
  import * as zod from 'zod';
3
3
 
4
+ type EIP712Signer = {
5
+ signTypedData: (data: {
6
+ domain: {
7
+ name: string;
8
+ version: string;
9
+ chainId?: number;
10
+ verifyingContract?: `0x${string}`;
11
+ };
12
+ types: {
13
+ [key: string]: {
14
+ name: string;
15
+ type: string;
16
+ }[];
17
+ };
18
+ primaryType: string;
19
+ message: Record<string, unknown>;
20
+ }) => Promise<{
21
+ signature: string;
22
+ address: string;
23
+ }>;
24
+ generateNonce: () => string;
25
+ };
26
+ type CreateNamefiClientAuth = {
27
+ apiKey: string;
28
+ type: 'API_KEY';
29
+ } | {
30
+ type: 'EIP712';
31
+ signer: EIP712Signer;
32
+ };
4
33
  type CreateNamefiClientOptions = {
5
- authentication: {
6
- apiKey: string;
7
- type: 'API_KEY';
8
- };
34
+ authentication: CreateNamefiClientAuth;
9
35
  logger: {
10
36
  info: (...args: any[]) => void;
11
37
  error: (...args: any[]) => void;
@@ -29,9 +55,9 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
29
55
  id: string;
30
56
  }[], Error>;
31
57
  createDnsRecord: _orpc_client.Client<Record<never, never>, {
32
- type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF";
33
58
  zoneName: string;
34
59
  rdata: string;
60
+ type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF";
35
61
  name?: string | undefined;
36
62
  ttl?: number | undefined;
37
63
  }, {
@@ -75,9 +101,9 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
75
101
  records: {
76
102
  id: string;
77
103
  name?: string | undefined;
78
- type?: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF" | undefined;
79
- ttl?: number | undefined;
80
104
  rdata?: string | undefined;
105
+ ttl?: number | undefined;
106
+ type?: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SOA" | "PTR" | "SRV" | "CAA" | "DS" | "TLSA" | "SSHFP" | "HTTPS" | "SVCB" | "NAPTR" | "SPF" | undefined;
81
107
  }[];
82
108
  zoneName: string;
83
109
  }, {
@@ -283,6 +309,21 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
283
309
  };
284
310
  } | undefined;
285
311
  backfilled_started_finished_at?: boolean | undefined;
312
+ legacyOrderMetadata?: {
313
+ source: "legacy";
314
+ type: "legacy-migration";
315
+ legacyOrderId: string;
316
+ useNfscBalance: boolean;
317
+ migratedAt: string;
318
+ legacyPaymentIntentId?: string | undefined;
319
+ legacyPaymentDetails?: {
320
+ status: string;
321
+ provider: string;
322
+ paymentType: string;
323
+ txHash?: string | undefined;
324
+ externalId?: string | undefined;
325
+ } | undefined;
326
+ } | undefined;
286
327
  freeClaim?: boolean | undefined;
287
328
  groupOrCampaignKey?: string | undefined;
288
329
  claimId?: string | undefined;
@@ -335,6 +376,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
335
376
  timeoutMs?: number | undefined;
336
377
  } | undefined;
337
378
  backfilled_started_finished_at?: boolean | undefined;
379
+ legacyOrderItemMetadata?: {
380
+ source: "legacy";
381
+ type: "legacy-migration";
382
+ legacyItemId: string;
383
+ chainId: number;
384
+ receivingWalletAddress: string | null;
385
+ } | undefined;
338
386
  } | null | undefined;
339
387
  }[];
340
388
  payments: {
@@ -354,7 +402,30 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
354
402
  paymentMethodId?: string | undefined;
355
403
  } | null;
356
404
  metadata: {
357
- [x: string]: never;
405
+ legacyPaymentMetadata?: {
406
+ id: string;
407
+ amountinusdcents: number;
408
+ externalid: string | null;
409
+ paymenttype: string;
410
+ status: string;
411
+ txhash: string | null;
412
+ modified: boolean | null;
413
+ refundtxhash: string | null;
414
+ stripeRefund?: {
415
+ paymentIntentId: string;
416
+ amount: number;
417
+ fullRefund: boolean;
418
+ totalRefundAmount: number;
419
+ refundsDetails: {
420
+ type: string;
421
+ paymentId: string;
422
+ amountInUSDCents: number;
423
+ status: string;
424
+ createdAt: string;
425
+ paymentProviderReferenceId: string;
426
+ }[];
427
+ } | undefined;
428
+ } | undefined;
358
429
  } | null;
359
430
  amountInUSDCents: number;
360
431
  id: string;
@@ -418,6 +489,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
418
489
  timeoutMs?: number | undefined;
419
490
  } | undefined;
420
491
  backfilled_started_finished_at?: boolean | undefined;
492
+ legacyOrderItemMetadata?: {
493
+ source: "legacy";
494
+ type: "legacy-migration";
495
+ legacyItemId: string;
496
+ chainId: number;
497
+ receivingWalletAddress: string | null;
498
+ } | undefined;
421
499
  } | null | undefined;
422
500
  }[], Error>;
423
501
  registerDomain: _orpc_client.Client<Record<never, never>, {
@@ -480,6 +558,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
480
558
  timeoutMs?: number | undefined;
481
559
  } | undefined;
482
560
  backfilled_started_finished_at?: boolean | undefined;
561
+ legacyOrderItemMetadata?: {
562
+ source: "legacy";
563
+ type: "legacy-migration";
564
+ legacyItemId: string;
565
+ chainId: number;
566
+ receivingWalletAddress: string | null;
567
+ } | undefined;
483
568
  } | undefined;
484
569
  }[];
485
570
  }, Error>;
@@ -549,6 +634,13 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
549
634
  timeoutMs?: number | undefined;
550
635
  } | undefined;
551
636
  backfilled_started_finished_at?: boolean | undefined;
637
+ legacyOrderItemMetadata?: {
638
+ source: "legacy";
639
+ type: "legacy-migration";
640
+ legacyItemId: string;
641
+ chainId: number;
642
+ receivingWalletAddress: string | null;
643
+ } | undefined;
552
644
  } | undefined;
553
645
  }[];
554
646
  }, Error>;
@@ -659,4 +751,4 @@ declare function createNamefiClient({ authentication, logger, baseUrl, }: Create
659
751
  };
660
752
  };
661
753
 
662
- export { createNamefiClient };
754
+ export { type CreateNamefiClientAuth, type EIP712Signer, createNamefiClient };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import {onError,onFinish,onStart,onSuccess,createORPCClient}from'@orpc/client';import {OpenAPILink}from'@orpc/openapi-client/fetch';var m=Object.defineProperty;var r=(o,t)=>m(o,"name",{value:t,configurable:true});var i={dnsRecords:{getRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records",method:"GET",tags:["dns"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}},route:{path:"/dns/records",method:"GET",tags:["dns"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}}},createDnsRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records",method:"POST",tags:["dns"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}},route:{path:"/dns/records",method:"POST",tags:["dns"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}}},updateRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/{id}",method:"PUT",tags:["dns"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}}},deleteRecord:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}}},updateRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"PUT",tags:["dns"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}}},createRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"POST",tags:["dns"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}},route:{path:"/dns/records/batch",method:"POST",tags:["dns"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}}},deleteRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/records/batch",method:"DELETE",tags:["dns"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}}},parkDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}},route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}}},isDomainParked:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}},route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}}}},user:{getDomains:{"~orpc":{errorMap:{},meta:{route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}},route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}}},requestNfscFaucet:{"~orpc":{errorMap:{},meta:{route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}},route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}}},getUserOrders:{"~orpc":{errorMap:{},meta:{route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}},route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}}}},orders:{getOrder:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}},route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}}},getOrderItems:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}},route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}}},registerDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain",method:"POST",tags:["orders"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}},route:{path:"/orders/register-domain",method:"POST",tags:["orders"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}}},registerWithRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}},route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}}},getOrderPaymentMethodsDetails:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}},route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}}}},balance:{getBalance:{"~orpc":{errorMap:{},meta:{route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}},route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}}}},search:{checkAvailability:{"~orpc":{errorMap:{},meta:{route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}},route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}}},getSuggestions:{"~orpc":{errorMap:{},meta:{route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}},route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}}}}};function k({authentication:o,logger:t,baseUrl:n="https://backend.astra.namefi.io"}){let{apiKey:d}=o,a=t?typeof t=="object"?t:{info:r((...e)=>console.log(...e),"info"),error:r((...e)=>console.error(...e),"error")}:void 0,s=new URL(n);s.pathname="/"+[...s.pathname.split("/").filter(Boolean),"v-next"].join("/");let c=new OpenAPILink(i,{url:s.toString(),headers:r(()=>({"x-api-key":d}),"headers"),fetch:r((e,p)=>globalThis.fetch(e,{...p,credentials:"include"}),"fetch"),interceptors:[onError(e=>{a?.error(e);}),onFinish(e=>{a?.info("Request finished");}),onStart(e=>{a?.info("Request started");}),onSuccess(e=>{a?.info("Request succeeded");})]});return createORPCClient(c)}r(k,"createNamefiClient");
2
- export{k as createNamefiClient};//# sourceMappingURL=index.js.map
1
+ import {onError,onFinish,onStart,onSuccess,createORPCClient}from'@orpc/client';import {OpenAPILink}from'@orpc/openapi-client/fetch';var h=Object.defineProperty;var n=(t,r)=>h(t,"name",{value:r,configurable:true});var p={dnsRecords:{getRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["ZoneSelectEnvelope"],types:{ZoneSelect:[{name:"zoneName",type:"string"}],ZoneSelectEnvelope:[{name:"payload",type:"ZoneSelect"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records",method:"GET",tags:["dns","EIP712"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}},route:{path:"/dns/records",method:"GET",tags:["dns","EIP712"],operationId:"getDnsRecords",summary:"Get DNS records",description:"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types."}}},createDnsRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["CreateDnsRecordEnvelope"],types:{CreateDnsRecord:[{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"},{name:"zoneName",type:"string"}],CreateDnsRecordEnvelope:[{name:"payload",type:"CreateDnsRecord"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records",method:"POST",tags:["dns","EIP712"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}},route:{path:"/dns/records",method:"POST",tags:["dns","EIP712"],operationId:"createDnsRecord",summary:"Create DNS record",description:"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation."}}},updateRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["UpdateDnsRecordEnvelope"],types:{UpdateDnsRecord:[{name:"id",type:"string"},{name:"zoneName",type:"string"},{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"}],UpdateDnsRecordEnvelope:[{name:"payload",type:"UpdateDnsRecord"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns","EIP712"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}},route:{path:"/dns/records/{id}",method:"PUT",tags:["dns","EIP712"],operationId:"updateDnsRecord",summary:"Update DNS record",description:"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules."}}},deleteRecord:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["RecordSelectEnvelope"],types:{RecordSelect:[{name:"id",type:"string"},{name:"zoneName",type:"string"}],RecordSelectEnvelope:[{name:"payload",type:"RecordSelect"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns","EIP712"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}},route:{path:"/dns/records/{id}",method:"DELETE",tags:["dns","EIP712"],operationId:"deleteDnsRecord",summary:"Delete DNS record",description:"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity."}}},updateRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["UpdateRecordsEnvelope"],types:{UpdateZoneRecord:[{name:"id",type:"string"},{name:"name",type:"string"},{name:"rdata",type:"string"},{name:"ttl",type:"uint256"}],UpdateRecords:[{name:"records",type:"UpdateZoneRecord[]"},{name:"zoneName",type:"string"}],UpdateRecordsEnvelope:[{name:"payload",type:"UpdateRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns","EIP712"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}},route:{path:"/dns/records/batch",method:"PUT",tags:["dns","EIP712"],operationId:"batchUpdateDnsRecords",summary:"Batch update DNS records",description:"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together."}}},createRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["CreateRecordsEnvelope"],types:{CreateRecords:[{name:"zoneName",type:"string"}],CreateRecordsEnvelope:[{name:"payload",type:"CreateRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"POST",tags:["dns","EIP712"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}},route:{path:"/dns/records/batch",method:"POST",tags:["dns","EIP712"],operationId:"batchCreateDnsRecords",summary:"Batch create DNS records",description:"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules."}}},deleteRecords:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["DeleteRecordsEnvelope"],types:{DeleteRecords:[{name:"recordsIds",type:"string[]"},{name:"zoneName",type:"string"}],DeleteRecordsEnvelope:[{name:"payload",type:"DeleteRecords"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns","EIP712"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}},route:{path:"/dns/records/batch",method:"DELETE",tags:["dns","EIP712"],operationId:"batchDeleteDnsRecords",summary:"Batch delete DNS records",description:"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion."}}},parkDomain:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}},route:{path:"/dns/park",method:"POST",tags:["dns"],operationId:"parkDomain",summary:"Park domain",description:"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records."}}},isDomainParked:{"~orpc":{errorMap:{},meta:{route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}},route:{path:"/dns/parked",method:"GET",tags:["dns"],operationId:"isDomainParked",summary:"Check if domain is parked",description:"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise."}}}},user:{getDomains:{"~orpc":{errorMap:{},meta:{route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}},route:{path:"/user/domains",method:"GET",tags:["user"],operationId:"getUserDomains",summary:"Get user domains",description:"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates."}}},requestNfscFaucet:{"~orpc":{errorMap:{},meta:{route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}},route:{path:"/user/faucet",method:"POST",tags:["user","balance"],operationId:"requestNfscFaucet",summary:"Request NFSC faucet",description:"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address."}}},getUserOrders:{"~orpc":{errorMap:{},meta:{route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}},route:{path:"/user/orders",method:"GET",tags:["user","orders"],operationId:"getUserOrders",summary:"Get user orders",description:"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order."}}}},orders:{getOrder:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}},route:{path:"/orders/{orderId}",method:"GET",tags:["orders"],operationId:"getOrder",summary:"Get order details",description:"Retrieve detailed information about an order including items, payments, and user details. User must own the order."}}},getOrderItems:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}},route:{path:"/orders/items",method:"GET",tags:["orders"],operationId:"getOrderItems",summary:"Get user order items",description:"Retrieve all order items for the current user, sorted by creation date in descending order."}}},registerDomain:{"~orpc":{errorMap:{},meta:{eip712:{input:{acceptedPrimaryTypes:["InstantRegisterDomainEnvelope","InstantRegisterDomainDefaultWalletEnvelope"],types:{InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet:[{name:"chainId",type:"uint256"}],InstantRegisterDomain:[{name:"normalizedDomainName",type:"string"},{name:"durationInYears",type:"uint256"},{name:"nftReceivinggWallet",type:"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet"}],InstantRegisterDomainEnvelope:[{name:"payload",type:"InstantRegisterDomain"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}],InstantRegisterDomainDefaultWallet:[{name:"normalizedDomainName",type:"string"},{name:"durationInYears",type:"uint256"}],InstantRegisterDomainDefaultWalletEnvelope:[{name:"payload",type:"InstantRegisterDomainDefaultWallet"},{name:"timestamp",type:"uint256"},{name:"nonce",type:"string"}]}}},route:{path:"/orders/register-domain",method:"POST",tags:["orders","EIP712"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}},route:{path:"/orders/register-domain",method:"POST",tags:["orders","EIP712"],operationId:"registerDomain",summary:"Instant Register domain",description:"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow."}}},registerWithRecords:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}},route:{path:"/orders/register-domain/records",method:"POST",tags:["orders"],operationId:"registerWithRecords",summary:"Instant register domain with records",description:"Purchase a single domain instantly and apply DNS records after processing."}}},getOrderPaymentMethodsDetails:{"~orpc":{errorMap:{},meta:{route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}},route:{path:"/orders/{orderId}/payment-methods",method:"GET",tags:["orders"],operationId:"getOrderPaymentMethodsDetails",summary:"Get order payment methods",description:"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments."}}}},balance:{getBalance:{"~orpc":{errorMap:{},meta:{route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}},route:{path:"/balance",method:"GET",tags:["balance"],operationId:"getBalance",summary:"Get NFSC balance",description:"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts."}}}},search:{checkAvailability:{"~orpc":{errorMap:{},meta:{route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}},route:{path:"/search/availability",method:"GET",tags:["search"],operationId:"checkAvailability",summary:"Check domain availability",description:"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints."}}},getSuggestions:{"~orpc":{errorMap:{},meta:{route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}},route:{path:"/search/suggestions",method:"GET",tags:["search"],operationId:"getSuggestions",summary:"Get domain suggestions",description:"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions."}}}}};function U({authentication:t,logger:r,baseUrl:a="https://backend.astra.namefi.io"}){let{type:o}=t,s=r?typeof r=="object"?r:{info:n((...e)=>console.log(...e),"info"),error:n((...e)=>console.error(...e),"error")}:void 0,i=new URL(a);i.pathname="/"+[...i.pathname.split("/").filter(Boolean),"v-next"].join("/");let l=new OpenAPILink(p,{url:i.toString(),headers:n(async(e,d,u)=>{if(o==="API_KEY")return {"x-api-key":t.apiKey};let m=N(d,p)?.["~orpc"]?.meta?.eip712,c=m?.input?.acceptedPrimaryTypes?.[0],{signature:g,address:y}=await t.signer.signTypedData({domain:{name:"Namefi",version:"1"},types:m?.input?.types??{},primaryType:c,message:{payload:u,timestamp:Math.trunc(Date.now()/1e3),nonce:t.signer.generateNonce()}});return {"x-namefi-signer":y,"x-namefi-signature":g,"x-namefi-eip712-type":c}},"headers"),fetch:n((e,d)=>globalThis.fetch(e,{...d,credentials:"include"}),"fetch"),interceptors:[onError(e=>{s?.error(e);}),onFinish(e=>{s?.info("Request finished");}),onStart(e=>{s?.info("Request started");}),onSuccess(e=>{s?.info("Request succeeded");})]});return createORPCClient(l)}n(U,"createNamefiClient");function N(t,r){let a=r;for(let o of t)if(a&&o in a)a=a[o];else return;return a}n(N,"getPath");
2
+ export{U as createNamefiClient};//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../contract.json"],"names":["contract_default","createNamefiClient","authentication","logger","baseUrl","apiKey","_logger","__name","args","url","link","OpenAPILink","request","init","onError","error","onFinish","response","onStart","onSuccess","createORPCClient"],"mappings":"oIAEA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,YAAA,CAAA,IAAA,CAAA,CAAA,CCFA,IAAAA,CAAAA,CAAA,CACE,UAAA,CAAc,CACZ,UAAA,CAAc,CACZ,OAAA,CAAS,CACP,QAAA,CAAY,EAAC,CACb,IAAQ,CAAA,CACN,MAAS,CACP,IAAA,CAAQ,cACR,CAAA,MAAA,CAAU,KACV,CAAA,IAAA,CAAQ,CAAC,KAAK,CACd,CAAA,WAAA,CAAe,eACf,CAAA,OAAA,CAAW,iBACX,CAAA,WAAA,CAAe,kJACjB,CACF,EACA,KAAS,CAAA,CACP,IAAQ,CAAA,cAAA,CACR,MAAU,CAAA,KAAA,CACV,IAAQ,CAAA,CAAC,KAAK,C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CAAA,iBAAiB,EACjC,CAAC,EACDa,SAAWF,CAAAA,CAAAA,EAAa,CACtBX,CAAAA,EAAS,IAAK,CAAA,mBAAmB,EACnC,CAAC,CACH,CACF,CAAC,CAKD,CAAA,OAFEc,gBAAiBV,CAAAA,CAAI,CAGzB,CAlDgBH,EAAAN,CAAA,CAAA,oBAAA,CAAA","file":"index.js","sourcesContent":["import type { JsonifiedClient } from '@orpc/openapi-client';\nimport type { ContractRouterClient } from '@orpc/contract';\nimport {\n createORPCClient,\n onError,\n onFinish,\n onStart,\n onSuccess,\n} from '@orpc/client';\nimport { OpenAPILink } from '@orpc/openapi-client/fetch';\nimport contract from '../contract.json';\nimport type { orpcRouter as router } from '@namefi-astra/backend/openapi';\n\ntype CreateNamefiClientOptions = {\n authentication: {\n apiKey: string;\n type: 'API_KEY';\n };\n logger:\n | {\n info: (...args: any[]) => void;\n error: (...args: any[]) => void;\n }\n | boolean\n | undefined;\n baseUrl?: string;\n};\n\nexport function createNamefiClient({\n authentication,\n logger,\n baseUrl = 'https://backend.astra.namefi.io',\n}: CreateNamefiClientOptions) {\n const { apiKey } = authentication;\n const _logger = logger\n ? typeof logger === 'object'\n ? logger\n : {\n info: (...args: any[]) => console.log(...args),\n error: (...args: any[]) => console.error(...args),\n }\n : undefined;\n\n const url = new URL(baseUrl);\n url.pathname =\n '/' + [...url.pathname.split('/').filter(Boolean), 'v-next'].join('/');\n\n const link = new OpenAPILink(contract as unknown as typeof router, {\n url: url.toString(),\n headers: () => ({\n 'x-api-key': apiKey,\n }),\n fetch: (request, init) => {\n return globalThis.fetch(request, {\n ...init,\n credentials: 'include', // Include cookies for cross-origin requests\n });\n },\n interceptors: [\n onError((error) => {\n _logger?.error(error);\n }),\n onFinish((response) => {\n _logger?.info('Request finished');\n }),\n onStart((request) => {\n _logger?.info('Request started');\n }),\n onSuccess((response) => {\n _logger?.info('Request succeeded');\n }),\n ],\n });\n\n const client: JsonifiedClient<ContractRouterClient<typeof router>> =\n createORPCClient(link);\n\n return client;\n}\n","{\n \"dnsRecords\": {\n \"getRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n }\n },\n \"createDnsRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n }\n },\n \"updateRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n }\n },\n \"deleteRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n }\n },\n \"updateRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n }\n },\n \"createRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n }\n },\n \"deleteRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n }\n },\n \"parkDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n }\n },\n \"isDomainParked\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n }\n }\n },\n \"user\": {\n \"getDomains\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n },\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n }\n },\n \"requestNfscFaucet\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n },\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n }\n },\n \"getUserOrders\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n }\n }\n },\n \"orders\": {\n \"getOrder\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n }\n },\n \"getOrderItems\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n }\n },\n \"registerDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n }\n },\n \"registerWithRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n }\n },\n \"getOrderPaymentMethodsDetails\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n }\n }\n },\n \"balance\": {\n \"getBalance\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n },\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n }\n }\n },\n \"search\": {\n \"checkAvailability\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n },\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n }\n },\n \"getSuggestions\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n },\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../contract.json","../src/index.ts"],"names":["contract_default","createNamefiClient","authentication","logger","baseUrl","type","_logger","__name","args","url","link","OpenAPILink","options","path","input","eip712Ctx","getPath","primaryType","signature","address","request","init","onError","error","onFinish","response","onStart","onSuccess","createORPCClient","parts","object","current","part"],"mappings":"qNAAA,IAAAA,CAAAA,CAAA,CACE,UAAc,CAAA,CACZ,UAAc,CAAA,CACZ,OAAS,CAAA,CACP,SAAY,EAAC,CACb,KAAQ,CACN,MAAA,CAAU,CACR,KAAS,CAAA,CACP,oBAAwB,CAAA,CAAC,oBAAoB,CAAA,CAC7C,MAAS,CACP,UAAA,CAAc,CAAC,CAAE,IAAQ,CAAA,UAAA,CAAY,KAAQ,QAAS,CAAC,CACvD,CAAA,kBAAA,CAAsB,CACpB,CAAE,KAAQ,SAAW,CAAA,IAAA,CAAQ,YAAa,CAC1C,CAAA,CAAE,KAAQ,WAAa,CAAA,IAAA,CAAQ,SAAU,CAAA,CACzC,CAAE,IAAA,CAAQ,QAAS,IAAQ,CAAA,QAAS,CACtC,CACF,CACF,CACF,EACA,KAAS,CAAA,CACP,IAAQ,CAAA,cAAA,CACR,MAAU,CAAA,KAAA,CACV,KAAQ,CAAC,KAAA,CAAO,QAAQ,CACxB,CAAA,WAAA,CAAe,gBACf,OAAW,CAAA,iBAAA,CACX,WAAe,CAAA,kJACjB,CACF,CAAA,CACA,MAAS,CACP,IAAA,CAAQ,cACR,CAAA,MAAA,CAAU,KACV,CAAA,IAAA,CAAQ,CAAC,KAAO,CAAA,QAAQ,CACxB,CAAA,WAAA,CAAe,eACf,CAAA,OAAA,CAAW,kBACX,WAAe,CAAA,kJACjB,CACF,CACF,CAAA,CACA,gBAAmB,CACjB,OAAA,CAAS,CACP,QAAA,CAAY,EAAC,CACb,KAAQ,CACN,MAAA,CAAU,CACR,KAAA,CAAS,CACP,oBAAA,CAAwB,CAAC,yBAAyB,CAAA,CAClD,KAAS,CAAA,CACP,eAAmB,CAAA,CACjB,CAAE,IAAQ,CAAA,MAAA,CAAQ,KAAQ,QAAS,CAAA,CACnC,CAAE,IAAQ,CAAA,OAA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iB,CACnB,CAAA,oBAAA,CAAsBD,CACtB,CAAA,sBAAA,CAAwBD,CAC1B,CACF,CAAA,CA5BS,SA6BT,CAAA,CAAA,KAAA,CAAOV,CAAA,CAAA,CAACa,EAASC,CACR,GAAA,UAAA,CAAW,KAAMD,CAAAA,CAAAA,CAAS,CAC/B,GAAGC,EACH,WAAa,CAAA,SACf,CAAC,CAJI,CAAA,OAAA,CAAA,CAMP,aAAc,CACZC,OAAAA,CAASC,CAAU,EAAA,CACjBjB,CAAS,EAAA,KAAA,CAAMiB,CAAK,EACtB,CAAC,CACDC,CAAAA,QAAAA,CAAUC,CAAa,EAAA,CACrBnB,GAAS,IAAK,CAAA,kBAAkB,EAClC,CAAC,CACDoB,CAAAA,OAAAA,CAASN,GAAY,CACnBd,CAAAA,EAAS,KAAK,iBAAiB,EACjC,CAAC,CACDqB,CAAAA,SAAAA,CAAWF,CAAa,EAAA,CACtBnB,CAAS,EAAA,IAAA,CAAK,mBAAmB,EACnC,CAAC,CACH,CACF,CAAC,CAAA,CAKD,OAFEsB,gBAAiBlB,CAAAA,CAAI,CAGzB,CA5EgBH,CAAAN,CAAAA,CAAAA,CAAA,sBA8EhB,SAASe,CAAAA,CAAQa,EAA0BC,CAAiC,CAAA,CAC1E,IAAIC,CAAeD,CAAAA,CAAAA,CACnB,IAAWE,IAAAA,CAAAA,IAAQH,CACjB,CAAA,GAAME,GAAWC,CAAQD,IAAAA,CAAAA,CACvBA,CAAUA,CAAAA,CAAAA,CAAQC,CAAI,CAAA,CAAA,YAK1B,OAAOD,CACT,CAVSxB,CAAAA,CAAAS,CAAA,CAAA,SAAA,CAAA","file":"index.js","sourcesContent":["{\n \"dnsRecords\": {\n \"getRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"ZoneSelectEnvelope\"],\n \"types\": {\n \"ZoneSelect\": [{ \"name\": \"zoneName\", \"type\": \"string\" }],\n \"ZoneSelectEnvelope\": [\n { \"name\": \"payload\", \"type\": \"ZoneSelect\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"GET\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"getDnsRecords\",\n \"summary\": \"Get DNS records\",\n \"description\": \"Retrieve all DNS records for a specified domain zone. Returns an array of DNS records including A, AAAA, CNAME, MX, TXT, and other record types.\"\n }\n }\n },\n \"createDnsRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"CreateDnsRecordEnvelope\"],\n \"types\": {\n \"CreateDnsRecord\": [\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"CreateDnsRecordEnvelope\": [\n { \"name\": \"payload\", \"type\": \"CreateDnsRecord\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"createDnsRecord\",\n \"summary\": \"Create DNS record\",\n \"description\": \"Create a new DNS record for a domain. Requires domain ownership. The record will be validated against DNS zone rules before creation.\"\n }\n }\n },\n \"updateRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"UpdateDnsRecordEnvelope\"],\n \"types\": {\n \"UpdateDnsRecord\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"zoneName\", \"type\": \"string\" },\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" }\n ],\n \"UpdateDnsRecordEnvelope\": [\n { \"name\": \"payload\", \"type\": \"UpdateDnsRecord\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"updateDnsRecord\",\n \"summary\": \"Update DNS record\",\n \"description\": \"Update an existing DNS record by its ID. Requires domain ownership. The updated record will be validated against DNS zone rules.\"\n }\n }\n },\n \"deleteRecord\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"RecordSelectEnvelope\"],\n \"types\": {\n \"RecordSelect\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"RecordSelectEnvelope\": [\n { \"name\": \"payload\", \"type\": \"RecordSelect\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/{id}\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"deleteDnsRecord\",\n \"summary\": \"Delete DNS record\",\n \"description\": \"Delete a DNS record by its ID. Requires domain ownership. The deletion will be validated to ensure zone integrity.\"\n }\n }\n },\n \"updateRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"UpdateRecordsEnvelope\"],\n \"types\": {\n \"UpdateZoneRecord\": [\n { \"name\": \"id\", \"type\": \"string\" },\n { \"name\": \"name\", \"type\": \"string\" },\n { \"name\": \"rdata\", \"type\": \"string\" },\n { \"name\": \"ttl\", \"type\": \"uint256\" }\n ],\n \"UpdateRecords\": [\n { \"name\": \"records\", \"type\": \"UpdateZoneRecord[]\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"UpdateRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"UpdateRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"PUT\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchUpdateDnsRecords\",\n \"summary\": \"Batch update DNS records\",\n \"description\": \"Update multiple DNS records in a single transaction. Requires domain ownership. All records must belong to the same zone and will be validated together.\"\n }\n }\n },\n \"createRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"CreateRecordsEnvelope\"],\n \"types\": {\n \"CreateRecords\": [{ \"name\": \"zoneName\", \"type\": \"string\" }],\n \"CreateRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"CreateRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"POST\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchCreateDnsRecords\",\n \"summary\": \"Batch create DNS records\",\n \"description\": \"Create multiple DNS records in a single transaction. Requires domain ownership. All records will be validated together against DNS zone rules.\"\n }\n }\n },\n \"deleteRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\"DeleteRecordsEnvelope\"],\n \"types\": {\n \"DeleteRecords\": [\n { \"name\": \"recordsIds\", \"type\": \"string[]\" },\n { \"name\": \"zoneName\", \"type\": \"string\" }\n ],\n \"DeleteRecordsEnvelope\": [\n { \"name\": \"payload\", \"type\": \"DeleteRecords\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/records/batch\",\n \"method\": \"DELETE\",\n \"tags\": [\"dns\", \"EIP712\"],\n \"operationId\": \"batchDeleteDnsRecords\",\n \"summary\": \"Batch delete DNS records\",\n \"description\": \"Delete multiple DNS records by their IDs in a single transaction. Requires domain ownership. The zone will be validated after deletion.\"\n }\n }\n },\n \"parkDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/park\",\n \"method\": \"POST\",\n \"tags\": [\"dns\"],\n \"operationId\": \"parkDomain\",\n \"summary\": \"Park domain\",\n \"description\": \"Park a domain by setting up default parking DNS records (A and AAAA records pointing to the parking server). Optionally override existing conflicting records.\"\n }\n }\n },\n \"isDomainParked\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n },\n \"route\": {\n \"path\": \"/dns/parked\",\n \"method\": \"GET\",\n \"tags\": [\"dns\"],\n \"operationId\": \"isDomainParked\",\n \"summary\": \"Check if domain is parked\",\n \"description\": \"Check whether a domain has the standard parking DNS records configured. Returns true if the domain is parked, false otherwise.\"\n }\n }\n }\n },\n \"user\": {\n \"getDomains\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n },\n \"route\": {\n \"path\": \"/user/domains\",\n \"method\": \"GET\",\n \"tags\": [\"user\"],\n \"operationId\": \"getUserDomains\",\n \"summary\": \"Get user domains\",\n \"description\": \"Retrieve all domains owned by the current user. Returns domain details including DNS status, nameservers, and expiration dates.\"\n }\n }\n },\n \"requestNfscFaucet\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n },\n \"route\": {\n \"path\": \"/user/faucet\",\n \"method\": \"POST\",\n \"tags\": [\"user\", \"balance\"],\n \"operationId\": \"requestNfscFaucet\",\n \"summary\": \"Request NFSC faucet\",\n \"description\": \"Request NFSC test tokens on Sepolia. Rate limited by user and wallet address.\"\n }\n }\n },\n \"getUserOrders\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/user/orders\",\n \"method\": \"GET\",\n \"tags\": [\"user\", \"orders\"],\n \"operationId\": \"getUserOrders\",\n \"summary\": \"Get user orders\",\n \"description\": \"Retrieve all order items for the current user. Returns order items sorted by creation date in descending order.\"\n }\n }\n }\n },\n \"orders\": {\n \"getOrder\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrder\",\n \"summary\": \"Get order details\",\n \"description\": \"Retrieve detailed information about an order including items, payments, and user details. User must own the order.\"\n }\n }\n },\n \"getOrderItems\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/items\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderItems\",\n \"summary\": \"Get user order items\",\n \"description\": \"Retrieve all order items for the current user, sorted by creation date in descending order.\"\n }\n }\n },\n \"registerDomain\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"eip712\": {\n \"input\": {\n \"acceptedPrimaryTypes\": [\n \"InstantRegisterDomainEnvelope\",\n \"InstantRegisterDomainDefaultWalletEnvelope\"\n ],\n \"types\": {\n \"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet\": [\n { \"name\": \"chainId\", \"type\": \"uint256\" }\n ],\n \"InstantRegisterDomain\": [\n { \"name\": \"normalizedDomainName\", \"type\": \"string\" },\n { \"name\": \"durationInYears\", \"type\": \"uint256\" },\n {\n \"name\": \"nftReceivinggWallet\",\n \"type\": \"InstantRegisterDomainEnvelope_Payload_NftReceivinggWallet\"\n }\n ],\n \"InstantRegisterDomainEnvelope\": [\n { \"name\": \"payload\", \"type\": \"InstantRegisterDomain\" },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ],\n \"InstantRegisterDomainDefaultWallet\": [\n { \"name\": \"normalizedDomainName\", \"type\": \"string\" },\n { \"name\": \"durationInYears\", \"type\": \"uint256\" }\n ],\n \"InstantRegisterDomainDefaultWalletEnvelope\": [\n {\n \"name\": \"payload\",\n \"type\": \"InstantRegisterDomainDefaultWallet\"\n },\n { \"name\": \"timestamp\", \"type\": \"uint256\" },\n { \"name\": \"nonce\", \"type\": \"string\" }\n ]\n }\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\", \"EIP712\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain\",\n \"method\": \"POST\",\n \"tags\": [\"orders\", \"EIP712\"],\n \"operationId\": \"registerDomain\",\n \"summary\": \"Instant Register domain\",\n \"description\": \"Purchase a single domain instantly without adding to cart. Validates domain availability, creates payments and order, then starts the order processing workflow.\"\n }\n }\n },\n \"registerWithRecords\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/register-domain/records\",\n \"method\": \"POST\",\n \"tags\": [\"orders\"],\n \"operationId\": \"registerWithRecords\",\n \"summary\": \"Instant register domain with records\",\n \"description\": \"Purchase a single domain instantly and apply DNS records after processing.\"\n }\n }\n },\n \"getOrderPaymentMethodsDetails\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n },\n \"route\": {\n \"path\": \"/orders/{orderId}/payment-methods\",\n \"method\": \"GET\",\n \"tags\": [\"orders\"],\n \"operationId\": \"getOrderPaymentMethodsDetails\",\n \"summary\": \"Get order payment methods\",\n \"description\": \"Retrieve payment method details for an order, including card info for Stripe payments and wallet addresses for on-chain payments.\"\n }\n }\n }\n },\n \"balance\": {\n \"getBalance\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n },\n \"route\": {\n \"path\": \"/balance\",\n \"method\": \"GET\",\n \"tags\": [\"balance\"],\n \"operationId\": \"getBalance\",\n \"summary\": \"Get NFSC balance\",\n \"description\": \"Retrieve NFSC (Namefi Stable Coin) balance across all supported blockchain chains for the authenticated user's linked wallet addresses. Returns both raw contract values and human-readable USD amounts.\"\n }\n }\n }\n },\n \"search\": {\n \"checkAvailability\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n },\n \"route\": {\n \"path\": \"/search/availability\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"checkAvailability\",\n \"summary\": \"Check domain availability\",\n \"description\": \"Check if a domain is available for registration. Returns availability status, pricing details, current owner (if any), and registration constraints.\"\n }\n }\n },\n \"getSuggestions\": {\n \"~orpc\": {\n \"errorMap\": {},\n \"meta\": {\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n },\n \"route\": {\n \"path\": \"/search/suggestions\",\n \"method\": \"GET\",\n \"tags\": [\"search\"],\n \"operationId\": \"getSuggestions\",\n \"summary\": \"Get domain suggestions\",\n \"description\": \"Generate domain suggestions based on a search query. Supports pagination and optional parent domain filtering for third-level domain suggestions.\"\n }\n }\n }\n }\n}\n","import type { JsonifiedClient } from '@orpc/openapi-client';\nimport type { ContractRouterClient } from '@orpc/contract';\nimport {\n createORPCClient,\n onError,\n onFinish,\n onStart,\n onSuccess,\n} from '@orpc/client';\nimport { OpenAPILink } from '@orpc/openapi-client/fetch';\nimport contract from '../contract.json';\nimport type { orpcRouter as router } from '@namefi-astra/backend/openapi';\n\nexport type EIP712Signer = {\n signTypedData: (data: {\n domain: {\n name: string;\n version: string;\n chainId?: number;\n verifyingContract?: `0x${string}`;\n };\n types: {\n [key: string]: {\n name: string;\n type: string;\n }[];\n };\n primaryType: string;\n message: Record<string, unknown>;\n }) => Promise<{ signature: string; address: string }>;\n generateNonce: () => string;\n};\n\nexport type CreateNamefiClientAuth =\n | {\n apiKey: string;\n type: 'API_KEY';\n }\n | {\n type: 'EIP712';\n signer: EIP712Signer;\n };\ntype CreateNamefiClientOptions = {\n authentication: CreateNamefiClientAuth;\n logger:\n | {\n info: (...args: any[]) => void;\n error: (...args: any[]) => void;\n }\n | boolean\n | undefined;\n baseUrl?: string;\n};\n\nexport function createNamefiClient({\n authentication,\n logger,\n baseUrl = 'https://backend.astra.namefi.io',\n}: CreateNamefiClientOptions) {\n const { type } = authentication;\n const _logger = logger\n ? typeof logger === 'object'\n ? logger\n : {\n info: (...args: any[]) => console.log(...args),\n error: (...args: any[]) => console.error(...args),\n }\n : undefined;\n\n const url = new URL(baseUrl);\n url.pathname =\n '/' + [...url.pathname.split('/').filter(Boolean), 'v-next'].join('/');\n\n const link = new OpenAPILink(contract as unknown as typeof router, {\n url: url.toString(),\n headers: async (options, path, input) => {\n if (type === 'API_KEY') {\n return {\n 'x-api-key': authentication.apiKey,\n };\n }\n\n const eip712Ctx = getPath(path, contract)?.['~orpc']?.meta?.eip712;\n const primaryType = eip712Ctx?.input?.acceptedPrimaryTypes?.[0];\n\n const { signature, address } = await authentication.signer.signTypedData({\n domain: {\n name: 'Namefi',\n version: '1',\n },\n types: eip712Ctx?.input?.types ?? {},\n primaryType,\n message: {\n payload: input as unknown as Record<string, unknown>,\n timestamp: Math.trunc(Date.now() / 1000),\n nonce: authentication.signer.generateNonce(),\n },\n });\n return {\n 'x-namefi-signer': address,\n 'x-namefi-signature': signature,\n 'x-namefi-eip712-type': primaryType,\n };\n },\n fetch: (request, init) => {\n return globalThis.fetch(request, {\n ...init,\n credentials: 'include', // Include cookies for cross-origin requests\n });\n },\n interceptors: [\n onError((error) => {\n _logger?.error(error);\n }),\n onFinish((response) => {\n _logger?.info('Request finished');\n }),\n onStart((request) => {\n _logger?.info('Request started');\n }),\n onSuccess((response) => {\n _logger?.info('Request succeeded');\n }),\n ],\n });\n\n const client: JsonifiedClient<ContractRouterClient<typeof router>> =\n createORPCClient(link);\n\n return client;\n}\n\nfunction getPath(parts: readonly string[], object: Record<string, unknown>) {\n let current: any = object;\n for (const part of parts) {\n if (!!current && part in current) {\n current = current[part];\n } else {\n return undefined;\n }\n }\n return current;\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Namefi <dev-team@namefi.io>",
4
4
  "license": "MIT",
5
5
  "description": "API client for Namefi",
6
- "version": "0.0.0-pre.5",
6
+ "version": "0.0.0-pre.6",
7
7
  "type": "module",
8
8
  "files": ["dist"],
9
9
  "dependencies": {