@wuwei-labs/srsly 2.0.0-beta.26 → 2.0.0-beta.28
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/README.md +189 -97
- package/dist/cjs/contract/close.js +33 -24
- package/dist/cjs/contract/close.js.map +1 -1
- package/dist/cjs/contract/create.js +67 -52
- package/dist/cjs/contract/create.js.map +1 -1
- package/dist/cjs/package.json +2 -13
- package/dist/cjs/rental/accept.js +35 -29
- package/dist/cjs/rental/accept.js.map +1 -1
- package/dist/cjs/rental/cancel.js +13 -9
- package/dist/cjs/rental/cancel.js.map +1 -1
- package/dist/cjs/rental/close.js +15 -11
- package/dist/cjs/rental/close.js.map +1 -1
- package/dist/cjs/rental/reset.js +20 -17
- package/dist/cjs/rental/reset.js.map +1 -1
- package/dist/cjs/utils/config.js +0 -88
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/instruction-converter.js +49 -0
- package/dist/cjs/utils/instruction-converter.js.map +1 -0
- package/dist/esm/contract/close.js +34 -25
- package/dist/esm/contract/close.js.map +1 -1
- package/dist/esm/contract/create.js +67 -51
- package/dist/esm/contract/create.js.map +1 -1
- package/dist/esm/package.json +2 -13
- package/dist/esm/rental/accept.js +36 -30
- package/dist/esm/rental/accept.js.map +1 -1
- package/dist/esm/rental/cancel.js +13 -9
- package/dist/esm/rental/cancel.js.map +1 -1
- package/dist/esm/rental/close.js +15 -11
- package/dist/esm/rental/close.js.map +1 -1
- package/dist/esm/rental/reset.js +22 -19
- package/dist/esm/rental/reset.js.map +1 -1
- package/dist/esm/utils/config.js +0 -88
- package/dist/esm/utils/config.js.map +1 -1
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/instruction-converter.js +45 -0
- package/dist/esm/utils/instruction-converter.js.map +1 -0
- package/dist/types/contract/close.d.ts +12 -11
- package/dist/types/contract/close.d.ts.map +1 -1
- package/dist/types/contract/create.d.ts +49 -65
- package/dist/types/contract/create.d.ts.map +1 -1
- package/dist/types/rental/accept.d.ts +32 -28
- package/dist/types/rental/accept.d.ts.map +1 -1
- package/dist/types/rental/cancel.d.ts +16 -12
- package/dist/types/rental/cancel.d.ts.map +1 -1
- package/dist/types/rental/close.d.ts +16 -13
- package/dist/types/rental/close.d.ts.map +1 -1
- package/dist/types/rental/reset.d.ts +19 -16
- package/dist/types/rental/reset.d.ts.map +1 -1
- package/dist/types/utils/config.d.ts +0 -95
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/instruction-converter.d.ts +76 -0
- package/dist/types/utils/instruction-converter.d.ts.map +1 -0
- package/dist/types/utils/types.d.ts +0 -8
- package/dist/types/utils/types.d.ts.map +1 -1
- package/package.json +2 -13
- package/dist/cjs/utils/pack-functions.js +0 -148
- package/dist/cjs/utils/pack-functions.js.map +0 -1
- package/dist/cjs/utils/solana-adapter.js +0 -120
- package/dist/cjs/utils/solana-adapter.js.map +0 -1
- package/dist/esm/utils/pack-functions.js +0 -110
- package/dist/esm/utils/pack-functions.js.map +0 -1
- package/dist/esm/utils/solana-adapter.js +0 -82
- package/dist/esm/utils/solana-adapter.js.map +0 -1
- package/dist/types/utils/pack-functions.d.ts +0 -18
- package/dist/types/utils/pack-functions.d.ts.map +0 -1
- package/dist/types/utils/solana-adapter.d.ts +0 -26
- package/dist/types/utils/solana-adapter.d.ts.map +0 -1
|
@@ -1,87 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Unified contract creation - works with both @solana/kit and @solana/web3.js
|
|
4
|
+
* Uses strings for all addresses to eliminate library-specific type complexity
|
|
5
|
+
*/
|
|
2
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
7
|
exports.createContract = createContract;
|
|
4
|
-
exports.getCreateContractInstructionAsync = getCreateContractInstructionAsync;
|
|
5
8
|
const config_1 = require("../utils/config");
|
|
6
9
|
const constants_1 = require("../utils/constants");
|
|
7
10
|
const paymentFrequency_1 = require("../utils/paymentFrequency");
|
|
8
11
|
const paymentFrequency_2 = require("../types/paymentFrequency");
|
|
12
|
+
const instruction_converter_1 = require("../utils/instruction-converter");
|
|
9
13
|
/**
|
|
10
|
-
* Internal function to create a contract instruction with configuration options
|
|
14
|
+
* Internal function to create a rental contract instruction with configuration options
|
|
11
15
|
*/
|
|
12
16
|
async function _createContract(params, config) {
|
|
13
|
-
const { owner, fleet, ownerProfile, rate, durationMax, paymentsFreq, ownerKeyIndex = 0,
|
|
14
|
-
// Validate payment frequency
|
|
17
|
+
const { owner, fleet, ownerProfile, rate, durationMax, paymentsFreq, gameId, sageProgramAddress, atlasMint, ownerKeyIndex = 0, } = params;
|
|
18
|
+
// Validate payment frequency
|
|
15
19
|
if (!(0, paymentFrequency_2.isValidPaymentFrequency)(paymentsFreq)) {
|
|
16
|
-
throw new Error(`Invalid payment frequency: ${paymentsFreq}. Valid values are
|
|
20
|
+
throw new Error(`Invalid payment frequency: "${paymentsFreq}". Valid values are: ${JSON.stringify(Object.keys({ daily: true, weekly: true, monthly: true, hourly: true }))}`);
|
|
17
21
|
}
|
|
18
|
-
//
|
|
22
|
+
// Validate duration alignment
|
|
23
|
+
(0, paymentFrequency_1.validateDurationAlignment)(Number(durationMax), paymentsFreq);
|
|
24
|
+
// Get the payment frequency interval (this will be the minimum duration)
|
|
19
25
|
const durationMin = (0, paymentFrequency_1.paymentFrequencyStringToSeconds)(paymentsFreq);
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
// Get the actual game ID to use (param override, config override, or network default)
|
|
26
|
+
// Convert the payment frequency to the format expected by the Rust program (with @ prefix)
|
|
27
|
+
const paymentsFreqWithPrefix = `@${paymentsFreq}`;
|
|
28
|
+
// Get network-specific addresses (param override, config override, or network default)
|
|
24
29
|
const actualGameId = gameId ? (0, constants_1.toAddress)(gameId) : await (0, constants_1.getSageGameId)(config);
|
|
25
|
-
|
|
30
|
+
const actualSageProgramAddress = sageProgramAddress ? (0, constants_1.toAddress)(sageProgramAddress) : await (0, constants_1.getSageProgramAddress)(config);
|
|
31
|
+
const actualAtlasMint = atlasMint ? (0, constants_1.toAddress)(atlasMint) : await (0, constants_1.getAtlasMint)(config);
|
|
32
|
+
const input = {
|
|
33
|
+
owner, // Pass as-is (string or signer)
|
|
34
|
+
fleet: (0, constants_1.toAddress)(fleet), // Ensure string
|
|
35
|
+
ownerProfile: (0, constants_1.toAddress)(ownerProfile), // Ensure string
|
|
36
|
+
gameId: actualGameId, // Already string
|
|
37
|
+
sageProgram: actualSageProgramAddress, // Fixed: use sageProgram instead of sageProgramAddress
|
|
38
|
+
mint: actualAtlasMint, // Fixed: use mint instead of atlasMint
|
|
39
|
+
durationMin,
|
|
40
|
+
durationMax,
|
|
41
|
+
rate,
|
|
42
|
+
paymentsFeq: paymentsFreqWithPrefix, // Fixed: use paymentsFeq as expected by codama
|
|
43
|
+
ownerKeyIndex,
|
|
44
|
+
};
|
|
45
|
+
// Get network-specific codama functions from centralized config
|
|
26
46
|
const instructionsModule = (0, config_1.getModule)('instructions');
|
|
27
47
|
const programsModule = (0, config_1.getModule)('programs');
|
|
28
48
|
const { getCreateContractInstructionAsync } = instructionsModule;
|
|
29
49
|
const { SRSLY_PROGRAM_ADDRESS } = programsModule;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// Let codama derive the rest (contract, rentalAuthority, ownerTokenAccount, etc.)
|
|
33
|
-
const input = {
|
|
34
|
-
mint: atlasMint,
|
|
35
|
-
owner, // Keep as TransactionSigner
|
|
36
|
-
fleet: (0, constants_1.toAddress)(fleet),
|
|
37
|
-
ownerProfile: (0, constants_1.toAddress)(ownerProfile),
|
|
38
|
-
gameId: actualGameId,
|
|
39
|
-
rate: BigInt(rate),
|
|
40
|
-
durationMin: BigInt(durationMin),
|
|
41
|
-
durationMax: BigInt(durationMax),
|
|
42
|
-
paymentsFeq: `@${paymentsFreq}`,
|
|
43
|
-
ownerKeyIndex,
|
|
44
|
-
sageProgram: (0, constants_1.toAddress)(await (0, constants_1.getSageProgramAddress)(config)),
|
|
45
|
-
};
|
|
46
|
-
return getCreateContractInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
|
|
50
|
+
const rawInstruction = await getCreateContractInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
|
|
51
|
+
return (0, instruction_converter_1.createFluentInstruction)(rawInstruction);
|
|
47
52
|
}
|
|
48
53
|
/**
|
|
49
54
|
* Creates an instruction to create a rental contract with fluent configuration.
|
|
55
|
+
* This unified version works with both @solana/kit and @solana/web3.js using strings for addresses.
|
|
50
56
|
*
|
|
51
57
|
* @example
|
|
52
58
|
* ```typescript
|
|
53
|
-
* //
|
|
54
|
-
* const ix = await createContract(params);
|
|
55
|
-
*
|
|
56
|
-
* // Use mainnet configuration
|
|
57
|
-
* const ix = await createContract(params).set({ network: 'mainnet' });
|
|
59
|
+
* // Works with any library - just use strings for addresses!
|
|
58
60
|
*
|
|
59
|
-
* //
|
|
60
|
-
* const
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* // Default returns @solana/kit format
|
|
62
|
+
* const kitInstruction = await createContract({
|
|
63
|
+
* owner: wallet, // Can be signer object or string
|
|
64
|
+
* fleet: "FleetAddress123...", // String address
|
|
65
|
+
* ownerProfile: "ProfileAddr...", // String address
|
|
66
|
+
* rate: 1000,
|
|
67
|
+
* durationMax: days(7),
|
|
68
|
+
* paymentsFreq: 'daily'
|
|
64
69
|
* });
|
|
65
70
|
*
|
|
66
|
-
* //
|
|
67
|
-
* const
|
|
68
|
-
*
|
|
69
|
-
*
|
|
71
|
+
* // Convert to @solana/web3.js format using fluent interface
|
|
72
|
+
* const web3jsInstruction = await createContract({
|
|
73
|
+
* owner: wallet,
|
|
74
|
+
* fleet: "FleetAddress123...",
|
|
75
|
+
* ownerProfile: "ProfileAddr...",
|
|
76
|
+
* rate: 1000,
|
|
77
|
+
* durationMax: days(7),
|
|
78
|
+
* paymentsFreq: 'daily'
|
|
79
|
+
* }).web3js();
|
|
80
|
+
*
|
|
81
|
+
* // Chain configuration and format conversion
|
|
82
|
+
* const web3jsInstructionWithConfig = await createContract({
|
|
83
|
+
* owner: wallet,
|
|
84
|
+
* fleet: "FleetAddress123...",
|
|
85
|
+
* ownerProfile: "ProfileAddr...",
|
|
86
|
+
* rate: 1000,
|
|
87
|
+
* durationMax: days(7),
|
|
88
|
+
* paymentsFreq: 'daily'
|
|
89
|
+
* }).set({ programs: 'mainnet' }).web3js();
|
|
90
|
+
*
|
|
91
|
+
* // Use with your preferred Solana library
|
|
92
|
+
* const transaction = new Transaction().add(web3jsInstruction);
|
|
70
93
|
* ```
|
|
71
94
|
*
|
|
72
95
|
* @param params The simplified parameters for creating a rental contract
|
|
73
96
|
* @returns A ConfigSelector that can be configured with .set() or awaited directly
|
|
74
97
|
*/
|
|
75
98
|
function createContract(params) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Export config selector for getCreateContractInstructionAsync
|
|
80
|
-
*/
|
|
81
|
-
function getCreateContractInstructionAsync(input, options) {
|
|
82
|
-
return (0, config_1.createConfigSelector)(async (config) => {
|
|
83
|
-
const instructionsModule = (0, config_1.getModule)('instructions');
|
|
84
|
-
return instructionsModule.getCreateContractInstructionAsync(input, options);
|
|
85
|
-
});
|
|
99
|
+
const baseSelector = (0, config_1.createConfigSelector)((config) => _createContract(params, config));
|
|
100
|
+
return (0, instruction_converter_1.createFluentConfigSelector)(baseSelector);
|
|
86
101
|
}
|
|
87
102
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/contract/create.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","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AAC"}
|
package/dist/cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuwei-labs/srsly",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@codama/nodes-from-anchor": "^1.1.13",
|
|
40
40
|
"@codama/renderers": "^1.0.21",
|
|
41
|
+
"@solana/kit": "^2.0.0",
|
|
41
42
|
"@types/node": "^24.0.3",
|
|
42
43
|
"codama": "^1.2.13",
|
|
43
44
|
"tsconfig-to-dual-package": "^1.2.0",
|
|
@@ -45,17 +46,5 @@
|
|
|
45
46
|
"typescript": "^5.8.3",
|
|
46
47
|
"vitest": "^3.2.4"
|
|
47
48
|
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"@solana/kit": ">=2.0.0",
|
|
50
|
-
"@solana/web3.js": ">=1.95.0"
|
|
51
|
-
},
|
|
52
|
-
"peerDependenciesMeta": {
|
|
53
|
-
"@solana/kit": {
|
|
54
|
-
"optional": true
|
|
55
|
-
},
|
|
56
|
-
"@solana/web3.js": {
|
|
57
|
-
"optional": true
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
49
|
"type": "commonjs"
|
|
61
50
|
}
|
|
@@ -5,6 +5,7 @@ exports.getAcceptRentalInstructionAsync = getAcceptRentalInstructionAsync;
|
|
|
5
5
|
const config_1 = require("../utils/config");
|
|
6
6
|
const constants_1 = require("../utils/constants");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
|
+
const instruction_converter_1 = require("../utils/instruction-converter");
|
|
8
9
|
/**
|
|
9
10
|
* Internal function to accept a rental instruction with configuration options
|
|
10
11
|
*/
|
|
@@ -20,16 +21,16 @@ async function _acceptRental(params, config) {
|
|
|
20
21
|
config);
|
|
21
22
|
// Let codama derive the rest (rentalThread, rentalState, rentalAuthority, etc.)
|
|
22
23
|
const input = {
|
|
23
|
-
borrower,
|
|
24
|
-
borrowerProfile: (0, constants_1.toAddress)(borrowerProfile),
|
|
25
|
-
borrowerProfileFaction: profileFaction,
|
|
26
|
-
fleet: (0, constants_1.toAddress)(fleet),
|
|
27
|
-
contract: (0, constants_1.toAddress)(contract),
|
|
28
|
-
gameId: actualGameId,
|
|
29
|
-
starbase,
|
|
30
|
-
starbasePlayer,
|
|
31
|
-
amount,
|
|
32
|
-
duration,
|
|
24
|
+
borrower, // Pass as-is (string or signer)
|
|
25
|
+
borrowerProfile: (0, constants_1.toAddress)(borrowerProfile), // Ensure string
|
|
26
|
+
borrowerProfileFaction: profileFaction, // Already string from deriveGameAccounts
|
|
27
|
+
fleet: (0, constants_1.toAddress)(fleet), // Ensure string
|
|
28
|
+
contract: (0, constants_1.toAddress)(contract), // Ensure string
|
|
29
|
+
gameId: actualGameId, // Already string
|
|
30
|
+
starbase, // Already string from deriveGameAccounts
|
|
31
|
+
starbasePlayer, // Already string from deriveGameAccounts
|
|
32
|
+
amount, // BigInt value
|
|
33
|
+
duration, // BigInt value
|
|
33
34
|
referralTokenAccount: referralTokenAccount ? (0, constants_1.toAddress)(referralTokenAccount) : undefined,
|
|
34
35
|
};
|
|
35
36
|
// Get network-specific codama functions from centralized config
|
|
@@ -37,51 +38,56 @@ async function _acceptRental(params, config) {
|
|
|
37
38
|
const programsModule = (0, config_1.getModule)('programs');
|
|
38
39
|
const { getAcceptRentalInstructionAsync } = instructionsModule;
|
|
39
40
|
const { SRSLY_PROGRAM_ADDRESS } = programsModule;
|
|
40
|
-
|
|
41
|
+
const rawInstruction = await getAcceptRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
|
|
42
|
+
return (0, instruction_converter_1.createFluentInstruction)(rawInstruction);
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
43
45
|
* Creates an instruction to accept a rental with fluent configuration.
|
|
44
46
|
*
|
|
45
47
|
* @example
|
|
46
48
|
* ```typescript
|
|
47
|
-
* //
|
|
48
|
-
* const
|
|
49
|
-
* borrower: wallet,
|
|
50
|
-
* borrowerProfile:
|
|
51
|
-
* borrowerFaction: 1,
|
|
52
|
-
* fleet:
|
|
53
|
-
* contract:
|
|
54
|
-
* rate: 1000,
|
|
55
|
-
* duration: 86400
|
|
49
|
+
* // Works with any library - just use strings for addresses!
|
|
50
|
+
* const instruction = await acceptRental({
|
|
51
|
+
* borrower: wallet, // Can be signer object or string
|
|
52
|
+
* borrowerProfile: "ProfileAddr...", // String address
|
|
53
|
+
* borrowerFaction: 1, // 1 = mud, 2 = oni, 3 = ustur
|
|
54
|
+
* fleet: "FleetAddress123...", // String address
|
|
55
|
+
* contract: "ContractAddr...", // String address
|
|
56
|
+
* rate: 1000, // ATLAS tokens
|
|
57
|
+
* duration: 86400 // 1 day in seconds (total: 1000 * 86400 * 100M stardust)
|
|
56
58
|
* });
|
|
57
59
|
*
|
|
58
60
|
* // With referral (referrer gets 5% of platform fees)
|
|
59
|
-
* const
|
|
61
|
+
* const instruction = await acceptRental({
|
|
60
62
|
* borrower: wallet,
|
|
61
|
-
* borrowerProfile:
|
|
63
|
+
* borrowerProfile: "ProfileAddr...",
|
|
62
64
|
* borrowerFaction: 1,
|
|
63
|
-
* fleet:
|
|
64
|
-
* contract:
|
|
65
|
+
* fleet: "FleetAddress123...",
|
|
66
|
+
* contract: "ContractAddr...",
|
|
65
67
|
* rate: 1000,
|
|
66
68
|
* duration: 86400,
|
|
67
|
-
* referralTokenAccount:
|
|
69
|
+
* referralTokenAccount: "ReferralAddr..."
|
|
68
70
|
* });
|
|
69
71
|
*
|
|
70
72
|
* // Use mainnet configuration
|
|
71
|
-
* const
|
|
73
|
+
* const instruction = await acceptRental(params).set({ programs: 'mainnet' });
|
|
72
74
|
*
|
|
73
75
|
* // Override specific constants
|
|
74
|
-
* const
|
|
75
|
-
*
|
|
76
|
+
* const instruction = await acceptRental(params).set({
|
|
77
|
+
* programs: 'mainnet',
|
|
76
78
|
* gameId: 'custom-game-id...'
|
|
77
79
|
* });
|
|
80
|
+
*
|
|
81
|
+
* // Use the instruction with your preferred Solana library
|
|
82
|
+
* // instruction is compatible with both @solana/kit and @solana/web3.js
|
|
78
83
|
* ```
|
|
79
84
|
*
|
|
80
85
|
* @param params The simplified parameters for accepting a rental
|
|
81
86
|
* @returns A ConfigSelector that can be configured with .set() or awaited directly
|
|
82
87
|
*/
|
|
83
88
|
function acceptRental(params) {
|
|
84
|
-
|
|
89
|
+
const baseSelector = (0, config_1.createConfigSelector)((config) => _acceptRental(params, config));
|
|
90
|
+
return (0, instruction_converter_1.createFluentConfigSelector)(baseSelector);
|
|
85
91
|
}
|
|
86
92
|
function getAcceptRentalInstructionAsync(input, options) {
|
|
87
93
|
return (0, config_1.createConfigSelector)(async (config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accept.js","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"accept.js","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":";;AA8KA,oCAKC;AAED,0EAKC;AA1LD,4CAA2G;AAC3G,kDAAiF;AACjF,oCAA8C;AAC9C,0EAAwJ;AA4DxJ;;GAEG;AACH,KAAK,UAAU,aAAa,CAC1B,MAA0B,EAC1B,MAAsB;IAEtB,MAAM,EACJ,QAAQ,EACR,eAAe,EACf,eAAe,EACf,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,oBAAoB,GACrB,GAAG,MAAM,CAAC;IAEX,sFAAsF;IACtF,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,yBAAa,EAAC,MAAM,CAAC,CAAC;IAE9E,oDAAoD;IACpD,4EAA4E;IAC5E,MAAM,MAAM,GAAG,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O,IAAA,+CAAuB,EAAC,cAAc,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,SAAgB,YAAY,CAC1B,MAA0B;IAE1B,MAAM,YAAY,GAAG,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACrF,OAAO,IAAA,kDAA0B,EAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAU,EAAE,OAAa;IACvE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,+BAA+B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.cancelRental = cancelRental;
|
|
4
4
|
exports.getCancelRentalInstructionAsync = getCancelRentalInstructionAsync;
|
|
5
5
|
const config_1 = require("../utils/config");
|
|
6
|
+
const constants_1 = require("../utils/constants");
|
|
6
7
|
/**
|
|
7
8
|
* Internal function to cancel a rental instruction with configuration options
|
|
8
9
|
*/
|
|
@@ -10,8 +11,8 @@ async function _cancelRental(params, config) {
|
|
|
10
11
|
const { borrower, contract, } = params;
|
|
11
12
|
// Let codama derive all the optional accounts
|
|
12
13
|
const input = {
|
|
13
|
-
borrower,
|
|
14
|
-
contract,
|
|
14
|
+
borrower, // Pass as-is (string or signer)
|
|
15
|
+
contract: (0, constants_1.toAddress)(contract), // Ensure string
|
|
15
16
|
};
|
|
16
17
|
// Get network-specific codama functions from centralized config
|
|
17
18
|
const instructionsModule = (0, config_1.getModule)('instructions');
|
|
@@ -25,20 +26,23 @@ async function _cancelRental(params, config) {
|
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
27
28
|
* ```typescript
|
|
28
|
-
* //
|
|
29
|
-
* const
|
|
30
|
-
* borrower: wallet,
|
|
31
|
-
* contract:
|
|
29
|
+
* // Works with any library - just use strings for addresses!
|
|
30
|
+
* const instruction = await cancelRental({
|
|
31
|
+
* borrower: wallet, // Can be signer object or string
|
|
32
|
+
* contract: "ContractAddr..." // String address
|
|
32
33
|
* });
|
|
33
34
|
*
|
|
34
35
|
* // Use mainnet configuration
|
|
35
|
-
* const
|
|
36
|
+
* const instruction = await cancelRental(params).set({ programs: 'mainnet' });
|
|
36
37
|
*
|
|
37
38
|
* // Override specific constants
|
|
38
|
-
* const
|
|
39
|
-
*
|
|
39
|
+
* const instruction = await cancelRental(params).set({
|
|
40
|
+
* programs: 'mainnet',
|
|
40
41
|
* sageProgramAddress: 'custom...'
|
|
41
42
|
* });
|
|
43
|
+
*
|
|
44
|
+
* // Use the instruction with your preferred Solana library
|
|
45
|
+
* // instruction is compatible with both @solana/kit and @solana/web3.js
|
|
42
46
|
* ```
|
|
43
47
|
*
|
|
44
48
|
* @param params The simplified parameters for canceling a rental
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":";;AAgFA,oCAIC;AAED,0EAKC;AA3FD,4CAA2G;AAC3G,kDAA+C;AAsB/C;;GAEG;AACH,KAAK,UAAU,aAAa,CAC1B,MAA0B,EAC1B,MAAsB;IAEtB,MAAM,EACJ,QAAQ,EACR,QAAQ,GACT,GAAG,MAAM,CAAC;IAEX,8CAA8C;IAC9C,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAqB,gCAAgC;QAC7D,QAAQ,EAAE,IAAA,qBAAS,EAAC,QAAQ,CAAC,EAAE,gBAAgB;KAChD,CAAC;IAEF,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,EAAE,+BAA+B,EAAE,GAAG,kBAAkB,CAAC;IAC/D,MAAM,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAEjD,OAAO,+BAA+B,CACpC,KAAK,EACL,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,YAAY,CAC1B,MAA0B;IAE1B,OAAO,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAU,EAAE,OAAa;IACvE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,+BAA+B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cjs/rental/close.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.closeRental = closeRental;
|
|
4
4
|
exports.getCloseRentalInstructionAsync = getCloseRentalInstructionAsync;
|
|
5
5
|
const config_1 = require("../utils/config");
|
|
6
|
+
const constants_1 = require("../utils/constants");
|
|
6
7
|
/**
|
|
7
8
|
* Internal function to close a rental instruction with configuration options
|
|
8
9
|
*/
|
|
@@ -10,9 +11,9 @@ async function _closeRental(params, config) {
|
|
|
10
11
|
const { borrower, ownerTokenAccount, contract, } = params;
|
|
11
12
|
// Let codama derive the optional accounts
|
|
12
13
|
const input = {
|
|
13
|
-
borrower,
|
|
14
|
-
ownerTokenAccount,
|
|
15
|
-
contract,
|
|
14
|
+
borrower: (0, constants_1.toAddress)(borrower), // Ensure string
|
|
15
|
+
ownerTokenAccount: (0, constants_1.toAddress)(ownerTokenAccount), // Ensure string
|
|
16
|
+
contract: (0, constants_1.toAddress)(contract), // Ensure string
|
|
16
17
|
};
|
|
17
18
|
// Get network-specific codama functions from centralized config
|
|
18
19
|
const instructionsModule = (0, config_1.getModule)('instructions');
|
|
@@ -26,21 +27,24 @@ async function _closeRental(params, config) {
|
|
|
26
27
|
*
|
|
27
28
|
* @example
|
|
28
29
|
* ```typescript
|
|
29
|
-
* //
|
|
30
|
-
* const
|
|
31
|
-
* borrower:
|
|
32
|
-
* ownerTokenAccount:
|
|
33
|
-
* contract:
|
|
30
|
+
* // Works with any library - just use strings for addresses!
|
|
31
|
+
* const instruction = await closeRental({
|
|
32
|
+
* borrower: "BorrowerAddr...", // String address
|
|
33
|
+
* ownerTokenAccount: "TokenAcct...", // String address
|
|
34
|
+
* contract: "ContractAddr..." // String address
|
|
34
35
|
* });
|
|
35
36
|
*
|
|
36
37
|
* // Use mainnet configuration
|
|
37
|
-
* const
|
|
38
|
+
* const instruction = await closeRental(params).set({ programs: 'mainnet' });
|
|
38
39
|
*
|
|
39
40
|
* // Override specific constants
|
|
40
|
-
* const
|
|
41
|
-
*
|
|
41
|
+
* const instruction = await closeRental(params).set({
|
|
42
|
+
* programs: 'mainnet',
|
|
42
43
|
* sageProgramAddress: 'custom...'
|
|
43
44
|
* });
|
|
45
|
+
*
|
|
46
|
+
* // Use the instruction with your preferred Solana library
|
|
47
|
+
* // instruction is compatible with both @solana/kit and @solana/web3.js
|
|
44
48
|
* ```
|
|
45
49
|
*
|
|
46
50
|
* @param params The simplified parameters for closing a rental
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close.js","sourceRoot":"","sources":["../../../src/rental/close.ts"],"names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EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,8BAA8B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cjs/rental/reset.js
CHANGED
|
@@ -11,9 +11,9 @@ const utils_1 = require("../utils");
|
|
|
11
11
|
async function _resetRental(params, config) {
|
|
12
12
|
const { fleet, contract, rentalState, gameId, faction, ownerProfile, } = params;
|
|
13
13
|
// Get the actual game ID to use (param override, config override, or network default)
|
|
14
|
-
const actualGameId = gameId
|
|
14
|
+
const actualGameId = gameId ? (0, constants_1.toAddress)(gameId) : await (0, constants_1.getSageGameId)(config);
|
|
15
15
|
// Derive the three accounts we need
|
|
16
|
-
const { starbase, starbasePlayer } = await (0, utils_1.deriveGameAccounts)(ownerProfile, faction, actualGameId, 0, // starbaseSeqId
|
|
16
|
+
const { starbase, starbasePlayer } = await (0, utils_1.deriveGameAccounts)((0, constants_1.toAddress)(ownerProfile), faction, actualGameId, 0, // starbaseSeqId
|
|
17
17
|
config);
|
|
18
18
|
// Get network-specific codama functions from centralized config
|
|
19
19
|
const instructionsModule = (0, config_1.getModule)('instructions');
|
|
@@ -22,12 +22,12 @@ async function _resetRental(params, config) {
|
|
|
22
22
|
const { SRSLY_PROGRAM_ADDRESS } = programsModule;
|
|
23
23
|
// Let codama derive the rest (rentalAuthority)
|
|
24
24
|
const input = {
|
|
25
|
-
fleet,
|
|
26
|
-
contract,
|
|
27
|
-
rentalState,
|
|
28
|
-
gameId: actualGameId,
|
|
29
|
-
starbase,
|
|
30
|
-
starbasePlayer,
|
|
25
|
+
fleet: (0, constants_1.toAddress)(fleet), // Ensure string
|
|
26
|
+
contract: (0, constants_1.toAddress)(contract), // Ensure string
|
|
27
|
+
rentalState: (0, constants_1.toAddress)(rentalState), // Ensure string
|
|
28
|
+
gameId: actualGameId, // Already string
|
|
29
|
+
starbase, // Already string from deriveGameAccounts
|
|
30
|
+
starbasePlayer, // Already string from deriveGameAccounts
|
|
31
31
|
};
|
|
32
32
|
return getResetRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
|
|
33
33
|
}
|
|
@@ -36,24 +36,27 @@ async function _resetRental(params, config) {
|
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```typescript
|
|
39
|
-
* //
|
|
40
|
-
* const
|
|
41
|
-
* fleet:
|
|
42
|
-
* contract:
|
|
43
|
-
* rentalState:
|
|
39
|
+
* // Works with any library - just use strings for addresses!
|
|
40
|
+
* const instruction = await resetRental({
|
|
41
|
+
* fleet: "FleetAddress123...", // String address
|
|
42
|
+
* contract: "ContractAddr...", // String address
|
|
43
|
+
* rentalState: "RentalStateAddr...", // String address
|
|
44
44
|
* faction: 'mud',
|
|
45
|
-
* ownerProfile:
|
|
45
|
+
* ownerProfile: "OwnerProfileAddr..." // String address
|
|
46
46
|
* });
|
|
47
47
|
*
|
|
48
48
|
* // Use mainnet configuration
|
|
49
|
-
* const
|
|
49
|
+
* const instruction = await resetRental(params).set({ programs: 'mainnet' });
|
|
50
50
|
*
|
|
51
51
|
* // Override specific constants
|
|
52
|
-
* const
|
|
53
|
-
*
|
|
52
|
+
* const instruction = await resetRental(params).set({
|
|
53
|
+
* programs: 'mainnet',
|
|
54
54
|
* gameId: 'custom-game-id...',
|
|
55
55
|
* sageProgramAddress: 'custom...'
|
|
56
56
|
* });
|
|
57
|
+
*
|
|
58
|
+
* // Use the instruction with your preferred Solana library
|
|
59
|
+
* // instruction is compatible with both @solana/kit and @solana/web3.js
|
|
57
60
|
* ```
|
|
58
61
|
*
|
|
59
62
|
* @param params The simplified parameters for resetting a rental
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../src/rental/reset.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../src/rental/reset.ts"],"names":[],"mappings":";;AAmIA,kCAIC;AAED,wEAK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