Skip to content

Commit 14eed8c

Browse files
authored
Add Request to Pay / Mint button (#66)
* Display Bill ID * Add initial types for request to mint * Add request to mint * Remove console log * Fix version
1 parent ab883dd commit 14eed8c

File tree

4 files changed

+246
-101
lines changed

4 files changed

+246
-101
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wildcat-dashboard-ui",
33
"private": true,
4-
"version": "0.0.1",
4+
"version": "0.1.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/generated/client/sdk.gen.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

33
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
4-
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData, KeysetInfoData, KeySetInfo} from './types.gen';
4+
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData, KeysetInfoData, KeySetInfo, RequestToMintData, RequestToMintResponseInfo} from './types.gen';
5+
56
import { client as _heyApiClient } from './client.gen';
67

78
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
@@ -136,3 +137,18 @@ export const keysetInfo = <ThrowOnError extends boolean = false>(options: Option
136137
...options
137138
});
138139
};
140+
141+
/**
142+
* --------------------------- RequestMint
143+
*/
144+
145+
export const requestToMint = <ThrowOnError extends boolean = false>(options: Options<RequestToMintData, ThrowOnError>) => {
146+
return (options.client ?? _heyApiClient).post<RequestToMintResponseInfo, unknown, ThrowOnError>({
147+
url: '/v1/admin/treasury/debit/request_to_mint_from_ebill',
148+
...options,
149+
headers: {
150+
'Content-Type': 'application/json',
151+
...options?.headers
152+
}
153+
});
154+
};

src/generated/client/types.gen.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,3 +496,36 @@ export type KeysetInfoData = {
496496
query?: never;
497497
url: '/v1/admin/keysets/{keyset_id}';
498498
};
499+
500+
/**
501+
* Request Mint
502+
*/
503+
504+
// pub struct RequestToMintFromEBillRequest {
505+
// pub ebill_id: String,
506+
// pub amount: Amount,
507+
// }
508+
509+
export type RequestToMintRequest = {
510+
ebill_id: string;
511+
amount: number;
512+
};
513+
514+
export type RequestToMintResponseInfo = {
515+
request_id: string;
516+
request: string;
517+
};
518+
519+
export type RequestToMintResponse = {
520+
/**
521+
* Successful response
522+
*/
523+
200: RequestToMintResponseInfo;
524+
};
525+
526+
export type RequestToMintData = {
527+
body?: RequestToMintRequest;
528+
path?: never;
529+
query?: never;
530+
url: '/v1/admin/treasury/debit/request_to_mint_from_ebill'
531+
};

0 commit comments

Comments
 (0)