@namefi/api-client 0.0.0-pre.1 → 0.0.0-pre.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -15
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +786 -0
- package/dist/index.d.ts +786 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +2 -1
- package/contract.json +0 -449
- package/package.build.json +0 -36
- package/package.publish.json +0 -24
- package/scripts/minify-contract.ts +0 -7
- package/src/index.ts +0 -79
- package/switch-config-copy.sh +0 -67
- package/switch-config.sh +0 -71
- package/tsconfig.json +0 -17
- package/tsup.config.ts +0 -39
package/README.md
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
# [Namefi API Client](https://namefi.io)
|
|
4
5
|
|
|
5
6
|
> This package is still in alpha. APIs and behavior may change without notice.
|
|
6
7
|
|
|
8
|
+
> For [Full docs](https://namefi.io/docs)
|
|
9
|
+
|
|
7
10
|
## Table of Contents
|
|
8
11
|
|
|
9
12
|
- [Installation](#installation)
|
|
10
13
|
- [Usage](#usage)
|
|
11
|
-
- [Authentication](#authentication)
|
|
12
|
-
- [Contract](#contract)
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
npm install @namefi-
|
|
18
|
+
npm install @namefi/api-client
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
## Usage
|
|
21
22
|
|
|
22
23
|
```ts
|
|
23
|
-
import { createNamefiClient } from '@namefi-
|
|
24
|
+
import { createNamefiClient } from '@namefi/api-client';
|
|
24
25
|
|
|
25
26
|
const client = createNamefiClient({
|
|
26
27
|
authentication: {
|
|
27
|
-
apiKey: process.env.NAMEFI_API_KEY
|
|
28
|
+
apiKey: process.env.NAMEFI_API_KEY!,
|
|
28
29
|
type: 'API_KEY',
|
|
29
30
|
},
|
|
30
31
|
logger: true,
|
|
@@ -42,11 +43,3 @@ if (result.availability) {
|
|
|
42
43
|
console.log('Registered', order.id);
|
|
43
44
|
}
|
|
44
45
|
```
|
|
45
|
-
|
|
46
|
-
## Authentication
|
|
47
|
-
|
|
48
|
-
Provide an API key through the `authentication` option when creating the client.
|
|
49
|
-
|
|
50
|
-
## Contract
|
|
51
|
-
|
|
52
|
-
The client is generated against the bundled `contract.json` OpenAPI contract, which defines the available routes and shapes.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var client=require('@orpc/client'),fetch=require('@orpc/openapi-client/fetch');var D=Object.defineProperty;var n=(t,r)=>D(t,"name",{value:r,configurable:true});var c={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,d=r?typeof r=="object"?r:{info:n((...e)=>console.log(...e),"info"),error:n((...e)=>console.error(...e),"error")}:void 0,m=new URL(a);m.pathname="/"+[...m.pathname.split("/").filter(Boolean),"v-next"].join("/");let g=new fetch.OpenAPILink(c,{url:m.toString(),headers:n(async(e,p,l)=>{if(o==="API_KEY")return {"x-api-key":t.apiKey};let s=u(p,c)?.["~orpc"]?.meta?.eip712,i=s?.input?.acceptedPrimaryTypes?.[0];if(!i)return {};let{signature:y,address:h}=await t.signer.signTypedData({domain:{name:"Namefi",version:"1"},types:s?.input?.types??{},primaryType:i,message:l});return {"x-namefi-signer":h,"x-namefi-signature":y,"x-namefi-eip712-type":i}},"headers"),fetch:n((e,p)=>globalThis.fetch(e,{...p,credentials:"include"}),"fetch"),interceptors:[client.onStart(e=>{if(d?.info("Request started"),o==="EIP712"&&e?.input&&typeof e.input=="object"){if(!u(e.path,c)?.["~orpc"]?.meta?.eip712?.input?.acceptedPrimaryTypes?.[0])return;let s={...e.input};Object.keys(s).forEach(i=>{delete e.input[i];}),Object.assign(e.input,{payload:s,timestamp:Math.trunc(Date.now()/1e3),nonce:t.signer.generateNonce()});}}),client.onError(e=>{d?.error(e);}),client.onFinish(e=>{d?.info("Request finished");}),client.onSuccess(e=>{d?.info("Request succeeded");})]});return client.createORPCClient(g)}n(A,"createNamefiClient");function u(t,r){let a=r;for(let o of t)if(a&&o in a)a=a[o];else return;return a}n(u,"getPath");
|
|
2
|
+
exports.createNamefiClient=A;//# sourceMappingURL=index.cjs.map
|
|
3
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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","onStart","clone","key","onError","error","onFinish","_response","onSuccess","createORPCClient","parts","object","current","part"],"mappings":"6KAAA,IAAAA,CAAA,CAAA,CACE,WAAc,CACZ,UAAA,CAAc,CACZ,OAAA,CAAS,CACP,QAAA,CAAY,EACZ,CAAA,IAAA,CAAQ,CACN,MAAA,CAAU,CACR,KAAA,CAAS,CACP,oBAAwB,CAAA,CAAC,oBAAoB,CAAA,CAC7C,KAAS,CAAA,CACP,WAAc,CAAC,CAAE,IAAQ,CAAA,UAAA,CAAY,IAAQ,CAAA,QAAS,CAAC,CACvD,CAAA,kBAAA,CAAsB,CACpB,CAAE,IAAQ,CAAA,SAAA,CAAW,KAAQ,YAAa,CAAA,CAC1C,CAAE,IAAA,CAAQ,WAAa,CAAA,IAAA,CAAQ,SAAU,CACzC,CAAA,CAAE,IAAQ,CAAA,OAAA,CAAS,IAAQ,CAAA,QAAS,CACtC,CACF,CACF,CACF,CAAA,CACA,KAAS,CAAA,CACP,KAAQ,cACR,CAAA,MAAA,CAAU,KACV,CAAA,IAAA,CAAQ,CAAC,KAAA,CAAO,QAAQ,CACxB,CAAA,WAAA,CAAe,eACf,CAAA,OAAA,CAAW,iBACX,CAAA,WAAA,CAAe,kJACjB,CACF,CAA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","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 if (!primaryType) {\n return {};\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: input as unknown as Record<string, unknown>,\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 onStart((options) => {\n _logger?.info('Request started');\n\n if (\n type === 'EIP712' &&\n !!options?.input &&\n typeof options.input === 'object'\n ) {\n const eip712Ctx = getPath(options.path, contract)?.['~orpc']?.meta\n ?.eip712;\n const primaryType = eip712Ctx?.input?.acceptedPrimaryTypes?.[0];\n\n if (!primaryType) {\n return;\n }\n const clone: any = { ...options.input };\n Object.keys(clone).forEach((key) => {\n delete (options.input as any)[key];\n });\n Object.assign(options.input as any, {\n payload: clone as unknown as Record<string, unknown>,\n timestamp: Math.trunc(Date.now() / 1000),\n nonce: authentication.signer.generateNonce(),\n });\n }\n }),\n onError((error) => {\n _logger?.error(error);\n }),\n onFinish((_response) => {\n _logger?.info('Request finished');\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"]}
|