@proofchain/sdk 2.13.0 → 2.14.0
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.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +15 -0
- package/dist/index.mjs +15 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1968,6 +1968,23 @@ declare class RewardsClient {
|
|
|
1968
1968
|
status?: string;
|
|
1969
1969
|
reward_type?: string;
|
|
1970
1970
|
}): Promise<UserReward[]>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Get the public reward catalog (active, public reward definitions)
|
|
1973
|
+
* Available to both API key and end-user JWT clients.
|
|
1974
|
+
*/
|
|
1975
|
+
getCatalog(): Promise<RewardDefinition[]>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Claim a lazy-minted NFT reward.
|
|
1978
|
+
* The wallet_address receives the minted NFT. The tenant's treasury pays gas.
|
|
1979
|
+
* Available to both API key and end-user JWT clients (scoped to own rewards).
|
|
1980
|
+
*/
|
|
1981
|
+
claimReward(earnedRewardId: string, walletAddress: string): Promise<{
|
|
1982
|
+
success: boolean;
|
|
1983
|
+
reward_id: string;
|
|
1984
|
+
token_id?: number;
|
|
1985
|
+
tx_hash: string;
|
|
1986
|
+
wallet_address: string;
|
|
1987
|
+
}>;
|
|
1971
1988
|
/**
|
|
1972
1989
|
* Manually award rewards to users
|
|
1973
1990
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1968,6 +1968,23 @@ declare class RewardsClient {
|
|
|
1968
1968
|
status?: string;
|
|
1969
1969
|
reward_type?: string;
|
|
1970
1970
|
}): Promise<UserReward[]>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Get the public reward catalog (active, public reward definitions)
|
|
1973
|
+
* Available to both API key and end-user JWT clients.
|
|
1974
|
+
*/
|
|
1975
|
+
getCatalog(): Promise<RewardDefinition[]>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Claim a lazy-minted NFT reward.
|
|
1978
|
+
* The wallet_address receives the minted NFT. The tenant's treasury pays gas.
|
|
1979
|
+
* Available to both API key and end-user JWT clients (scoped to own rewards).
|
|
1980
|
+
*/
|
|
1981
|
+
claimReward(earnedRewardId: string, walletAddress: string): Promise<{
|
|
1982
|
+
success: boolean;
|
|
1983
|
+
reward_id: string;
|
|
1984
|
+
token_id?: number;
|
|
1985
|
+
tx_hash: string;
|
|
1986
|
+
wallet_address: string;
|
|
1987
|
+
}>;
|
|
1971
1988
|
/**
|
|
1972
1989
|
* Manually award rewards to users
|
|
1973
1990
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1474,6 +1474,21 @@ var RewardsClient = class {
|
|
|
1474
1474
|
const query = params.toString();
|
|
1475
1475
|
return this.http.get(`/rewards/users/${userId}/rewards${query ? "?" + query : ""}`);
|
|
1476
1476
|
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Get the public reward catalog (active, public reward definitions)
|
|
1479
|
+
* Available to both API key and end-user JWT clients.
|
|
1480
|
+
*/
|
|
1481
|
+
async getCatalog() {
|
|
1482
|
+
return this.http.get("/rewards/catalog");
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Claim a lazy-minted NFT reward.
|
|
1486
|
+
* The wallet_address receives the minted NFT. The tenant's treasury pays gas.
|
|
1487
|
+
* Available to both API key and end-user JWT clients (scoped to own rewards).
|
|
1488
|
+
*/
|
|
1489
|
+
async claimReward(earnedRewardId, walletAddress) {
|
|
1490
|
+
return this.http.post(`/rewards/earned/${earnedRewardId}/claim?wallet_address=${encodeURIComponent(walletAddress)}`, {});
|
|
1491
|
+
}
|
|
1477
1492
|
/**
|
|
1478
1493
|
* Manually award rewards to users
|
|
1479
1494
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1420,6 +1420,21 @@ var RewardsClient = class {
|
|
|
1420
1420
|
const query = params.toString();
|
|
1421
1421
|
return this.http.get(`/rewards/users/${userId}/rewards${query ? "?" + query : ""}`);
|
|
1422
1422
|
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Get the public reward catalog (active, public reward definitions)
|
|
1425
|
+
* Available to both API key and end-user JWT clients.
|
|
1426
|
+
*/
|
|
1427
|
+
async getCatalog() {
|
|
1428
|
+
return this.http.get("/rewards/catalog");
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* Claim a lazy-minted NFT reward.
|
|
1432
|
+
* The wallet_address receives the minted NFT. The tenant's treasury pays gas.
|
|
1433
|
+
* Available to both API key and end-user JWT clients (scoped to own rewards).
|
|
1434
|
+
*/
|
|
1435
|
+
async claimReward(earnedRewardId, walletAddress) {
|
|
1436
|
+
return this.http.post(`/rewards/earned/${earnedRewardId}/claim?wallet_address=${encodeURIComponent(walletAddress)}`, {});
|
|
1437
|
+
}
|
|
1423
1438
|
/**
|
|
1424
1439
|
* Manually award rewards to users
|
|
1425
1440
|
*/
|
package/package.json
CHANGED