@t2000/sdk 4.3.1 → 5.0.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/README.md +3 -3
- package/dist/browser.cjs +42 -112
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +43 -102
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +670 -6651
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -541
- package/dist/index.d.ts +29 -541
- package/dist/index.js +673 -6626
- package/dist/index.js.map +1 -1
- package/dist/types-CgZWnHhs.d.cts +1214 -0
- package/dist/types-CgZWnHhs.d.ts +1214 -0
- package/package.json +1 -13
- package/dist/adapters/descriptors.cjs +0 -48
- package/dist/adapters/descriptors.cjs.map +0 -1
- package/dist/adapters/descriptors.d.cts +0 -3
- package/dist/adapters/descriptors.d.ts +0 -3
- package/dist/adapters/descriptors.js +0 -45
- package/dist/adapters/descriptors.js.map +0 -1
- package/dist/adapters/index.cjs +0 -4815
- package/dist/adapters/index.cjs.map +0 -1
- package/dist/adapters/index.d.cts +0 -91
- package/dist/adapters/index.d.ts +0 -91
- package/dist/adapters/index.js +0 -4810
- package/dist/adapters/index.js.map +0 -1
- package/dist/descriptors-DqIb4AnV.d.cts +0 -134
- package/dist/descriptors-DqIb4AnV.d.ts +0 -134
- package/dist/types-CFV4VcJJ.d.cts +0 -667
- package/dist/types-Ch0zVUpC.d.cts +0 -727
- package/dist/types-Ch0zVUpC.d.ts +0 -727
- package/dist/types-DqRLGfOC.d.ts +0 -667
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2000/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "TypeScript SDK for Agent Wallets on Sui — gasless USDC + USDsui transfers, Cetus swap routing, NAVI lending (programmatic), MPP paid API access, zkLogin compatible.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -15,16 +15,6 @@
|
|
|
15
15
|
"./browser": {
|
|
16
16
|
"types": "./dist/browser.d.ts",
|
|
17
17
|
"import": "./dist/browser.js"
|
|
18
|
-
},
|
|
19
|
-
"./adapters": {
|
|
20
|
-
"types": "./dist/adapters/index.d.ts",
|
|
21
|
-
"import": "./dist/adapters/index.js",
|
|
22
|
-
"require": "./dist/adapters/index.cjs"
|
|
23
|
-
},
|
|
24
|
-
"./descriptors": {
|
|
25
|
-
"types": "./dist/adapters/descriptors.d.ts",
|
|
26
|
-
"import": "./dist/adapters/descriptors.js",
|
|
27
|
-
"require": "./dist/adapters/descriptors.cjs"
|
|
28
18
|
}
|
|
29
19
|
},
|
|
30
20
|
"files": [
|
|
@@ -57,8 +47,6 @@
|
|
|
57
47
|
"@mysten/sui": "^2.17.0",
|
|
58
48
|
"@mysten/suins": "^1.1.1",
|
|
59
49
|
"@mysten/zklogin": "^0.8.1",
|
|
60
|
-
"@naviprotocol/lending": "^1.4.0",
|
|
61
|
-
"@pythnetwork/pyth-sui-js": "^2.4.0",
|
|
62
50
|
"@suimpp/mpp": "^0.7.0",
|
|
63
51
|
"bn.js": "^5.2.1",
|
|
64
52
|
"eventemitter3": "^5",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// src/adapters/descriptors.ts
|
|
4
|
-
var naviDescriptor = {
|
|
5
|
-
id: "navi",
|
|
6
|
-
name: "NAVI Protocol",
|
|
7
|
-
packages: [],
|
|
8
|
-
dynamicPackageId: true,
|
|
9
|
-
actionMap: {
|
|
10
|
-
// Deposit variants (entry_deposit / deposit + account-cap form for
|
|
11
|
-
// harvest's internal save leg)
|
|
12
|
-
"incentive_v3::entry_deposit": "save",
|
|
13
|
-
"incentive_v3::deposit": "save",
|
|
14
|
-
"incentive_v3::deposit_with_account_cap": "save",
|
|
15
|
-
// Withdraw variants
|
|
16
|
-
"incentive_v3::withdraw_v2": "withdraw",
|
|
17
|
-
"incentive_v3::entry_withdraw": "withdraw",
|
|
18
|
-
"incentive_v3::withdraw_with_account_cap": "withdraw",
|
|
19
|
-
"incentive_v3::withdraw_with_account_cap_v": "withdraw",
|
|
20
|
-
"incentive_v3::withdraw": "withdraw",
|
|
21
|
-
"incentive_v3::withdraw_v": "withdraw",
|
|
22
|
-
// Borrow variants
|
|
23
|
-
"incentive_v3::borrow_v2": "borrow",
|
|
24
|
-
"incentive_v3::entry_borrow": "borrow",
|
|
25
|
-
"incentive_v3::borrow": "borrow",
|
|
26
|
-
"incentive_v3::borrow_v": "borrow",
|
|
27
|
-
"incentive_v3::borrow_with_account_cap": "borrow",
|
|
28
|
-
"incentive_v3::borrow_with_account_cap_v": "borrow",
|
|
29
|
-
// Repay variants
|
|
30
|
-
"incentive_v3::entry_repay": "repay",
|
|
31
|
-
"incentive_v3::repay": "repay",
|
|
32
|
-
"incentive_v3::repay_with_account_cap": "repay",
|
|
33
|
-
// Claim-reward variants — required for `claim_rewards` tagging AND for
|
|
34
|
-
// `harvest` compound-op detection in the indexer (paired with a save
|
|
35
|
-
// target, classified as `harvest` instead of `claim`).
|
|
36
|
-
"incentive_v3::claim_reward": "claim",
|
|
37
|
-
"incentive_v3::claim_reward_entry": "claim",
|
|
38
|
-
"incentive_v3::claim_reward_with_account_cap": "claim"
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var allDescriptors = [
|
|
42
|
-
naviDescriptor
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
exports.allDescriptors = allDescriptors;
|
|
46
|
-
exports.naviDescriptor = naviDescriptor;
|
|
47
|
-
//# sourceMappingURL=descriptors.cjs.map
|
|
48
|
-
//# sourceMappingURL=descriptors.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adapters/descriptors.ts"],"names":[],"mappings":";;;AAIO,IAAM,cAAA,GAAqC;AAAA,EAChD,EAAA,EAAI,MAAA;AAAA,EACJ,IAAA,EAAM,eAAA;AAAA,EACN,UAAU,EAAC;AAAA,EACX,gBAAA,EAAkB,IAAA;AAAA,EAClB,SAAA,EAAW;AAAA;AAAA;AAAA,IAGT,6BAAA,EAA+B,MAAA;AAAA,IAC/B,uBAAA,EAAyB,MAAA;AAAA,IACzB,wCAAA,EAA0C,MAAA;AAAA;AAAA,IAE1C,2BAAA,EAA6B,UAAA;AAAA,IAC7B,8BAAA,EAAgC,UAAA;AAAA,IAChC,yCAAA,EAA2C,UAAA;AAAA,IAC3C,2CAAA,EAA6C,UAAA;AAAA,IAC7C,wBAAA,EAA0B,UAAA;AAAA,IAC1B,0BAAA,EAA4B,UAAA;AAAA;AAAA,IAE5B,yBAAA,EAA2B,QAAA;AAAA,IAC3B,4BAAA,EAA8B,QAAA;AAAA,IAC9B,sBAAA,EAAwB,QAAA;AAAA,IACxB,wBAAA,EAA0B,QAAA;AAAA,IAC1B,uCAAA,EAAyC,QAAA;AAAA,IACzC,yCAAA,EAA2C,QAAA;AAAA;AAAA,IAE3C,2BAAA,EAA6B,OAAA;AAAA,IAC7B,qBAAA,EAAuB,OAAA;AAAA,IACvB,sCAAA,EAAwC,OAAA;AAAA;AAAA;AAAA;AAAA,IAIxC,4BAAA,EAA8B,OAAA;AAAA,IAC9B,kCAAA,EAAoC,OAAA;AAAA,IACpC,6CAAA,EAA+C;AAAA;AAEnD;AAEO,IAAM,cAAA,GAAuC;AAAA,EAClD;AACF","file":"descriptors.cjs","sourcesContent":["import type { ProtocolDescriptor } from './types.js';\n\nexport type { ProtocolDescriptor } from './types.js';\n\nexport const naviDescriptor: ProtocolDescriptor = {\n id: 'navi',\n name: 'NAVI Protocol',\n packages: [],\n dynamicPackageId: true,\n actionMap: {\n // Deposit variants (entry_deposit / deposit + account-cap form for\n // harvest's internal save leg)\n 'incentive_v3::entry_deposit': 'save',\n 'incentive_v3::deposit': 'save',\n 'incentive_v3::deposit_with_account_cap': 'save',\n // Withdraw variants\n 'incentive_v3::withdraw_v2': 'withdraw',\n 'incentive_v3::entry_withdraw': 'withdraw',\n 'incentive_v3::withdraw_with_account_cap': 'withdraw',\n 'incentive_v3::withdraw_with_account_cap_v': 'withdraw',\n 'incentive_v3::withdraw': 'withdraw',\n 'incentive_v3::withdraw_v': 'withdraw',\n // Borrow variants\n 'incentive_v3::borrow_v2': 'borrow',\n 'incentive_v3::entry_borrow': 'borrow',\n 'incentive_v3::borrow': 'borrow',\n 'incentive_v3::borrow_v': 'borrow',\n 'incentive_v3::borrow_with_account_cap': 'borrow',\n 'incentive_v3::borrow_with_account_cap_v': 'borrow',\n // Repay variants\n 'incentive_v3::entry_repay': 'repay',\n 'incentive_v3::repay': 'repay',\n 'incentive_v3::repay_with_account_cap': 'repay',\n // Claim-reward variants — required for `claim_rewards` tagging AND for\n // `harvest` compound-op detection in the indexer (paired with a save\n // target, classified as `harvest` instead of `claim`).\n 'incentive_v3::claim_reward': 'claim',\n 'incentive_v3::claim_reward_entry': 'claim',\n 'incentive_v3::claim_reward_with_account_cap': 'claim',\n },\n};\n\nexport const allDescriptors: ProtocolDescriptor[] = [\n naviDescriptor,\n];\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// src/adapters/descriptors.ts
|
|
2
|
-
var naviDescriptor = {
|
|
3
|
-
id: "navi",
|
|
4
|
-
name: "NAVI Protocol",
|
|
5
|
-
packages: [],
|
|
6
|
-
dynamicPackageId: true,
|
|
7
|
-
actionMap: {
|
|
8
|
-
// Deposit variants (entry_deposit / deposit + account-cap form for
|
|
9
|
-
// harvest's internal save leg)
|
|
10
|
-
"incentive_v3::entry_deposit": "save",
|
|
11
|
-
"incentive_v3::deposit": "save",
|
|
12
|
-
"incentive_v3::deposit_with_account_cap": "save",
|
|
13
|
-
// Withdraw variants
|
|
14
|
-
"incentive_v3::withdraw_v2": "withdraw",
|
|
15
|
-
"incentive_v3::entry_withdraw": "withdraw",
|
|
16
|
-
"incentive_v3::withdraw_with_account_cap": "withdraw",
|
|
17
|
-
"incentive_v3::withdraw_with_account_cap_v": "withdraw",
|
|
18
|
-
"incentive_v3::withdraw": "withdraw",
|
|
19
|
-
"incentive_v3::withdraw_v": "withdraw",
|
|
20
|
-
// Borrow variants
|
|
21
|
-
"incentive_v3::borrow_v2": "borrow",
|
|
22
|
-
"incentive_v3::entry_borrow": "borrow",
|
|
23
|
-
"incentive_v3::borrow": "borrow",
|
|
24
|
-
"incentive_v3::borrow_v": "borrow",
|
|
25
|
-
"incentive_v3::borrow_with_account_cap": "borrow",
|
|
26
|
-
"incentive_v3::borrow_with_account_cap_v": "borrow",
|
|
27
|
-
// Repay variants
|
|
28
|
-
"incentive_v3::entry_repay": "repay",
|
|
29
|
-
"incentive_v3::repay": "repay",
|
|
30
|
-
"incentive_v3::repay_with_account_cap": "repay",
|
|
31
|
-
// Claim-reward variants — required for `claim_rewards` tagging AND for
|
|
32
|
-
// `harvest` compound-op detection in the indexer (paired with a save
|
|
33
|
-
// target, classified as `harvest` instead of `claim`).
|
|
34
|
-
"incentive_v3::claim_reward": "claim",
|
|
35
|
-
"incentive_v3::claim_reward_entry": "claim",
|
|
36
|
-
"incentive_v3::claim_reward_with_account_cap": "claim"
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
var allDescriptors = [
|
|
40
|
-
naviDescriptor
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
export { allDescriptors, naviDescriptor };
|
|
44
|
-
//# sourceMappingURL=descriptors.js.map
|
|
45
|
-
//# sourceMappingURL=descriptors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adapters/descriptors.ts"],"names":[],"mappings":";AAIO,IAAM,cAAA,GAAqC;AAAA,EAChD,EAAA,EAAI,MAAA;AAAA,EACJ,IAAA,EAAM,eAAA;AAAA,EACN,UAAU,EAAC;AAAA,EACX,gBAAA,EAAkB,IAAA;AAAA,EAClB,SAAA,EAAW;AAAA;AAAA;AAAA,IAGT,6BAAA,EAA+B,MAAA;AAAA,IAC/B,uBAAA,EAAyB,MAAA;AAAA,IACzB,wCAAA,EAA0C,MAAA;AAAA;AAAA,IAE1C,2BAAA,EAA6B,UAAA;AAAA,IAC7B,8BAAA,EAAgC,UAAA;AAAA,IAChC,yCAAA,EAA2C,UAAA;AAAA,IAC3C,2CAAA,EAA6C,UAAA;AAAA,IAC7C,wBAAA,EAA0B,UAAA;AAAA,IAC1B,0BAAA,EAA4B,UAAA;AAAA;AAAA,IAE5B,yBAAA,EAA2B,QAAA;AAAA,IAC3B,4BAAA,EAA8B,QAAA;AAAA,IAC9B,sBAAA,EAAwB,QAAA;AAAA,IACxB,wBAAA,EAA0B,QAAA;AAAA,IAC1B,uCAAA,EAAyC,QAAA;AAAA,IACzC,yCAAA,EAA2C,QAAA;AAAA;AAAA,IAE3C,2BAAA,EAA6B,OAAA;AAAA,IAC7B,qBAAA,EAAuB,OAAA;AAAA,IACvB,sCAAA,EAAwC,OAAA;AAAA;AAAA;AAAA;AAAA,IAIxC,4BAAA,EAA8B,OAAA;AAAA,IAC9B,kCAAA,EAAoC,OAAA;AAAA,IACpC,6CAAA,EAA+C;AAAA;AAEnD;AAEO,IAAM,cAAA,GAAuC;AAAA,EAClD;AACF","file":"descriptors.js","sourcesContent":["import type { ProtocolDescriptor } from './types.js';\n\nexport type { ProtocolDescriptor } from './types.js';\n\nexport const naviDescriptor: ProtocolDescriptor = {\n id: 'navi',\n name: 'NAVI Protocol',\n packages: [],\n dynamicPackageId: true,\n actionMap: {\n // Deposit variants (entry_deposit / deposit + account-cap form for\n // harvest's internal save leg)\n 'incentive_v3::entry_deposit': 'save',\n 'incentive_v3::deposit': 'save',\n 'incentive_v3::deposit_with_account_cap': 'save',\n // Withdraw variants\n 'incentive_v3::withdraw_v2': 'withdraw',\n 'incentive_v3::entry_withdraw': 'withdraw',\n 'incentive_v3::withdraw_with_account_cap': 'withdraw',\n 'incentive_v3::withdraw_with_account_cap_v': 'withdraw',\n 'incentive_v3::withdraw': 'withdraw',\n 'incentive_v3::withdraw_v': 'withdraw',\n // Borrow variants\n 'incentive_v3::borrow_v2': 'borrow',\n 'incentive_v3::entry_borrow': 'borrow',\n 'incentive_v3::borrow': 'borrow',\n 'incentive_v3::borrow_v': 'borrow',\n 'incentive_v3::borrow_with_account_cap': 'borrow',\n 'incentive_v3::borrow_with_account_cap_v': 'borrow',\n // Repay variants\n 'incentive_v3::entry_repay': 'repay',\n 'incentive_v3::repay': 'repay',\n 'incentive_v3::repay_with_account_cap': 'repay',\n // Claim-reward variants — required for `claim_rewards` tagging AND for\n // `harvest` compound-op detection in the indexer (paired with a save\n // target, classified as `harvest` instead of `claim`).\n 'incentive_v3::claim_reward': 'claim',\n 'incentive_v3::claim_reward_entry': 'claim',\n 'incentive_v3::claim_reward_with_account_cap': 'claim',\n },\n};\n\nexport const allDescriptors: ProtocolDescriptor[] = [\n naviDescriptor,\n];\n"]}
|