@firmachain/firma-js 0.2.52 → 0.2.54
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/FirmaCosmWasmCw20.d.ts +46 -15
- package/dist/sdk/FirmaCosmWasmCw20.js +386 -171
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +52 -23
- package/dist/sdk/FirmaCosmWasmCw721.js +373 -171
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +77 -0
- package/dist/sdk/FirmaCosmWasmCwBridge.js +582 -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/package.json +1 -1
|
@@ -2,20 +2,22 @@ import { FirmaConfig } from "./FirmaConfig";
|
|
|
2
2
|
import { FirmaCosmWasmService } from "./FirmaCosmWasmService";
|
|
3
3
|
import { FirmaWalletService } from "./FirmaWalletService";
|
|
4
4
|
import { TxMisc } from "./firmachain/common";
|
|
5
|
-
|
|
5
|
+
import { EncodeObject } from "@cosmjs/proto-signing";
|
|
6
|
+
import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
|
|
7
|
+
export interface Cw721ExpiresAtHeight {
|
|
6
8
|
at_height: number;
|
|
7
9
|
}
|
|
8
|
-
export interface
|
|
10
|
+
export interface Cw721ExpiresAtTime {
|
|
9
11
|
at_time: number;
|
|
10
12
|
}
|
|
11
|
-
export interface
|
|
13
|
+
export interface Cw721ExpiresNever {
|
|
12
14
|
never: {};
|
|
13
15
|
}
|
|
14
|
-
export declare type
|
|
16
|
+
export declare type Cw721Expires = Cw721ExpiresAtHeight | Cw721ExpiresAtTime | Cw721ExpiresNever;
|
|
15
17
|
interface OwnershipResponse {
|
|
16
18
|
owner: string | null;
|
|
17
19
|
pending_owner: string | null;
|
|
18
|
-
pending_expiry:
|
|
20
|
+
pending_expiry: Cw721Expires | null;
|
|
19
21
|
}
|
|
20
22
|
export interface Cw721NftInfo {
|
|
21
23
|
access: {
|
|
@@ -33,45 +35,72 @@ export interface Cw721ContractInfo {
|
|
|
33
35
|
}
|
|
34
36
|
export interface Cw721Approval {
|
|
35
37
|
spender: string;
|
|
36
|
-
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;
|
|
37
52
|
}
|
|
38
53
|
export declare class FirmaCosmWasmCw721Service {
|
|
39
54
|
private readonly config;
|
|
40
55
|
private readonly cosmwasmService;
|
|
41
56
|
constructor(config: FirmaConfig, cosmwasmService: FirmaCosmWasmService);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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>;
|
|
53
82
|
getGasEstimationMint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string): Promise<number>;
|
|
54
83
|
getGasEstimationBurn(wallet: FirmaWalletService, contractAddress: string, token_id: string): Promise<number>;
|
|
55
84
|
getGasEstimationTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string): Promise<number>;
|
|
56
|
-
getGasEstimationApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires:
|
|
85
|
+
getGasEstimationApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires): Promise<number>;
|
|
57
86
|
getGasEstimationRevoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string): Promise<number>;
|
|
58
|
-
getGasEstimationApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires:
|
|
87
|
+
getGasEstimationApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires): Promise<number>;
|
|
59
88
|
getGasEstimationRevokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string): Promise<number>;
|
|
60
89
|
getGasEstimationSendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any): Promise<number>;
|
|
61
|
-
getGasEstimationUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry:
|
|
90
|
+
getGasEstimationUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires): Promise<number>;
|
|
62
91
|
getGasEstimationUpdateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
|
|
63
92
|
getGasEstimationUpdateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
|
|
64
93
|
getOwnerFromNftID(contractAddress: string, tokenId: string): Promise<string>;
|
|
65
94
|
getApproval(contractAddress: string, tokenId: string, spender: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
|
|
66
95
|
getApprovals(contractAddress: string, tokenId: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
|
|
67
|
-
getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
|
|
96
|
+
getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean, limit?: number, start_after?: string): Promise<Cw721Approval[]>;
|
|
68
97
|
getOperator(contractAddress: string, owner: string, operator: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
|
|
69
98
|
getTotalNfts(contractAddress: string): Promise<number>;
|
|
70
99
|
getContractInfo(contractAddress: string): Promise<Cw721ContractInfo>;
|
|
71
100
|
getNftTokenUri(contractAddress: string, tokenId: string): Promise<string>;
|
|
72
101
|
getNftData(contractAddress: string, tokenId: string): Promise<Cw721NftInfo>;
|
|
73
|
-
getNFTIdListOfOwner(contractAddress: string, owner: string): Promise<string[]>;
|
|
74
|
-
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[]>;
|
|
75
104
|
getMinter(contractAddress: string): Promise<string>;
|
|
76
105
|
getExtension(contractAddress: string): Promise<any>;
|
|
77
106
|
getOwnerShip(contractAddress: string): Promise<OwnershipResponse>;
|