ox 0.14.11 → 0.14.13
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/CHANGELOG.md +14 -0
- package/_cjs/erc8021/Attribution.js +7 -1
- package/_cjs/erc8021/Attribution.js.map +1 -1
- package/_cjs/tempo/KeyAuthorization.js +150 -21
- package/_cjs/tempo/KeyAuthorization.js.map +1 -1
- package/_cjs/tempo/Period.js +31 -0
- package/_cjs/tempo/Period.js.map +1 -0
- package/_cjs/tempo/index.js +2 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/erc8021/Attribution.js +7 -1
- package/_esm/erc8021/Attribution.js.map +1 -1
- package/_esm/tempo/KeyAuthorization.js +159 -22
- package/_esm/tempo/KeyAuthorization.js.map +1 -1
- package/_esm/tempo/Period.js +92 -0
- package/_esm/tempo/Period.js.map +1 -0
- package/_esm/tempo/index.js +29 -0
- package/_esm/tempo/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/erc8021/Attribution.d.ts +2 -0
- package/_types/erc8021/Attribution.d.ts.map +1 -1
- package/_types/tempo/KeyAuthorization.d.ts +95 -19
- package/_types/tempo/KeyAuthorization.d.ts.map +1 -1
- package/_types/tempo/Period.d.ts +78 -0
- package/_types/tempo/Period.d.ts.map +1 -0
- package/_types/tempo/index.d.ts +29 -0
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/erc8021/Attribution.ts +12 -1
- package/package.json +6 -1
- package/tempo/KeyAuthorization.test.ts +407 -3
- package/tempo/KeyAuthorization.ts +291 -51
- package/tempo/Period/package.json +6 -0
- package/tempo/Period.test.ts +44 -0
- package/tempo/Period.ts +97 -0
- package/tempo/e2e.test.ts +969 -1
- package/tempo/index.ts +30 -0
- package/version.ts +1 -1
package/tempo/index.ts
CHANGED
|
@@ -77,6 +77,36 @@ export * as AuthorizationTempo from './AuthorizationTempo.js'
|
|
|
77
77
|
*/
|
|
78
78
|
export * as KeyAuthorization from './KeyAuthorization.js'
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Utilities for constructing period durations (in seconds) for recurring spending limits.
|
|
82
|
+
*
|
|
83
|
+
* Periods define the reset interval for access key spending limits. A spending limit with a
|
|
84
|
+
* period will reset every `period` seconds. For example, a daily spending limit uses
|
|
85
|
+
* `Period.days(1)` (86400 seconds).
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts twoslash
|
|
89
|
+
* import { Value } from 'ox'
|
|
90
|
+
* import { KeyAuthorization, Period } from 'ox/tempo'
|
|
91
|
+
*
|
|
92
|
+
* const authorization = KeyAuthorization.from({
|
|
93
|
+
* address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
|
|
94
|
+
* chainId: 4217n,
|
|
95
|
+
* type: 'secp256k1',
|
|
96
|
+
* limits: [{
|
|
97
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
98
|
+
* limit: Value.from('100', 6),
|
|
99
|
+
* period: Period.days(1), // resets daily
|
|
100
|
+
* }],
|
|
101
|
+
* })
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* [Access Keys Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#access-keys)
|
|
105
|
+
*
|
|
106
|
+
* @category Reference
|
|
107
|
+
*/
|
|
108
|
+
export * as Period from './Period.js'
|
|
109
|
+
|
|
80
110
|
/**
|
|
81
111
|
* Pool ID utilities for computing pool identifiers from token pairs.
|
|
82
112
|
*
|
package/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @internal */
|
|
2
|
-
export const version = '0.14.
|
|
2
|
+
export const version = '0.14.13'
|