@buildonspark/issuer-sdk 0.0.28 → 0.0.30
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.d.cts +4 -69
- package/dist/index.d.ts +4 -69
- package/package.json +4 -4
- package/src/issuer-spark-wallet.ts +0 -2
- package/src/proto/spark.ts +2106 -292
- package/src/interface/wallet-interface.ts +0 -99
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { LRCWallet } from "@buildonspark/lrc20-sdk";
|
|
2
|
-
import {
|
|
3
|
-
CreateLightningInvoiceParams,
|
|
4
|
-
PayLightningInvoiceParams,
|
|
5
|
-
TokenInfo,
|
|
6
|
-
} from "@buildonspark/spark-sdk";
|
|
7
|
-
import {
|
|
8
|
-
LeafWithPreviousTransactionData,
|
|
9
|
-
QueryAllTransfersResponse,
|
|
10
|
-
TokenTransactionWithStatus,
|
|
11
|
-
Transfer,
|
|
12
|
-
} from "@buildonspark/spark-sdk/proto/spark";
|
|
13
|
-
import { LightningReceiveRequest } from "@buildonspark/spark-sdk/types";
|
|
14
|
-
import { GetTokenActivityResponse, TokenPubKeyInfoResponse } from "../types.js";
|
|
15
|
-
import { ListAllTokenTransactionsCursor, OperationType } from "@buildonspark/lrc20-sdk/proto/rpc/v1/types";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Interface for the IssuerSparkWallet that includes all functions from both SparkWallet and IssuerSparkWallet
|
|
19
|
-
*/
|
|
20
|
-
export interface IssuerWalletInterface {
|
|
21
|
-
// SparkWallet methods
|
|
22
|
-
getIdentityPublicKey(): Promise<string>;
|
|
23
|
-
getSparkAddress(): Promise<string>;
|
|
24
|
-
getTransfers(
|
|
25
|
-
limit?: number,
|
|
26
|
-
offset?: number,
|
|
27
|
-
): Promise<QueryAllTransfersResponse>;
|
|
28
|
-
getBalance(forceRefetch?: boolean): Promise<{
|
|
29
|
-
balance: bigint;
|
|
30
|
-
tokenBalances: Map<string, { balance: bigint }>;
|
|
31
|
-
}>;
|
|
32
|
-
getDepositAddress(): Promise<string>;
|
|
33
|
-
transfer(params: {
|
|
34
|
-
receiverSparkAddress: string;
|
|
35
|
-
amountSats: number;
|
|
36
|
-
}): Promise<Transfer | string>;
|
|
37
|
-
createLightningInvoice(
|
|
38
|
-
params: CreateLightningInvoiceParams,
|
|
39
|
-
): Promise<LightningReceiveRequest>;
|
|
40
|
-
payLightningInvoice(params: PayLightningInvoiceParams): Promise<any>;
|
|
41
|
-
withdraw(params: {
|
|
42
|
-
onchainAddress: string;
|
|
43
|
-
amountSats?: number;
|
|
44
|
-
}): Promise<any>;
|
|
45
|
-
transferTokens(params: {
|
|
46
|
-
tokenPublicKey: string;
|
|
47
|
-
tokenAmount: bigint;
|
|
48
|
-
receiverSparkAddress: string;
|
|
49
|
-
selectedLeaves?: LeafWithPreviousTransactionData[];
|
|
50
|
-
}): Promise<string>;
|
|
51
|
-
// IssuerSparkWallet methods
|
|
52
|
-
getIssuerTokenPublicKey(): Promise<string>;
|
|
53
|
-
getIssuerTokenBalance(): Promise<{
|
|
54
|
-
balance: bigint;
|
|
55
|
-
}>;
|
|
56
|
-
mintTokens(tokenAmount: bigint): Promise<string>;
|
|
57
|
-
getTokenActivity(
|
|
58
|
-
pageSize: number,
|
|
59
|
-
cursor?: ListAllTokenTransactionsCursor,
|
|
60
|
-
operationTypes?: OperationType[],
|
|
61
|
-
beforeTimestamp?: Date,
|
|
62
|
-
): Promise<GetTokenActivityResponse>;
|
|
63
|
-
getIssuerTokenActivity(
|
|
64
|
-
pageSize: number,
|
|
65
|
-
cursor?: ListAllTokenTransactionsCursor,
|
|
66
|
-
operationTypes?: OperationType[],
|
|
67
|
-
beforeTimestamp?: Date,
|
|
68
|
-
afterTimestamp?: Date,
|
|
69
|
-
): Promise<GetTokenActivityResponse>;
|
|
70
|
-
getTokenTransactions(
|
|
71
|
-
tokenPublicKeys: string[],
|
|
72
|
-
tokenTransactionHashes?: string[],
|
|
73
|
-
): Promise<TokenTransactionWithStatus[]>;
|
|
74
|
-
|
|
75
|
-
getTokenInfo(): Promise<TokenInfo[]>;
|
|
76
|
-
getIssuerTokenInfo(): Promise<TokenPubKeyInfoResponse | null>;
|
|
77
|
-
burnTokens(
|
|
78
|
-
tokenAmount: bigint,
|
|
79
|
-
selectedLeaves?: LeafWithPreviousTransactionData[],
|
|
80
|
-
): Promise<string>;
|
|
81
|
-
freezeTokens(
|
|
82
|
-
ownerPublicKey: string,
|
|
83
|
-
): Promise<{ impactedLeafIds: string[]; impactedTokenAmount: bigint }>;
|
|
84
|
-
unfreezeTokens(
|
|
85
|
-
ownerPublicKey: string,
|
|
86
|
-
): Promise<{ impactedLeafIds: string[]; impactedTokenAmount: bigint }>;
|
|
87
|
-
getTokenL1Address(): Promise<string>;
|
|
88
|
-
announceTokenL1(params: {
|
|
89
|
-
lrc20Wallet: LRCWallet;
|
|
90
|
-
tokenName: string;
|
|
91
|
-
tokenTicker: string;
|
|
92
|
-
decimals: number;
|
|
93
|
-
maxSupply: bigint;
|
|
94
|
-
isFreezable: boolean;
|
|
95
|
-
feeRateSatsPerVb?: number;
|
|
96
|
-
}): Promise<string>;
|
|
97
|
-
mintTokensL1(tokenAmount: bigint): Promise<string>;
|
|
98
|
-
transferTokensL1(tokenAmount: bigint, p2trAddress: string): Promise<string>;
|
|
99
|
-
}
|