@firmachain/firma-js 0.2.51 → 0.2.53
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.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/sdk/FirmaBankService.d.ts +2 -1
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +92 -6
- package/dist/sdk/FirmaCosmWasmCw20.js +683 -39
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +74 -9
- package/dist/sdk/FirmaCosmWasmCw721.js +689 -54
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +63 -0
- package/dist/sdk/FirmaCosmWasmCwBridge.js +407 -0
- package/dist/sdk/FirmaCosmWasmService.d.ts +7 -1
- package/dist/sdk/FirmaCosmWasmService.js +136 -69
- package/dist/sdk/FirmaNftService.d.ts +5 -2
- package/dist/sdk/FirmaNftService.js +109 -49
- package/dist/sdk/FirmaSDK.d.ts +3 -1
- package/dist/sdk/FirmaSDK.js +4 -1
- package/dist/sdk/firmachain/common/accounts.js +5 -0
- package/package.json +1 -1
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { FirmaConfig } from "./FirmaConfig";
|
|
2
2
|
import { FirmaCosmWasmService } from "./FirmaCosmWasmService";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { FirmaWalletService } from "./FirmaWalletService";
|
|
4
|
+
import { TxMisc } from "./firmachain/common";
|
|
5
|
+
import { EncodeObject } from "@cosmjs/proto-signing";
|
|
6
|
+
import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
|
|
7
|
+
export interface Cw721ExpiresAtHeight {
|
|
8
|
+
at_height: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Cw721ExpiresAtTime {
|
|
11
|
+
at_time: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Cw721ExpiresNever {
|
|
14
|
+
never: {};
|
|
15
|
+
}
|
|
16
|
+
export declare type Cw721Expires = Cw721ExpiresAtHeight | Cw721ExpiresAtTime | Cw721ExpiresNever;
|
|
17
|
+
interface OwnershipResponse {
|
|
18
|
+
owner: string | null;
|
|
19
|
+
pending_owner: string | null;
|
|
20
|
+
pending_expiry: Cw721Expires | null;
|
|
8
21
|
}
|
|
9
22
|
export interface Cw721NftInfo {
|
|
10
23
|
access: {
|
|
@@ -22,22 +35,74 @@ export interface Cw721ContractInfo {
|
|
|
22
35
|
}
|
|
23
36
|
export interface Cw721Approval {
|
|
24
37
|
spender: string;
|
|
25
|
-
expires:
|
|
38
|
+
expires: Cw721Expires;
|
|
39
|
+
}
|
|
40
|
+
export declare class Cw721MsgData {
|
|
41
|
+
static getMsgDataMint(owner: string, token_id: string, token_uri: string): string;
|
|
42
|
+
static getMsgDataBurn(token_id: string): string;
|
|
43
|
+
static getMsgDataTransfer(recipient: string, token_id: string): string;
|
|
44
|
+
static getMsgDataApprove(spender: string, token_id: string, expires: Cw721Expires): string;
|
|
45
|
+
static getMsgDataRevoke(spender: string, token_id: string): string;
|
|
46
|
+
static getMsgDataApproveAll(operator: string, expires: Cw721Expires): string;
|
|
47
|
+
static getMsgDataRevokeAll(operator: string): string;
|
|
48
|
+
static getMsgDataSendNft(contract: string, token_id: string, msg: any): string;
|
|
49
|
+
static getMsgUpdateOwnerShipTransfer(new_owner: string, expiry: Cw721Expires): string;
|
|
50
|
+
static getMsgUpdateOwnerShipAccept(): string;
|
|
51
|
+
static getMsgUpdateOwnerShipRenounce(): string;
|
|
26
52
|
}
|
|
27
53
|
export declare class FirmaCosmWasmCw721Service {
|
|
28
54
|
private readonly config;
|
|
29
55
|
private readonly cosmwasmService;
|
|
30
56
|
constructor(config: FirmaConfig, cosmwasmService: FirmaCosmWasmService);
|
|
57
|
+
getCw721MsgData(): typeof Cw721MsgData;
|
|
58
|
+
mint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
59
|
+
getUnsignedTxMint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string): Promise<EncodeObject>;
|
|
60
|
+
burn(wallet: FirmaWalletService, contractAddress: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
61
|
+
getUnsignedTxBurn(wallet: FirmaWalletService, contractAddress: string, token_id: string): Promise<EncodeObject>;
|
|
62
|
+
transfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
63
|
+
getUnsignedTxTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string): Promise<EncodeObject>;
|
|
64
|
+
approve(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
65
|
+
getUnsignedTxApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires): Promise<EncodeObject>;
|
|
66
|
+
revoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
67
|
+
getUnsignedTxRevoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string): Promise<EncodeObject>;
|
|
68
|
+
approveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
69
|
+
getUnsignedTxApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires): Promise<EncodeObject>;
|
|
70
|
+
revokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
71
|
+
getUnsignedTxRevokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string): Promise<EncodeObject>;
|
|
72
|
+
sendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
73
|
+
getUnsignedTxSendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any): Promise<EncodeObject>;
|
|
74
|
+
updateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
75
|
+
getUnsignedTxUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires): Promise<EncodeObject>;
|
|
76
|
+
updateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
77
|
+
getUnsignedTxUpdateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string): Promise<EncodeObject>;
|
|
78
|
+
updateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
79
|
+
getUnsignedTxUpdateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string): Promise<EncodeObject>;
|
|
80
|
+
signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
|
|
81
|
+
getGasEstimationSignAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
|
|
82
|
+
getGasEstimationMint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string): Promise<number>;
|
|
83
|
+
getGasEstimationBurn(wallet: FirmaWalletService, contractAddress: string, token_id: string): Promise<number>;
|
|
84
|
+
getGasEstimationTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string): Promise<number>;
|
|
85
|
+
getGasEstimationApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires): Promise<number>;
|
|
86
|
+
getGasEstimationRevoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string): Promise<number>;
|
|
87
|
+
getGasEstimationApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires): Promise<number>;
|
|
88
|
+
getGasEstimationRevokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string): Promise<number>;
|
|
89
|
+
getGasEstimationSendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any): Promise<number>;
|
|
90
|
+
getGasEstimationUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires): Promise<number>;
|
|
91
|
+
getGasEstimationUpdateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
|
|
92
|
+
getGasEstimationUpdateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
|
|
31
93
|
getOwnerFromNftID(contractAddress: string, tokenId: string): Promise<string>;
|
|
32
94
|
getApproval(contractAddress: string, tokenId: string, spender: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
|
|
33
95
|
getApprovals(contractAddress: string, tokenId: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
|
|
34
|
-
getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
|
|
96
|
+
getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean, limit?: number, start_after?: string): Promise<Cw721Approval[]>;
|
|
97
|
+
getOperator(contractAddress: string, owner: string, operator: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
|
|
35
98
|
getTotalNfts(contractAddress: string): Promise<number>;
|
|
36
99
|
getContractInfo(contractAddress: string): Promise<Cw721ContractInfo>;
|
|
37
100
|
getNftTokenUri(contractAddress: string, tokenId: string): Promise<string>;
|
|
38
101
|
getNftData(contractAddress: string, tokenId: string): Promise<Cw721NftInfo>;
|
|
39
|
-
getNFTIdListOfOwner(contractAddress: string, owner: string): Promise<string[]>;
|
|
40
|
-
getAllNftIdList(contractAddress: string): Promise<string[]>;
|
|
102
|
+
getNFTIdListOfOwner(contractAddress: string, owner: string, limit?: number, start_after?: string): Promise<string[]>;
|
|
103
|
+
getAllNftIdList(contractAddress: string, limit?: number, start_after?: string): Promise<string[]>;
|
|
41
104
|
getMinter(contractAddress: string): Promise<string>;
|
|
42
105
|
getExtension(contractAddress: string): Promise<any>;
|
|
106
|
+
getOwnerShip(contractAddress: string): Promise<OwnershipResponse>;
|
|
43
107
|
}
|
|
108
|
+
export {};
|