@nightlylabs/dex-sdk 0.0.100 → 0.0.101
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.cjs +19 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +19 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1551,6 +1551,25 @@ var Client = class _Client {
|
|
|
1551
1551
|
apiKey
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
|
+
async createUserPayload(params) {
|
|
1555
|
+
const apiKey = generateApiKey();
|
|
1556
|
+
const payload = await (0, import_ts_sdk2.generateTransactionPayload)({
|
|
1557
|
+
aptosConfig: this._aptos.config,
|
|
1558
|
+
abi: parseEntryFunctionAbi({
|
|
1559
|
+
moduleAbi: createUser_default,
|
|
1560
|
+
functionName: createUser_default.name,
|
|
1561
|
+
moduleAddress: createUser_default.address,
|
|
1562
|
+
moduleName: createUser_default.name
|
|
1563
|
+
}),
|
|
1564
|
+
function: `${createUser_default.address}::${createUser_default.name}::create_user`,
|
|
1565
|
+
typeArguments: [],
|
|
1566
|
+
functionArguments: [params.name, params.referralCode]
|
|
1567
|
+
});
|
|
1568
|
+
return {
|
|
1569
|
+
payload,
|
|
1570
|
+
apiKey
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1554
1573
|
async addApiKey(params) {
|
|
1555
1574
|
return await (0, import_ts_sdk2.generateTransactionPayload)({
|
|
1556
1575
|
aptosConfig: this._aptos.config,
|
package/dist/index.d.cts
CHANGED
|
@@ -1264,6 +1264,10 @@ declare class Client {
|
|
|
1264
1264
|
signature: AccountAuthenticator;
|
|
1265
1265
|
apiKey: _aptos_labs_ts_sdk.Ed25519Account;
|
|
1266
1266
|
}>;
|
|
1267
|
+
createUserPayload(params: CreateUserParams): Promise<{
|
|
1268
|
+
payload: _aptos_labs_ts_sdk.TransactionPayloadEntryFunction;
|
|
1269
|
+
apiKey: _aptos_labs_ts_sdk.Ed25519Account;
|
|
1270
|
+
}>;
|
|
1267
1271
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1268
1272
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1269
1273
|
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1264,6 +1264,10 @@ declare class Client {
|
|
|
1264
1264
|
signature: AccountAuthenticator;
|
|
1265
1265
|
apiKey: _aptos_labs_ts_sdk.Ed25519Account;
|
|
1266
1266
|
}>;
|
|
1267
|
+
createUserPayload(params: CreateUserParams): Promise<{
|
|
1268
|
+
payload: _aptos_labs_ts_sdk.TransactionPayloadEntryFunction;
|
|
1269
|
+
apiKey: _aptos_labs_ts_sdk.Ed25519Account;
|
|
1270
|
+
}>;
|
|
1267
1271
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1268
1272
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1269
1273
|
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
package/dist/index.js
CHANGED
|
@@ -1501,6 +1501,25 @@ var Client = class _Client {
|
|
|
1501
1501
|
apiKey
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
+
async createUserPayload(params) {
|
|
1505
|
+
const apiKey = generateApiKey();
|
|
1506
|
+
const payload = await generateTransactionPayload({
|
|
1507
|
+
aptosConfig: this._aptos.config,
|
|
1508
|
+
abi: parseEntryFunctionAbi({
|
|
1509
|
+
moduleAbi: createUser_default,
|
|
1510
|
+
functionName: createUser_default.name,
|
|
1511
|
+
moduleAddress: createUser_default.address,
|
|
1512
|
+
moduleName: createUser_default.name
|
|
1513
|
+
}),
|
|
1514
|
+
function: `${createUser_default.address}::${createUser_default.name}::create_user`,
|
|
1515
|
+
typeArguments: [],
|
|
1516
|
+
functionArguments: [params.name, params.referralCode]
|
|
1517
|
+
});
|
|
1518
|
+
return {
|
|
1519
|
+
payload,
|
|
1520
|
+
apiKey
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1504
1523
|
async addApiKey(params) {
|
|
1505
1524
|
return await generateTransactionPayload({
|
|
1506
1525
|
aptosConfig: this._aptos.config,
|