@cashie/core-lib 1.3.0 → 1.5.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/abi/abi.d.ts +83 -30
- package/dist/backend/contracts/balance.types.d.ts +9 -0
- package/dist/erc-7715/permission/schemas.d.ts +3 -0
- package/dist/erc-7715/request/schemas.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/intent/types.d.ts +24 -9
- package/package.json +8 -6
package/dist/intent/types.d.ts
CHANGED
|
@@ -9,11 +9,16 @@ export declare enum PaymentIntentActions {
|
|
|
9
9
|
}
|
|
10
10
|
export declare enum AccountIntentActions {
|
|
11
11
|
DEACTIVATE_ACCOUNT = "deactivate-account",
|
|
12
|
+
REACTIVATE_ACCOUNT = "reactivate-account",
|
|
12
13
|
RECOVER_ACCOUNT = "recover-account",
|
|
13
14
|
FREEZE_ACCOUNT = "freeze-account"
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The intent actions that are supported by the Cashie protocol.
|
|
18
|
+
*/
|
|
19
|
+
export declare const INTENT_ACTIONS: {
|
|
16
20
|
readonly DEACTIVATE_ACCOUNT: AccountIntentActions.DEACTIVATE_ACCOUNT;
|
|
21
|
+
readonly REACTIVATE_ACCOUNT: AccountIntentActions.REACTIVATE_ACCOUNT;
|
|
17
22
|
readonly RECOVER_ACCOUNT: AccountIntentActions.RECOVER_ACCOUNT;
|
|
18
23
|
readonly FREEZE_ACCOUNT: AccountIntentActions.FREEZE_ACCOUNT;
|
|
19
24
|
readonly PAYMENT_C2B: PaymentIntentActions.PAYMENT_C2B;
|
|
@@ -28,6 +33,9 @@ export type RewardItem = {
|
|
|
28
33
|
rewardAmount: Hex;
|
|
29
34
|
rewardTokenAddress: Address;
|
|
30
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* The reward intent data that contains the reward details.
|
|
38
|
+
*/
|
|
31
39
|
export type RewardData = {
|
|
32
40
|
/**
|
|
33
41
|
* The address of the payer of the reward.
|
|
@@ -46,6 +54,9 @@ export type RewardData = {
|
|
|
46
54
|
*/
|
|
47
55
|
rewardDelegationManager: Address;
|
|
48
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* The payment intent data that contains the payment details.
|
|
59
|
+
*/
|
|
49
60
|
export type PaymentIntentData = {
|
|
50
61
|
/**
|
|
51
62
|
* The address to send payment to.
|
|
@@ -82,22 +93,26 @@ export type PaymentIntentData = {
|
|
|
82
93
|
type BaseAccountData = {
|
|
83
94
|
accountAddress: Address;
|
|
84
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* The mapping of the intent data by action.
|
|
98
|
+
*/
|
|
85
99
|
export type IntentDataMapping = {
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
100
|
+
[INTENT_ACTIONS.PAYMENT_C2B]: PaymentIntentData;
|
|
101
|
+
[INTENT_ACTIONS.PAYMENT_B2B]: PaymentIntentData;
|
|
102
|
+
[INTENT_ACTIONS.PAYMENT_B2C]: PaymentIntentData;
|
|
103
|
+
[INTENT_ACTIONS.DEPOSIT]: PaymentIntentData;
|
|
104
|
+
[INTENT_ACTIONS.WITHDRAW]: PaymentIntentData;
|
|
105
|
+
[INTENT_ACTIONS.DEACTIVATE_ACCOUNT]: BaseAccountData & {
|
|
92
106
|
permissionContexts: Hex[];
|
|
93
107
|
};
|
|
94
|
-
[
|
|
95
|
-
[
|
|
108
|
+
[INTENT_ACTIONS.RECOVER_ACCOUNT]: BaseAccountData;
|
|
109
|
+
[INTENT_ACTIONS.FREEZE_ACCOUNT]: BaseAccountData & {
|
|
96
110
|
/**
|
|
97
111
|
* The timestamp the account will stay frozen until. (unix timestamp in seconds)
|
|
98
112
|
*/
|
|
99
113
|
timestamp: number;
|
|
100
114
|
};
|
|
115
|
+
[INTENT_ACTIONS.REACTIVATE_ACCOUNT]: BaseAccountData;
|
|
101
116
|
};
|
|
102
117
|
/**
|
|
103
118
|
* RPC payload for executing a intent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cashie/core-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A core library for the Cashie Protocol",
|
|
5
5
|
"homepage": "https://github.com/transeptorlabs/cashie-core/blob/main/packages/core-lib/README.md",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"build": "yarn build:esbuild && yarn build:types",
|
|
34
34
|
"build:esbuild": "node ./build-package.mjs",
|
|
35
35
|
"build:types": "tsc --emitDeclarationOnly",
|
|
36
|
-
"build:docs": "typedoc",
|
|
37
36
|
"build:pack": "yarn build && yarn pack --filename ../../deps/cashie-core-lib-0.0.0.tgz",
|
|
38
37
|
"generate:abis": "node ./scripts/generate-abis.mjs",
|
|
39
38
|
"generate:abis:build": "node ./scripts/generate-abis.mjs --build",
|
|
@@ -44,12 +43,15 @@
|
|
|
44
43
|
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies --check",
|
|
45
44
|
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn lint:dependencies",
|
|
46
45
|
"test": "vitest run --config ./vitest.config.ts --coverage",
|
|
47
|
-
"test:watch": "vitest --config ./vitest.config.ts"
|
|
46
|
+
"test:watch": "vitest --config ./vitest.config.ts",
|
|
47
|
+
"run:audit:all": "yarn npm audit --recursive",
|
|
48
|
+
"run:audit": "yarn npm audit",
|
|
49
|
+
"run:audit:ci": "yarn npm audit --recursive --no-deprecations"
|
|
48
50
|
},
|
|
49
51
|
"dependencies": {
|
|
50
52
|
"uuid": "14.0.0",
|
|
51
|
-
"viem": "2.
|
|
52
|
-
"zod": "4.
|
|
53
|
+
"viem": "2.57.19",
|
|
54
|
+
"zod": "4.6.6"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
57
|
"@types/node": "20.10.0",
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"typescript": "5.6.3"
|
|
58
60
|
},
|
|
59
61
|
"engines": {
|
|
60
|
-
"node": ">=22.
|
|
62
|
+
"node": ">=22.23.4"
|
|
61
63
|
},
|
|
62
64
|
"packageManager": "yarn@4.7.0",
|
|
63
65
|
"publishConfig": {
|