You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -82,6 +76,63 @@ export abstract class Provider {
82
76
params: Array<any>
83
77
) : Promise<any>;
84
78
79
+
// Coins
80
+
/**
81
+
* Get all Coin<`coin_type`> objects owned by an address.
82
+
* @param coinType optional fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.
83
+
* @param cursor optional paging cursor
84
+
* @param limit maximum number of items per page
85
+
*/
86
+
abstractgetCoins(
87
+
owner: SuiAddress,
88
+
coinType: String|null,
89
+
cursor: ObjectId|null,
90
+
limit: number|null
91
+
) : Promise<PaginatedCoins>;
92
+
93
+
/**
94
+
* Get all Coin objects owned by an address.
95
+
* @param cursor optional paging cursor
96
+
* @param limt maximum number of items per page
97
+
*/
98
+
abstractgetAllCoins(
99
+
owner: SuiAddress,
100
+
cursor: ObjectId|null,
101
+
limit: number|null
102
+
) : Promise<PaginatedCoins>;
103
+
104
+
/**
105
+
* Get the total coin balance for one coin type, owned by the address owner.
106
+
* @param coinType optional fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.
107
+
*/
108
+
abstractgetBalance(
109
+
owner: SuiAddress,
110
+
coinType: String|null
111
+
) : Promise<CoinBalance>;
112
+
113
+
/**
114
+
* Get the total coin balance for all coin type, owned by the address owner.
115
+
*/
116
+
abstractgetAllBalances(
117
+
owner: SuiAddress
118
+
) : Promise<CoinBalance[]>;
119
+
120
+
/**
121
+
* Fetch CoinMetadata for a given coin type
122
+
* @param coinType fully qualified type names for the coin (e.g.,
* @param coinType fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.
131
+
*/
132
+
abstractgetTotalSupply(
133
+
coinType: string
134
+
) : Promise<CoinSupply>;
135
+
85
136
// Objects
86
137
/**
87
138
* Get all objects owned by an address
@@ -98,8 +149,7 @@ export abstract class Provider {
98
149
): Promise<SuiObjectInfo[]>;
99
150
100
151
/**
101
-
* Convenience method for getting all coins objects owned by an address
102
-
* @param typeArg optional argument for filter by coin type, e.g., '0x2::sui::SUI'
0 commit comments