@otim/sdk-core 0.0.19 → 0.0.20
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/.tsbuildinfo +1 -1
- package/dist/account/index.d.cts +1 -1
- package/dist/account/index.d.mts +1 -1
- package/dist/authorization-BnF84ABo.d.cts.map +1 -1
- package/dist/clients/index.cjs +1 -1
- package/dist/clients/index.d.cts +3 -3
- package/dist/clients/index.d.mts +3 -3
- package/dist/clients/index.mjs +1 -1
- package/dist/{clients-Dkt56jVn.mjs → clients-BpUkaSb-.mjs} +3 -3
- package/dist/clients-BpUkaSb-.mjs.map +1 -0
- package/dist/{clients-CAKAVAKd.cjs → clients-jegPyhCH.cjs} +2 -2
- package/dist/clients-jegPyhCH.cjs.map +1 -0
- package/dist/{index-D6ncjdSF.d.mts → index-BRCDIv2-.d.mts} +2 -2
- package/dist/{index-D6ncjdSF.d.mts.map → index-BRCDIv2-.d.mts.map} +1 -1
- package/dist/{index-Dclw8n-r.d.cts → index-BmrWgMvx.d.cts} +2 -2
- package/dist/{index-CT89rCH1.d.mts.map → index-BmrWgMvx.d.cts.map} +1 -1
- package/dist/{index-CT89rCH1.d.mts → index-nalKWiJB.d.mts} +2 -2
- package/dist/{index-Dclw8n-r.d.cts.map → index-nalKWiJB.d.mts.map} +1 -1
- package/dist/{index-_2bU9FSx.d.cts → index-tt-bw0Dh.d.cts} +2 -2
- package/dist/{index-_2bU9FSx.d.cts.map → index-tt-bw0Dh.d.cts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{rpc-C-51kawS.d.cts → rpc-B2EqDraY.d.cts} +13 -3
- package/dist/rpc-B2EqDraY.d.cts.map +1 -0
- package/dist/{rpc-BWDaWzVn.d.mts → rpc-CMGNtfHM.d.mts} +13 -3
- package/dist/rpc-CMGNtfHM.d.mts.map +1 -0
- package/dist/signing/index.d.cts +2 -2
- package/dist/signing/index.d.mts +2 -2
- package/package.json +4 -4
- package/dist/clients-CAKAVAKd.cjs.map +0 -1
- package/dist/clients-Dkt56jVn.mjs.map +0 -1
- package/dist/rpc-BWDaWzVn.d.mts.map +0 -1
- package/dist/rpc-C-51kawS.d.cts.map +0 -1
package/dist/account/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../abi-C34qVuOe.cjs";
|
|
2
|
-
import { a as Chain } from "../rpc-
|
|
2
|
+
import { a as Chain } from "../rpc-B2EqDraY.cjs";
|
|
3
3
|
import "../authorization-BnF84ABo.cjs";
|
|
4
4
|
import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "../index-DcGsW5Uz.cjs";
|
|
5
5
|
export { AccountConfig, AccountType, ApiAccountConfig, Chain, OtimAccount, OtimAccountSignMessageArgs, PrivateKeyAccountConfig, ServerAccountConfig, ServerAccountType, createClientContext, isApiAccountConfig, isPrivateKeyAccountConfig };
|
package/dist/account/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../abi-DJLWbdqc.mjs";
|
|
2
|
-
import { a as Chain } from "../rpc-
|
|
2
|
+
import { a as Chain } from "../rpc-CMGNtfHM.mjs";
|
|
3
3
|
import "../authorization-C5pDhI13.mjs";
|
|
4
4
|
import { a as AccountType, c as OtimAccountSignMessageArgs, d as ServerAccountType, i as AccountConfig, l as PrivateKeyAccountConfig, n as isApiAccountConfig, o as ApiAccountConfig, r as isPrivateKeyAccountConfig, s as OtimAccount, t as createClientContext, u as ServerAccountConfig } from "../index-CChHQZDA.mjs";
|
|
5
5
|
export { AccountConfig, AccountType, ApiAccountConfig, Chain, OtimAccount, OtimAccountSignMessageArgs, PrivateKeyAccountConfig, ServerAccountConfig, ServerAccountType, createClientContext, isApiAccountConfig, isPrivateKeyAccountConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-BnF84ABo.d.cts","names":["symbol","Branded","T","U","Filter","P","Acc","F","Rest","IsNarrowable","IsNever","Mutable","type","key","Or","Head","Tail","IsUndefined","MaybePromise","Promise","MaybeRequired","required","ExactRequired","Assign","Assign_","K","NoInfer","NoUndefined","Omit","keys","Exclude","Pick","PartialBy","ExactPartial","Prettify","Evaluate","RequiredBy","Some","array","value","rest","ValueOf","UnionToTuple","union","last","LastInUnion","UnionToIntersection","l","i","IsUnion","union2","MaybePartial","enabled","OneOf","fallback","KeyofUnion","item","LooseOmit","UnionEvaluate","UnionLooseOmit","UnionOmit","UnionPick","UnionPartialBy","UnionRequiredBy","OneOf","ByteArray","Uint8Array","Hex","Hash","LogTopic","SignableMessage","SignatureLegacy","bigintType","Signature","numberType","CompactSignature","Address","Hex","Signature","ExactPartial","OneOf","Authorization","uint32","signed","AuthorizationList","AuthorizationRequest","SignedAuthorization","SignedAuthorizationList","SerializedAuthorization","SerializedAuthorizationList"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/utils.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/misc.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/authorization.d.ts"],"sourcesContent":["declare const symbol: unique symbol;\n/**\n * Creates a branded type of {@link T} with the brand {@link U}.\n *\n * @param T - Type to brand\n * @param U - Label\n * @returns Branded type\n *\n * @example\n * type Result = Branded<string, 'foo'>\n * // ^? type Result = string & { [symbol]: 'foo' }\n */\nexport type Branded<T, U> = T & {\n [symbol]: U;\n};\n/**\n * Filters out all members of {@link T} that are not {@link P}\n *\n * @param T - Items to filter\n * @param P - Type to filter out\n * @returns Filtered items\n *\n * @example\n * type Result = Filter<['a', 'b', 'c'], 'b'>\n * // ^? type Result = ['a', 'c']\n */\nexport type Filter<T extends readonly unknown[], P, Acc extends readonly unknown[] = []> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]] ? [F] extends [P] ? Filter<Rest, P, [...Acc, F]> : Filter<Rest, P, Acc> : readonly [...Acc];\n/**\n * @description Checks if {@link T} can be narrowed further than {@link U}\n * @param T - Type to check\n * @param U - Type to against\n * @example\n * type Result = IsNarrowable<'foo', string>\n * // ^? true\n */\nexport type IsNarrowable<T, U> = IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true;\n/**\n * @description Checks if {@link T} is `never`\n * @param T - Type to check\n * @example\n * type Result = IsNever<never>\n * // ^? type Result = true\n */\nexport type IsNever<T> = [T] extends [never] ? true : false;\n/** Removes `readonly` from all properties of an object. */\nexport type Mutable<type extends object> = {\n -readonly [key in keyof type]: type[key];\n};\n/**\n * @description Evaluates boolean \"or\" condition for {@link T} properties.\n * @param T - Type to check\n *\n * * @example\n * type Result = Or<[false, true, false]>\n * // ^? type Result = true\n *\n * @example\n * type Result = Or<[false, false, false]>\n * // ^? type Result = false\n */\nexport type Or<T extends readonly unknown[]> = T extends readonly [\n infer Head,\n ...infer Tail\n] ? Head extends true ? true : Or<Tail> : false;\n/**\n * @description Checks if {@link T} is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\nexport type MaybePromise<T> = T | Promise<T>;\n/**\n * @description Makes attributes on the type T required if required is true.\n *\n * @example\n * MaybeRequired<{ a: string, b?: number }, true>\n * => { a: string, b: number }\n *\n * MaybeRequired<{ a: string, b?: number }, false>\n * => { a: string, b?: number }\n */\nexport type MaybeRequired<T, required extends boolean> = required extends true ? ExactRequired<T> : T;\n/**\n * @description Assigns the properties of U onto T.\n *\n * @example\n * Assign<{ a: string, b: number }, { a: undefined, c: boolean }>\n * => { a: undefined, b: number, c: boolean }\n */\nexport type Assign<T, U> = Assign_<T, U> & U;\ntype Assign_<T, U> = {\n [K in keyof T as K extends keyof U ? U[K] extends void ? never : K : K]: K extends keyof U ? U[K] : T[K];\n};\nexport type NoInfer<type> = [type][type extends any ? 0 : never];\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n *\n * @internal\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n/** Strict version of built-in Omit type */\nexport type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number }, 'a'>\n * => { a?: string, b: number }\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & ExactPartial<Pick<T, K>>;\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/** @internal */\nexport type Evaluate<type> = {\n [key in keyof type]: type[key];\n} & {};\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number }, 'a'>\n * => { a: string, b: number }\n */\nexport type RequiredBy<T, K extends keyof T> = Omit<T, K> & ExactRequired<Pick<T, K>>;\n/**\n * @description Returns truthy if `array` contains `value`.\n *\n * @example\n * Some<[1, 2, 3], 2>\n * => true\n */\nexport type Some<array extends readonly unknown[], value> = array extends readonly [value, ...unknown[]] ? true : array extends readonly [unknown, ...infer rest] ? Some<rest, value> : false;\n/**\n * @description Creates a type that extracts the values of T.\n *\n * @example\n * ValueOf<{ a: string, b: number }>\n * => string | number\n *\n * @internal\n */\nexport type ValueOf<T> = T[keyof T];\nexport type UnionToTuple<union, last = LastInUnion<union>> = [union] extends [never] ? [] : [...UnionToTuple<Exclude<union, last>>, last];\ntype LastInUnion<U> = UnionToIntersection<U extends unknown ? (x: U) => 0 : never> extends (x: infer l) => 0 ? l : never;\ntype UnionToIntersection<union> = (union extends unknown ? (arg: union) => 0 : never) extends (arg: infer i) => 0 ? i : never;\nexport type IsUnion<union, union2 = union> = union extends union2 ? ([union2] extends [union] ? false : true) : never;\nexport type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Prettify<ExactPartial<type>> : type;\nexport type ExactPartial<type> = {\n [key in keyof type]?: type[key] | undefined;\n};\nexport type ExactRequired<type> = {\n [P in keyof type]-?: Exclude<type[P], undefined>;\n};\nexport type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Prettify<item & {\n [key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined;\n}> : never;\ntype KeyofUnion<type> = type extends type ? keyof type : never;\n/**\n * Loose version of {@link Omit}\n * @internal\n */\nexport type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;\nexport type UnionEvaluate<type> = type extends object ? Prettify<type> : type;\nexport type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never;\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never;\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionPick<type, keys extends keyof type> = type extends any ? Pick<type, keys> : never;\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { a?: string, b: number } | { a?: string, b: undefined, c: number }\n */\nexport type UnionPartialBy<T, K extends keyof T> = T extends any ? PartialBy<T, K> : never;\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'>\n * => { a: string, b: number } | { a: string, c?: number }\n */\nexport type UnionRequiredBy<T, K extends keyof T> = T extends any ? RequiredBy<T, K> : never;\nexport {};\n//# sourceMappingURL=utils.d.ts.map","import type { OneOf } from './utils.js';\nexport type ByteArray = Uint8Array;\nexport type Hex = `0x${string}`;\nexport type Hash = `0x${string}`;\nexport type LogTopic = Hex | Hex[] | null;\nexport type SignableMessage = string | {\n /** Raw data representation of the message. */\n raw: Hex | ByteArray;\n};\nexport type SignatureLegacy<bigintType = bigint> = {\n r: Hex;\n s: Hex;\n v: bigintType;\n};\nexport type Signature<numberType = number, bigintType = bigint> = OneOf<SignatureLegacy | {\n r: Hex;\n s: Hex;\n /** @deprecated use `yParity`. */\n v: bigintType;\n yParity?: numberType | undefined;\n} | {\n r: Hex;\n s: Hex;\n /** @deprecated use `yParity`. */\n v?: bigintType | undefined;\n yParity: numberType;\n}>;\nexport type CompactSignature = {\n r: Hex;\n yParityAndS: Hex;\n};\n//# sourceMappingURL=misc.d.ts.map","import type { Address } from 'abitype';\nimport type { Hex, Signature } from './misc.js';\nimport type { ExactPartial, OneOf } from './utils.js';\nexport type Authorization<uint32 = number, signed extends boolean = false> = {\n /** Address of the contract to delegate to. */\n address: Address;\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n} & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);\nexport type AuthorizationList<uint32 = number, signed extends boolean = false> = readonly Authorization<uint32, signed>[];\nexport type AuthorizationRequest<uint32 = number> = OneOf<{\n /** Address of the contract to delegate to. */\n address: Address;\n} | {\n /**\n * Address of the contract to delegate to.\n * @alias `address`\n */\n contractAddress: Address;\n}> & {\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n};\nexport type SignedAuthorization<uint32 = number> = Authorization<uint32, true>;\nexport type SignedAuthorizationList<uint32 = number> = readonly SignedAuthorization<uint32>[];\nexport type SerializedAuthorization = readonly [\n chainId: Hex,\n address: Hex,\n nonce: Hex,\n yParity: Hex,\n r: Hex,\n s: Hex\n];\nexport type SerializedAuthorizationList = readonly SerializedAuthorization[];\n//# sourceMappingURL=authorization.d.ts.map"],"x_google_ignoreList":[0,1,2],"mappings":";;;cAAcA;;;;AAYd;;;;;AAcA;;;AAAiLK,KAdrKJ,OAcqKI,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAdrJH,CAcqJG,GAAAA;EAAYG,CAbxLR,MAAAA,CAawLQ,EAb/KL,CAa+KK;CAAMH;;;;;;;;;;AASnM;;AAAoDF,KATxCC,MASwCD,CAAAA,UAAAA,SAAAA,OAAAA,EAAAA,EAAAA,GAAAA,EAAAA,YAAAA,SAAAA,OAAAA,EAAAA,GAAAA,EAAAA,CAAAA,GATuCD,CASvCC,SAAAA,SAAAA,CAAAA,KAAAA,EAAAA,EAAAA,GAAAA,KAAAA,cAAAA,SAAAA,OAAAA,EAAAA,CAAAA,GAAAA,CATiHI,CASjHJ,CAAAA,SAAAA,CAT6HE,GAS7HF,CAAAA,GATkIC,MASlID,CATyIK,IASzIL,EAT+IE,GAS/IF,EAAAA,CAAAA,GATsJG,GAStJH,EAT2JI,CAS3JJ,CAAAA,CAAAA,GATiKC,MASjKD,CATwKK,IASxKL,EAT8KE,GAS9KF,EATiLG,GASjLH,CAAAA,GAAAA,SAAAA,CAAAA,GATqMG,GASrMH,CAAAA;;;;;AAQpD;AA4BA;AACA;;AAA0CD,KArC9BO,YAqC8BP,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GArCTQ,O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CAAAA,EAAAA;AAAYF,KEdrKgF,oBFcqKhF,CAAAA,SAAAA,MAAAA,CAAAA,GEd7H2E,KFc6H3E,CAAAA;EAAYG;EAAMH,OAAAA,EEZtLuE,OFYsLvE;CAAOC,GAAAA;EAAKC;;;;EAAsBD,eAAAA,EENhNsE,OFMgNtE;CAAhBF,CAAAA,GAAAA;EAAoCE;EAAG,OAAA,EEH/O4E,MFG+O;EAShPzE;EAA8BP,KAAAA,EEV/BgF,MFU+BhF;CAAUC;AAAqBA,KER7DmF,mBFQ6DnF,CAAAA,SAAAA,MAAAA,CAAAA,GERtB8E,aFQsB9E,CERR+E,MFQQ/E,EAAAA,IAAAA,CAAAA;AAAUD,KEPvEqF,uBFOuErF,CAAAA,SAAAA,MAAAA,CAAAA,GAAAA,SEPnBoF,mBFOmBpF,CEPCgF,MFODhF,CAAAA,EAAAA"}
|
|
1
|
+
{"version":3,"file":"authorization-BnF84ABo.d.cts","names":["symbol","Branded","T","U","Filter","P","Acc","F","Rest","IsNarrowable","IsNever","Mutable","type","key","Or","Head","Tail","IsUndefined","MaybePromise","Promise","MaybeRequired","required","ExactRequired","Assign","Assign_","K","NoInfer","NoUndefined","Omit","keys","Exclude","Pick","PartialBy","ExactPartial","Prettify","Evaluate","RequiredBy","Some","array","value","rest","ValueOf","UnionToTuple","union","last","LastInUnion","UnionToIntersection","l","i","IsUnion","union2","MaybePartial","enabled","OneOf","fallback","KeyofUnion","item","LooseOmit","UnionEvaluate","UnionLooseOmit","UnionOmit","UnionPick","UnionPartialBy","UnionRequiredBy","OneOf","ByteArray","Uint8Array","Hex","Hash","LogTopic","SignableMessage","SignatureLegacy","bigintType","Signature","numberType","CompactSignature","Address","Hex","Signature","ExactPartial","OneOf","Authorization","uint32","signed","AuthorizationList","AuthorizationRequest","SignedAuthorization","SignedAuthorizationList","SerializedAuthorization","SerializedAuthorizationList"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/utils.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/misc.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/types/authorization.d.ts"],"sourcesContent":["declare const symbol: unique symbol;\n/**\n * Creates a branded type of {@link T} with the brand {@link U}.\n *\n * @param T - Type to brand\n * @param U - Label\n * @returns Branded type\n *\n * @example\n * type Result = Branded<string, 'foo'>\n * // ^? type Result = string & { [symbol]: 'foo' }\n */\nexport type Branded<T, U> = T & {\n [symbol]: U;\n};\n/**\n * Filters out all members of {@link T} that are not {@link P}\n *\n * @param T - Items to filter\n * @param P - Type to filter out\n * @returns Filtered items\n *\n * @example\n * type Result = Filter<['a', 'b', 'c'], 'b'>\n * // ^? type Result = ['a', 'c']\n */\nexport type Filter<T extends readonly unknown[], P, Acc extends readonly unknown[] = []> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]] ? [F] extends [P] ? Filter<Rest, P, [...Acc, F]> : Filter<Rest, P, Acc> : readonly [...Acc];\n/**\n * @description Checks if {@link T} can be narrowed further than {@link U}\n * @param T - Type to check\n * @param U - Type to against\n * @example\n * type Result = IsNarrowable<'foo', string>\n * // ^? true\n */\nexport type IsNarrowable<T, U> = IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true;\n/**\n * @description Checks if {@link T} is `never`\n * @param T - Type to check\n * @example\n * type Result = IsNever<never>\n * // ^? type Result = true\n */\nexport type IsNever<T> = [T] extends [never] ? true : false;\n/** Removes `readonly` from all properties of an object. */\nexport type Mutable<type extends object> = {\n -readonly [key in keyof type]: type[key];\n};\n/**\n * @description Evaluates boolean \"or\" condition for {@link T} properties.\n * @param T - Type to check\n *\n * * @example\n * type Result = Or<[false, true, false]>\n * // ^? type Result = true\n *\n * @example\n * type Result = Or<[false, false, false]>\n * // ^? type Result = false\n */\nexport type Or<T extends readonly unknown[]> = T extends readonly [\n infer Head,\n ...infer Tail\n] ? Head extends true ? true : Or<Tail> : false;\n/**\n * @description Checks if {@link T} is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\nexport type MaybePromise<T> = T | Promise<T>;\n/**\n * @description Makes attributes on the type T required if required is true.\n *\n * @example\n * MaybeRequired<{ a: string, b?: number }, true>\n * => { a: string, b: number }\n *\n * MaybeRequired<{ a: string, b?: number }, false>\n * => { a: string, b?: number }\n */\nexport type MaybeRequired<T, required extends boolean> = required extends true ? ExactRequired<T> : T;\n/**\n * @description Assigns the properties of U onto T.\n *\n * @example\n * Assign<{ a: string, b: number }, { a: undefined, c: boolean }>\n * => { a: undefined, b: number, c: boolean }\n */\nexport type Assign<T, U> = Assign_<T, U> & U;\ntype Assign_<T, U> = {\n [K in keyof T as K extends keyof U ? U[K] extends void ? never : K : K]: K extends keyof U ? U[K] : T[K];\n};\nexport type NoInfer<type> = [type][type extends any ? 0 : never];\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n *\n * @internal\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n/** Strict version of built-in Omit type */\nexport type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number }, 'a'>\n * => { a?: string, b: number }\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & ExactPartial<Pick<T, K>>;\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n/** @internal */\nexport type Evaluate<type> = {\n [key in keyof type]: type[key];\n} & {};\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number }, 'a'>\n * => { a: string, b: number }\n */\nexport type RequiredBy<T, K extends keyof T> = Omit<T, K> & ExactRequired<Pick<T, K>>;\n/**\n * @description Returns truthy if `array` contains `value`.\n *\n * @example\n * Some<[1, 2, 3], 2>\n * => true\n */\nexport type Some<array extends readonly unknown[], value> = array extends readonly [value, ...unknown[]] ? true : array extends readonly [unknown, ...infer rest] ? Some<rest, value> : false;\n/**\n * @description Creates a type that extracts the values of T.\n *\n * @example\n * ValueOf<{ a: string, b: number }>\n * => string | number\n *\n * @internal\n */\nexport type ValueOf<T> = T[keyof T];\nexport type UnionToTuple<union, last = LastInUnion<union>> = [union] extends [never] ? [] : [...UnionToTuple<Exclude<union, last>>, last];\ntype LastInUnion<U> = UnionToIntersection<U extends unknown ? (x: U) => 0 : never> extends (x: infer l) => 0 ? l : never;\ntype UnionToIntersection<union> = (union extends unknown ? (arg: union) => 0 : never) extends (arg: infer i) => 0 ? i : never;\nexport type IsUnion<union, union2 = union> = union extends union2 ? ([union2] extends [union] ? false : true) : never;\nexport type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Prettify<ExactPartial<type>> : type;\nexport type ExactPartial<type> = {\n [key in keyof type]?: type[key] | undefined;\n};\nexport type ExactRequired<type> = {\n [P in keyof type]-?: Exclude<type[P], undefined>;\n};\nexport type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Prettify<item & {\n [key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined;\n}> : never;\ntype KeyofUnion<type> = type extends type ? keyof type : never;\n/**\n * Loose version of {@link Omit}\n * @internal\n */\nexport type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;\nexport type UnionEvaluate<type> = type extends object ? Prettify<type> : type;\nexport type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never;\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never;\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionPick<type, keys extends keyof type> = type extends any ? Pick<type, keys> : never;\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { a?: string, b: number } | { a?: string, b: undefined, c: number }\n */\nexport type UnionPartialBy<T, K extends keyof T> = T extends any ? PartialBy<T, K> : never;\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'>\n * => { a: string, b: number } | { a: string, c?: number }\n */\nexport type UnionRequiredBy<T, K extends keyof T> = T extends any ? RequiredBy<T, K> : never;\nexport {};\n//# sourceMappingURL=utils.d.ts.map","import type { OneOf } from './utils.js';\nexport type ByteArray = Uint8Array;\nexport type Hex = `0x${string}`;\nexport type Hash = `0x${string}`;\nexport type LogTopic = Hex | Hex[] | null;\nexport type SignableMessage = string | {\n /** Raw data representation of the message. */\n raw: Hex | ByteArray;\n};\nexport type SignatureLegacy<bigintType = bigint> = {\n r: Hex;\n s: Hex;\n v: bigintType;\n};\nexport type Signature<numberType = number, bigintType = bigint> = OneOf<SignatureLegacy | {\n r: Hex;\n s: Hex;\n /** @deprecated use `yParity`. */\n v: bigintType;\n yParity?: numberType | undefined;\n} | {\n r: Hex;\n s: Hex;\n /** @deprecated use `yParity`. */\n v?: bigintType | undefined;\n yParity: numberType;\n}>;\nexport type CompactSignature = {\n r: Hex;\n yParityAndS: Hex;\n};\n//# sourceMappingURL=misc.d.ts.map","import type { Address } from 'abitype';\nimport type { Hex, Signature } from './misc.js';\nimport type { ExactPartial, OneOf } from './utils.js';\nexport type Authorization<uint32 = number, signed extends boolean = false> = {\n /** Address of the contract to delegate to. */\n address: Address;\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n} & (signed extends true ? Signature<uint32> : ExactPartial<Signature<uint32>>);\nexport type AuthorizationList<uint32 = number, signed extends boolean = false> = readonly Authorization<uint32, signed>[];\nexport type AuthorizationRequest<uint32 = number> = OneOf<{\n /** Address of the contract to delegate to. */\n address: Address;\n} | {\n /**\n * Address of the contract to delegate to.\n * @alias `address`\n */\n contractAddress: Address;\n}> & {\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n};\nexport type SignedAuthorization<uint32 = number> = Authorization<uint32, true>;\nexport type SignedAuthorizationList<uint32 = number> = readonly SignedAuthorization<uint32>[];\nexport type SerializedAuthorization = readonly [\n chainId: Hex,\n address: Hex,\n nonce: Hex,\n yParity: Hex,\n r: Hex,\n s: Hex\n];\nexport type SerializedAuthorizationList = readonly SerializedAuthorization[];\n//# sourceMappingURL=authorization.d.ts.map"],"x_google_ignoreList":[0,1,2],"mappings":";;;cAAcA;;;;AAYd;;;;;AAcA;;;AAAiLK,KAdrKJ,OAcqKI,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAdrJH,CAcqJG,GAAAA;EAAYG,CAbxLR,MAAAA,CAawLQ,EAb/KL,CAa+KK;CAAMH;;;;;;;;;;AASnM;;AAAoDF,KATxCC,MASwCD,CAAAA,UAAAA,SAAAA,OAAAA,EAAAA,EAAAA,GAAAA,EAAAA,YAAAA,SAAAA,OAAAA,EAAAA,GAAAA,EAAAA,CAAAA,GATuCD,C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import "../index-
|
|
5
|
-
import { C as ActivityClient, S as LoginOptions, _ as CreateSettlementResponse, a as prepareVaultMigrateSettlement, b as ConfigClient, c as prepareVaultDepositSettlement, d as BuildSettlementRequest, f as OrchestrationParams, g as CreateRawConfig, h as prepareSettlement, i as VaultMigrateParams, l as PrepareVaultWithdrawSettlementParams, m as SettlementParams, n as createSettlementSigner, o as PrepareVaultDepositSettlementParams, p as PrepareSettlementParams, r as PrepareVaultMigrateSettlementParams, s as SettlementVaultDepositParams, t as CreateSettlementSignerParams, u as prepareVaultWithdrawSettlement, v as OrchestrationClient, x as AuthClient, y as DelegationClient } from "../index-
|
|
4
|
+
import "../index-tt-bw0Dh.cjs";
|
|
5
|
+
import { C as ActivityClient, S as LoginOptions, _ as CreateSettlementResponse, a as prepareVaultMigrateSettlement, b as ConfigClient, c as prepareVaultDepositSettlement, d as BuildSettlementRequest, f as OrchestrationParams, g as CreateRawConfig, h as prepareSettlement, i as VaultMigrateParams, l as PrepareVaultWithdrawSettlementParams, m as SettlementParams, n as createSettlementSigner, o as PrepareVaultDepositSettlementParams, p as PrepareSettlementParams, r as PrepareVaultMigrateSettlementParams, s as SettlementVaultDepositParams, t as CreateSettlementSignerParams, u as prepareVaultWithdrawSettlement, v as OrchestrationClient, x as AuthClient, y as DelegationClient } from "../index-BmrWgMvx.cjs";
|
|
6
6
|
import "../index-CUbzbOtB.cjs";
|
|
7
7
|
export { ActivityClient, AuthClient, BuildSettlementRequest, ConfigClient, CreateRawConfig, CreateSettlementResponse, CreateSettlementSignerParams, DelegationClient, LoginOptions, OrchestrationClient, OrchestrationParams, PrepareSettlementParams, PrepareVaultDepositSettlementParams, PrepareVaultMigrateSettlementParams, PrepareVaultWithdrawSettlementParams, SettlementParams, SettlementVaultDepositParams, VaultMigrateParams, createSettlementSigner, prepareSettlement, prepareVaultDepositSettlement, prepareVaultMigrateSettlement, prepareVaultWithdrawSettlement };
|
package/dist/clients/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../abi-DJLWbdqc.mjs";
|
|
2
|
-
import "../rpc-
|
|
2
|
+
import "../rpc-CMGNtfHM.mjs";
|
|
3
3
|
import "../authorization-C5pDhI13.mjs";
|
|
4
|
-
import "../index-
|
|
5
|
-
import { C as ActivityClient, S as LoginOptions, _ as CreateSettlementResponse, a as prepareVaultMigrateSettlement, b as ConfigClient, c as prepareVaultDepositSettlement, d as BuildSettlementRequest, f as OrchestrationParams, g as CreateRawConfig, h as prepareSettlement, i as VaultMigrateParams, l as PrepareVaultWithdrawSettlementParams, m as SettlementParams, n as createSettlementSigner, o as PrepareVaultDepositSettlementParams, p as PrepareSettlementParams, r as PrepareVaultMigrateSettlementParams, s as SettlementVaultDepositParams, t as CreateSettlementSignerParams, u as prepareVaultWithdrawSettlement, v as OrchestrationClient, x as AuthClient, y as DelegationClient } from "../index-
|
|
4
|
+
import "../index-BRCDIv2-.mjs";
|
|
5
|
+
import { C as ActivityClient, S as LoginOptions, _ as CreateSettlementResponse, a as prepareVaultMigrateSettlement, b as ConfigClient, c as prepareVaultDepositSettlement, d as BuildSettlementRequest, f as OrchestrationParams, g as CreateRawConfig, h as prepareSettlement, i as VaultMigrateParams, l as PrepareVaultWithdrawSettlementParams, m as SettlementParams, n as createSettlementSigner, o as PrepareVaultDepositSettlementParams, p as PrepareSettlementParams, r as PrepareVaultMigrateSettlementParams, s as SettlementVaultDepositParams, t as CreateSettlementSignerParams, u as prepareVaultWithdrawSettlement, v as OrchestrationClient, x as AuthClient, y as DelegationClient } from "../index-nalKWiJB.mjs";
|
|
6
6
|
import "../index-Bii-p3Pv.mjs";
|
|
7
7
|
export { ActivityClient, AuthClient, BuildSettlementRequest, ConfigClient, CreateRawConfig, CreateSettlementResponse, CreateSettlementSignerParams, DelegationClient, LoginOptions, OrchestrationClient, OrchestrationParams, PrepareSettlementParams, PrepareVaultDepositSettlementParams, PrepareVaultMigrateSettlementParams, PrepareVaultWithdrawSettlementParams, SettlementParams, SettlementVaultDepositParams, VaultMigrateParams, createSettlementSigner, prepareSettlement, prepareVaultDepositSettlement, prepareVaultMigrateSettlement, prepareVaultWithdrawSettlement };
|
package/dist/clients/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../account-DTvmNvta.mjs";
|
|
2
|
-
import { a as OrchestrationClient, c as ConfigClient, i as prepareSettlement, l as AuthClient, n as prepareVaultDepositSettlement, o as createSettlementSigner, r as prepareVaultWithdrawSettlement, s as DelegationClient, t as prepareVaultMigrateSettlement, u as ActivityClient } from "../clients-
|
|
2
|
+
import { a as OrchestrationClient, c as ConfigClient, i as prepareSettlement, l as AuthClient, n as prepareVaultDepositSettlement, o as createSettlementSigner, r as prepareVaultWithdrawSettlement, s as DelegationClient, t as prepareVaultMigrateSettlement, u as ActivityClient } from "../clients-BpUkaSb-.mjs";
|
|
3
3
|
import "../signing-BGCR53df.mjs";
|
|
4
4
|
|
|
5
5
|
export { ActivityClient, AuthClient, ConfigClient, DelegationClient, OrchestrationClient, createSettlementSigner, prepareSettlement, prepareVaultDepositSettlement, prepareVaultMigrateSettlement, prepareVaultWithdrawSettlement };
|
|
@@ -3,7 +3,7 @@ import { c as ApiKeyClientSigningService, o as ServerWalletSigningService, t as
|
|
|
3
3
|
import { parseSignatureToVRS, validateIso8601Date } from "@otim/utils/helpers";
|
|
4
4
|
import { createLoginSiweMessage } from "@otim/sdk-core/config";
|
|
5
5
|
import { assertRequiresAuth, assertServerContext } from "@otim/sdk-core/context";
|
|
6
|
-
import { getChainById } from "@otim/utils/chains";
|
|
6
|
+
import { getChainById, getChainTransport } from "@otim/utils/chains";
|
|
7
7
|
import { addActionNamesToInstructions, buildPaymentMetadata, extractActionNamesMap } from "@otim/utils/payments";
|
|
8
8
|
import { hexStringSchema } from "@otim/utils/schemas";
|
|
9
9
|
import { createPublicClient, createWalletClient, http, toHex } from "viem";
|
|
@@ -167,7 +167,7 @@ var OrchestrationClient = class {
|
|
|
167
167
|
if (!chain) throw new Error(`Chain with id ${chainId} not found`);
|
|
168
168
|
return createPublicClient({
|
|
169
169
|
chain,
|
|
170
|
-
transport:
|
|
170
|
+
transport: getChainTransport(chain.id)
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
async fetchDelegateAddresses(instructions) {
|
|
@@ -466,4 +466,4 @@ function prepareVaultMigrateSettlement(params) {
|
|
|
466
466
|
|
|
467
467
|
//#endregion
|
|
468
468
|
export { OrchestrationClient as a, ConfigClient as c, prepareSettlement as i, AuthClient as l, prepareVaultDepositSettlement as n, createSettlementSigner as o, prepareVaultWithdrawSettlement as r, DelegationClient as s, prepareVaultMigrateSettlement as t, ActivityClient as u };
|
|
469
|
-
//# sourceMappingURL=clients-
|
|
469
|
+
//# sourceMappingURL=clients-BpUkaSb-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clients-BpUkaSb-.mjs","names":["apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","apiClient: APIClient","apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimServerClientContext","getDefaultDueDate","buildMetadataFromParams","convertAcceptedTokensToStringKeys","result: Record<string, Address[]>","getDefaultDueDate","buildMetadataFromParams","getDefaultDueDate","buildMetadataFromParams","result: Record<string, Address[]>"],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/settlement-signer.ts","../src/clients/orchestration.ts","../src/clients/helpers/prepare-settlement.ts","../src/clients/helpers/prepare-vault-withdraw-settlement.ts","../src/clients/helpers/prepare-vault-deposit-settlement.ts","../src/clients/helpers/prepare-vault-migrate-settlement.ts"],"sourcesContent":["import type {\n APIClient,\n GetInstructionActivityRequest,\n GetInstructionActivityResponse,\n} from \"@otim/utils/api\";\n\nexport class ActivityClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getInstructionActivity(\n request: GetInstructionActivityRequest,\n ): Promise<GetInstructionActivityResponse> {\n const response =\n await this.apiClient.activity.getInstructionActivity(request);\n\n return response.data;\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient, AuthLoginResponse, MeResponse } from \"@otim/utils/api\";\nimport type { Address } from \"viem\";\n\nimport { parseSignatureToVRS } from \"@otim/utils/helpers\";\n\nimport { createLoginSiweMessage } from \"@otim/sdk-core/config\";\nimport { assertRequiresAuth } from \"@otim/sdk-core/context\";\n\nexport interface LoginOptions {\n address: Address;\n}\n\nexport class AuthClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async login({ address }: LoginOptions): Promise<AuthLoginResponse> {\n assertRequiresAuth(this.context);\n\n const message = createLoginSiweMessage(address, Date.now().toString());\n const signature = await this.account.signMessage({ message });\n const vrsParsedSignature = parseSignatureToVRS(signature);\n\n const response = await this.apiClient.auth.login({\n siwe: message,\n signature: vrsParsedSignature,\n });\n\n return response.data;\n }\n\n async getCurrentUser(): Promise<MeResponse> {\n const response = await this.apiClient.auth.me();\n return response.data;\n }\n}\n","import type {\n APIClient,\n GetMaxPriorityFeePerGasEstimateRequest,\n GetMaxPriorityFeePerGasEstimateResponse,\n} from \"@otim/utils/api\";\n\nexport class ConfigClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getMaxPriorityFeeEstimate({\n chainId,\n }: GetMaxPriorityFeePerGasEstimateRequest): Promise<GetMaxPriorityFeePerGasEstimateResponse> {\n const response =\n await this.apiClient.config.getMaxPriorityFeePerGasEstimate({ chainId });\n\n return response.data;\n }\n}\n","import type {\n APIClient,\n DelegationCreateRequest,\n DelegationStatusRequest,\n DelegationStatusResponse,\n GetDelegateAddressRequest,\n GetDelegateAddressResponse,\n} from \"@otim/utils/api\";\n\nexport class DelegationClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getDelegateAddress({\n chainId,\n }: GetDelegateAddressRequest): Promise<GetDelegateAddressResponse> {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n\n return response.data;\n }\n\n async getDelegationStatus(\n options: DelegationStatusRequest,\n ): Promise<DelegationStatusResponse> {\n const response = await this.apiClient.account.getDelegationStatus({\n address: options.address,\n chainId: options.chainId,\n });\n\n return response.data;\n }\n\n async createDelegation(\n delegationRequest: DelegationCreateRequest,\n ): Promise<void> {\n await this.apiClient.account.createDelegation(delegationRequest);\n }\n}\n","import type { OtimServerClientContext } from \"../../context\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport { createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nimport { isApiAccountConfig } from \"../../account\";\nimport {\n ApiKeyClientSigningService,\n ServerWalletSigningService,\n UnifiedPaymentSigner,\n} from \"../../signing\";\n\nexport interface CreateSettlementSignerParams {\n context: OtimServerClientContext;\n buildResponse: PaymentResponseWithActionNames;\n publicClient: PublicClient;\n delegateAddressMap: Map<number, Address>;\n}\n\ntype CreateSettlementSignerResult = Awaited<\n ReturnType<UnifiedPaymentSigner[\"signAll\"]>\n>;\n\nexport async function createSettlementSigner(\n params: CreateSettlementSignerParams,\n): Promise<CreateSettlementSignerResult> {\n const { context, buildResponse, publicClient, delegateAddressMap } = params;\n\n if (isApiAccountConfig(context.config)) {\n const signingService = new ApiKeyClientSigningService(\n context.config.publicKey,\n context.config.privateKey,\n );\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n }\n\n const account = privateKeyToAccount(context.config.privateKey);\n const walletClient = createWalletClient({\n account,\n transport: http(),\n });\n\n const signingService =\n ServerWalletSigningService.fromViemWallet(walletClient);\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimServerClientContext } from \"@otim/sdk-core/context\";\nimport type {\n APIClient,\n BuildSettlementRequest,\n GetPaymentRequestsRequest,\n GetPaymentRequestsResponse,\n PaginatedServiceResponse,\n PaymentRequestBuildRequest,\n PaymentRequestDetailsRequest,\n PaymentRequestDetailsResponse,\n ServiceResponse,\n} from \"@otim/utils/api\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { Chain, PublicClient, Transport } from \"viem\";\n\nimport { getChainTransport } from \"@otim/utils/chains\";\nimport { getChainById } from \"@otim/utils/chains\";\nimport {\n addActionNamesToInstructions,\n extractActionNamesMap,\n} from \"@otim/utils/payments\";\nimport { hexStringSchema } from \"@otim/utils/schemas\";\nimport { createPublicClient } from \"viem\";\n\nimport { assertServerContext } from \"@otim/sdk-core/context\";\n\nimport { createSettlementSigner } from \"./helpers/settlement-signer\";\n\nexport interface CreateSettlementResponse {\n requestId: string;\n ephemeralWalletAddress: Address;\n}\n\nexport interface CreateRawConfig {\n settlementChainId: number;\n activate?: boolean;\n}\n\ntype SettlementInstruction =\n PaymentResponseWithActionNames[\"completionInstructions\"][number];\n\n/**\n * Extracts the settlement chain ID from a BuildSettlementRequest.\n * Handles all settlement types: regular, vault deposit, and vault withdraw.\n */\nfunction extractSettlementChainId(request: BuildSettlementRequest): number {\n const { params } = request;\n\n if (\"settlement\" in params) {\n return params.settlement.settlementChainId;\n }\n\n if (\"settlementVaultDeposit\" in params) {\n return params.settlementVaultDeposit.vaultChainId;\n }\n\n if (\"vaultWithdrawSettlement\" in params) {\n return params.vaultWithdrawSettlement.settlementChainId;\n }\n\n if (\"vaultMigrate\" in params) {\n return params.vaultMigrate.destVaultChainId;\n }\n\n throw new Error(\"Unknown settlement type\");\n}\n\nexport class OrchestrationClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimServerClientContext,\n ) {}\n\n async create(\n settlementRequest: BuildSettlementRequest,\n ): Promise<CreateSettlementResponse> {\n assertServerContext(this.context);\n\n const response =\n await this.apiClient.payments.buildSettlementOrchestration(\n settlementRequest,\n );\n const buildResponse = response.data;\n\n const settlementChainId = extractSettlementChainId(settlementRequest);\n\n await this.activate(buildResponse, settlementChainId);\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async createRaw(\n payload: PaymentRequestBuildRequest,\n config: CreateRawConfig,\n ): Promise<CreateSettlementResponse | PaymentResponseWithActionNames> {\n assertServerContext(this.context);\n\n const { settlementChainId, activate = true } = config;\n const buildResponse = await this.buildAndEnhanceSettlement(payload);\n\n if (!activate) {\n return buildResponse;\n }\n\n await this.activate(buildResponse, settlementChainId);\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async getDetails(\n request: PaymentRequestDetailsRequest,\n ): Promise<ServiceResponse<PaymentRequestDetailsResponse>> {\n return this.apiClient.payments.getPaymentRequestDetails(request);\n }\n\n async list(\n request: GetPaymentRequestsRequest,\n ): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>> {\n return this.apiClient.payments.getPaymentRequests(request);\n }\n\n private async activate(\n buildResponse: PaymentResponseWithActionNames,\n settlementChainId: number,\n ): Promise<void> {\n const publicClient = this.createPublicClient(settlementChainId);\n\n const instructions = [\n ...buildResponse.completionInstructions,\n ...buildResponse.instructions,\n ];\n\n const delegateAddressMap = await this.fetchDelegateAddresses(instructions);\n\n const {\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n } = await createSettlementSigner({\n context: this.context,\n buildResponse,\n publicClient,\n delegateAddressMap,\n });\n\n await this.apiClient.payments.newPaymentRequest({\n requestId: buildResponse.requestId,\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n });\n }\n\n private async buildAndEnhanceSettlement(\n payload: PaymentRequestBuildRequest,\n ): Promise<PaymentResponseWithActionNames> {\n const actionNames = extractActionNamesMap(\n payload.completionInstructions,\n payload.instructions,\n );\n\n const response = await this.apiClient.payments.buildPaymentRequest(payload);\n\n return addActionNamesToInstructions(response.data, actionNames);\n }\n\n private createPublicClient(chainId: number): PublicClient {\n const chain = getChainById(chainId);\n if (!chain) {\n throw new Error(`Chain with id ${chainId} not found`);\n }\n\n return createPublicClient({\n chain: chain as Chain,\n transport: getChainTransport(chain.id) as Transport,\n });\n }\n\n private async fetchDelegateAddresses(\n instructions: SettlementInstruction[],\n ): Promise<Map<number, Address>> {\n const chainIds = Array.from(\n new Set(instructions.map((instruction) => instruction.chainId)),\n );\n\n const addresses = await Promise.all(\n chainIds.map(async (chainId) => {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n const address = hexStringSchema.parse(\n response.data.otimDelegateAddress,\n );\n return [chainId, address] as const;\n }),\n );\n\n return new Map(addresses);\n }\n}\n","import type {\n BuildSettlementRequest,\n OrchestrationParams,\n SettlementParams,\n VaultWithdrawSettlementParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nexport type {\n BuildSettlementRequest,\n OrchestrationParams,\n SettlementParams,\n VaultWithdrawSettlementParams,\n};\n\nexport interface PrepareSettlementParams {\n amount: bigint;\n chainId: SupportedChainId;\n recipient: Address;\n token: Address;\n acceptedTokens: Record<number, Address[]>;\n payer?: Nullable<Address>;\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n maxRuns?: number;\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Converts acceptedTokens from Record<number, Address[]> to Record<string,\n * Address[]> as required by the API schema.\n */\nfunction convertAcceptedTokensToStringKeys(\n acceptedTokens: Record<number, Address[]>,\n): Record<string, Address[]> {\n const result: Record<string, Address[]> = {};\n for (const [chainId, tokens] of Object.entries(acceptedTokens)) {\n result[String(chainId)] = tokens;\n }\n return result;\n}\n\nexport function prepareSettlement(\n params: PrepareSettlementParams,\n): BuildSettlementRequest {\n const {\n chainId,\n token,\n acceptedTokens,\n recipient,\n amount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount,\n recipient,\n token,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n settlement: {\n acceptedTokens: convertAcceptedTokensToStringKeys(acceptedTokens),\n settlementChainId: chainId,\n settlementToken: token,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n settlementAmount: toHex(amount),\n recipientAddress: recipient,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n VaultWithdrawSettlementParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { VaultWithdrawSettlementParams };\n\nexport interface PrepareVaultWithdrawSettlementParams {\n vaultAddress: Address;\n vaultChainId: SupportedChainId;\n settlementChainId: SupportedChainId;\n settlementToken: Address;\n recipientAddress: Address;\n withdrawAmount: bigint;\n payer?: Nullable<Address>;\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\nexport function prepareVaultWithdrawSettlement(\n params: PrepareVaultWithdrawSettlementParams,\n): BuildSettlementRequest {\n const {\n vaultAddress,\n vaultChainId,\n settlementChainId,\n settlementToken,\n recipientAddress,\n withdrawAmount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: withdrawAmount,\n recipient: recipientAddress,\n token: settlementToken,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n vaultWithdrawSettlement: {\n vaultAddress,\n vaultChainId,\n settlementChainId,\n settlementToken,\n recipientAddress,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n withdrawAmount: toHex(withdrawAmount),\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n SettlementVaultDepositParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { SettlementVaultDepositParams };\n\nexport interface PrepareVaultDepositSettlementParams {\n /** Map of chain IDs to accepted token addresses for payment */\n acceptedTokens: Record<number, Address[]>;\n /** Chain ID where the vault is deployed */\n vaultChainId: SupportedChainId;\n /** ERC4626 vault address to deposit into */\n vaultAddress: Address;\n /** Optional: the underlying token of the vault (used only for metadata, not sent to API) */\n vaultUnderlyingToken?: Address;\n /** Amount to deposit in the vault's underlying token units */\n depositAmount: bigint;\n /** Address that will receive the vault shares */\n recipientAddress: Address;\n /** Optional payer address */\n payer?: Nullable<Address>;\n /** Optional due date in ISO 8601 format */\n dueDate?: string;\n /** Optional custom metadata */\n metadata?: PaymentRequestMetadata;\n /** Optional note for the settlement */\n note?: string;\n /** Optional maximum number of execution runs */\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Converts acceptedTokens from Record<number, Address[]> to Record<string,\n * Address[]> as required by the API schema.\n */\nfunction convertAcceptedTokensToStringKeys(\n acceptedTokens: Record<number, Address[]>,\n): Record<string, Address[]> {\n const result: Record<string, Address[]> = {};\n for (const [chainId, tokens] of Object.entries(acceptedTokens)) {\n result[String(chainId)] = tokens;\n }\n return result;\n}\n\n/**\n * Prepares a vault deposit settlement request.\n *\n * This creates a settlement that deposits funds into an ERC4626 vault.\n * Funds can be collected from multiple chains (via acceptedTokens) and\n * deposited into the vault on the specified chain.\n *\n * @param params - The vault deposit settlement parameters\n * @returns A BuildSettlementRequest ready to be sent to the API\n */\nexport function prepareVaultDepositSettlement(\n params: PrepareVaultDepositSettlementParams,\n): BuildSettlementRequest {\n const {\n acceptedTokens,\n vaultChainId,\n vaultAddress,\n vaultUnderlyingToken,\n depositAmount,\n recipientAddress,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: depositAmount,\n recipient: recipientAddress,\n token: vaultUnderlyingToken ?? vaultAddress,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n settlementVaultDeposit: {\n acceptedTokens: convertAcceptedTokensToStringKeys(acceptedTokens),\n vaultChainId,\n vaultAddress,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n depositAmount: toHex(depositAmount),\n recipientAddress,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n VaultMigrateParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { VaultMigrateParams };\n\nexport interface PrepareVaultMigrateSettlementParams {\n /** Source vault address to withdraw from */\n sourceVaultAddress: Address;\n /** Optional: the underlying token of the source vault (used only for metadata, not sent to API) */\n sourceVaultUnderlyingToken?: Address;\n /** Chain ID where the source vault is deployed */\n sourceVaultChainId: SupportedChainId;\n /** Amount to withdraw from the source vault in underlying token units */\n withdrawAmount: bigint;\n /** Destination vault address to deposit into */\n destVaultAddress: Address;\n /** Optional: the underlying token of the destination vault (used only for metadata, not sent to API) */\n destVaultUnderlyingToken?: Address;\n /** Chain ID where the destination vault is deployed */\n destVaultChainId: SupportedChainId;\n /** Address that will receive the destination vault shares */\n recipientAddress: Address;\n /** Optional payer address */\n payer?: Nullable<Address>;\n /** Optional due date in ISO 8601 format */\n dueDate?: string;\n /** Optional custom metadata */\n metadata?: PaymentRequestMetadata;\n /** Optional note for the settlement */\n note?: string;\n /** Optional maximum number of execution runs */\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Prepares a vault migrate settlement request.\n *\n * This creates a settlement that migrates funds between two ERC4626 vaults.\n * Funds are withdrawn from the source vault and deposited into the destination\n * vault, which can be on the same chain or a different chain (cross-chain migration).\n *\n * @param params - The vault migrate settlement parameters\n * @returns A BuildSettlementRequest ready to be sent to the API\n */\nexport function prepareVaultMigrateSettlement(\n params: PrepareVaultMigrateSettlementParams,\n): BuildSettlementRequest {\n const {\n sourceVaultAddress,\n sourceVaultChainId,\n withdrawAmount,\n destVaultAddress,\n destVaultUnderlyingToken,\n destVaultChainId,\n recipientAddress,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: withdrawAmount,\n recipient: recipientAddress,\n token: destVaultUnderlyingToken ?? destVaultAddress,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n vaultMigrate: {\n sourceVaultAddress,\n sourceVaultChainId,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n withdrawAmount: toHex(withdrawAmount),\n destVaultAddress,\n destVaultChainId,\n recipientAddress,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAa,iBAAb,MAA4B;CAC1B,YAAY,AAAiBA,WAAsB;EAAtB;;CAE7B,MAAM,uBACJ,SACyC;AAIzC,UAFE,MAAM,KAAK,UAAU,SAAS,uBAAuB,QAAQ,EAE/C;;;;;;ACDpB,IAAa,aAAb,MAAwB;CACtB,YACE,AAAiBC,WACjB,AAAiBC,SACjB,AAAiBC,SACjB;EAHiB;EACA;EACA;;CAGnB,MAAM,MAAM,EAAE,WAAqD;AACjE,qBAAmB,KAAK,QAAQ;EAEhC,MAAM,UAAU,uBAAuB,SAAS,KAAK,KAAK,CAAC,UAAU,CAAC;EAEtE,MAAM,qBAAqB,oBADT,MAAM,KAAK,QAAQ,YAAY,EAAE,SAAS,CAAC,CACJ;AAOzD,UALiB,MAAM,KAAK,UAAU,KAAK,MAAM;GAC/C,MAAM;GACN,WAAW;GACZ,CAAC,EAEc;;CAGlB,MAAM,iBAAsC;AAE1C,UADiB,MAAM,KAAK,UAAU,KAAK,IAAI,EAC/B;;;;;;AChCpB,IAAa,eAAb,MAA0B;CACxB,YAAY,AAAiBC,WAAsB;EAAtB;;CAE7B,MAAM,0BAA0B,EAC9B,WAC2F;AAI3F,UAFE,MAAM,KAAK,UAAU,OAAO,gCAAgC,EAAE,SAAS,CAAC,EAE1D;;;;;;ACNpB,IAAa,mBAAb,MAA8B;CAC5B,YAAY,AAAiBC,WAAsB;EAAtB;;CAE7B,MAAM,mBAAmB,EACvB,WACiE;AAKjE,UAJiB,MAAM,KAAK,UAAU,OAAO,m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OAAO,mBACtD;CAcF,MAAM,oBAAoB;EACxB,GAVmB,qBAAqB;GACxC,aAAa;GACb,aAJkB,OAAO,OAAO,GAAG;GAKnC,oBAAoB;GACpB;GACA,OAAO;IAAE,MAAM;IAAI,SAAS,SAAS;IAAW;GAChD,SAAS,WAAW,mBAAmB;GACxC,CAAC;EAIA;EACA,QAAQ;EACR,MAAM;EACP;AAED,QAAO,iBACH;EAAE,GAAG;EAAmB,GAAG;EAAgB,GAC3C;;;;;;;;;;;;AAaN,SAAgB,8BACd,QACwB;CACxB,MAAM,EACJ,oBACA,oBACA,gBACA,kBACA,0BACA,kBACA,kBACA,OACA,MACA,SACA,UAAU,gBACV,YACE;AAEJ,KAAI,QACF,qBAAoB,QAAQ;CAG9B,MAAM,WAAW,wBAAwB;EACvC,QAAQ;EACR,WAAW;EACX,OAAO,4BAA4B;EACnC;EACA;EACA,OAAO,SAAS;EAChB;EACD,CAAC;AAEF,QAAO;EACL,QAAQ,EACN,cAAc;GACZ;GACA;GAEA,gBAAgB,MAAM,eAAe;GACrC;GACA;GACA;GACD,EACF;EACD,cAAc,SAAS;EACvB;EACA,SAAS,WAAW;EACpB,SAAS,WAAW;EACrB"}
|
|
@@ -167,7 +167,7 @@ var OrchestrationClient = class {
|
|
|
167
167
|
if (!chain) throw new Error(`Chain with id ${chainId} not found`);
|
|
168
168
|
return (0, viem.createPublicClient)({
|
|
169
169
|
chain,
|
|
170
|
-
transport: (0,
|
|
170
|
+
transport: (0, __otim_utils_chains.getChainTransport)(chain.id)
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
async fetchDelegateAddresses(instructions) {
|
|
@@ -525,4 +525,4 @@ Object.defineProperty(exports, 'prepareVaultWithdrawSettlement', {
|
|
|
525
525
|
return prepareVaultWithdrawSettlement;
|
|
526
526
|
}
|
|
527
527
|
});
|
|
528
|
-
//# sourceMappingURL=clients-
|
|
528
|
+
//# sourceMappingURL=clients-jegPyhCH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clients-jegPyhCH.cjs","names":["apiClient: APIClient","apiClient: APIClient","account: OtimAccount","context: OtimClientContext","apiClient: APIClient","apiClient: APIClient","isApiAccountConfig","UnifiedPaymentSigner","ApiKeyClientSigningService","ServerWalletSigningService","apiClient: APIClient","account: OtimAccount","context: OtimServerClientContext","hexStringSchema","getDefaultDueDate","buildMetadataFromParams","convertAcceptedTokensToStringKeys","result: Record<string, Address[]>","getDefaultDueDate","buildMetadataFromParams","getDefaultDueDate","buildMetadataFromParams","result: Record<string, Address[]>"],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/helpers/settlement-signer.ts","../src/clients/orchestration.ts","../src/clients/helpers/prepare-settlement.ts","../src/clients/helpers/prepare-vault-withdraw-settlement.ts","../src/clients/helpers/prepare-vault-deposit-settlement.ts","../src/clients/helpers/prepare-vault-migrate-settlement.ts"],"sourcesContent":["import type {\n APIClient,\n GetInstructionActivityRequest,\n GetInstructionActivityResponse,\n} from \"@otim/utils/api\";\n\nexport class ActivityClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getInstructionActivity(\n request: GetInstructionActivityRequest,\n ): Promise<GetInstructionActivityResponse> {\n const response =\n await this.apiClient.activity.getInstructionActivity(request);\n\n return response.data;\n }\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimClientContext } from \"@otim/sdk-core/context\";\nimport type { APIClient, AuthLoginResponse, MeResponse } from \"@otim/utils/api\";\nimport type { Address } from \"viem\";\n\nimport { parseSignatureToVRS } from \"@otim/utils/helpers\";\n\nimport { createLoginSiweMessage } from \"@otim/sdk-core/config\";\nimport { assertRequiresAuth } from \"@otim/sdk-core/context\";\n\nexport interface LoginOptions {\n address: Address;\n}\n\nexport class AuthClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimClientContext,\n ) {}\n\n async login({ address }: LoginOptions): Promise<AuthLoginResponse> {\n assertRequiresAuth(this.context);\n\n const message = createLoginSiweMessage(address, Date.now().toString());\n const signature = await this.account.signMessage({ message });\n const vrsParsedSignature = parseSignatureToVRS(signature);\n\n const response = await this.apiClient.auth.login({\n siwe: message,\n signature: vrsParsedSignature,\n });\n\n return response.data;\n }\n\n async getCurrentUser(): Promise<MeResponse> {\n const response = await this.apiClient.auth.me();\n return response.data;\n }\n}\n","import type {\n APIClient,\n GetMaxPriorityFeePerGasEstimateRequest,\n GetMaxPriorityFeePerGasEstimateResponse,\n} from \"@otim/utils/api\";\n\nexport class ConfigClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getMaxPriorityFeeEstimate({\n chainId,\n }: GetMaxPriorityFeePerGasEstimateRequest): Promise<GetMaxPriorityFeePerGasEstimateResponse> {\n const response =\n await this.apiClient.config.getMaxPriorityFeePerGasEstimate({ chainId });\n\n return response.data;\n }\n}\n","import type {\n APIClient,\n DelegationCreateRequest,\n DelegationStatusRequest,\n DelegationStatusResponse,\n GetDelegateAddressRequest,\n GetDelegateAddressResponse,\n} from \"@otim/utils/api\";\n\nexport class DelegationClient {\n constructor(private readonly apiClient: APIClient) {}\n\n async getDelegateAddress({\n chainId,\n }: GetDelegateAddressRequest): Promise<GetDelegateAddressResponse> {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n\n return response.data;\n }\n\n async getDelegationStatus(\n options: DelegationStatusRequest,\n ): Promise<DelegationStatusResponse> {\n const response = await this.apiClient.account.getDelegationStatus({\n address: options.address,\n chainId: options.chainId,\n });\n\n return response.data;\n }\n\n async createDelegation(\n delegationRequest: DelegationCreateRequest,\n ): Promise<void> {\n await this.apiClient.account.createDelegation(delegationRequest);\n }\n}\n","import type { OtimServerClientContext } from \"../../context\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { PublicClient } from \"viem\";\n\nimport { createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nimport { isApiAccountConfig } from \"../../account\";\nimport {\n ApiKeyClientSigningService,\n ServerWalletSigningService,\n UnifiedPaymentSigner,\n} from \"../../signing\";\n\nexport interface CreateSettlementSignerParams {\n context: OtimServerClientContext;\n buildResponse: PaymentResponseWithActionNames;\n publicClient: PublicClient;\n delegateAddressMap: Map<number, Address>;\n}\n\ntype CreateSettlementSignerResult = Awaited<\n ReturnType<UnifiedPaymentSigner[\"signAll\"]>\n>;\n\nexport async function createSettlementSigner(\n params: CreateSettlementSignerParams,\n): Promise<CreateSettlementSignerResult> {\n const { context, buildResponse, publicClient, delegateAddressMap } = params;\n\n if (isApiAccountConfig(context.config)) {\n const signingService = new ApiKeyClientSigningService(\n context.config.publicKey,\n context.config.privateKey,\n );\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n }\n\n const account = privateKeyToAccount(context.config.privateKey);\n const walletClient = createWalletClient({\n account,\n transport: http(),\n });\n\n const signingService =\n ServerWalletSigningService.fromViemWallet(walletClient);\n\n const signer = new UnifiedPaymentSigner({\n buildResponse,\n signingService,\n publicClient,\n delegateAddressMap,\n });\n\n return signer.signAll();\n}\n","import type { OtimAccount } from \"@otim/sdk-core/account\";\nimport type { OtimServerClientContext } from \"@otim/sdk-core/context\";\nimport type {\n APIClient,\n BuildSettlementRequest,\n GetPaymentRequestsRequest,\n GetPaymentRequestsResponse,\n PaginatedServiceResponse,\n PaymentRequestBuildRequest,\n PaymentRequestDetailsRequest,\n PaymentRequestDetailsResponse,\n ServiceResponse,\n} from \"@otim/utils/api\";\nimport type { PaymentResponseWithActionNames } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\nimport type { Chain, PublicClient, Transport } from \"viem\";\n\nimport { getChainTransport } from \"@otim/utils/chains\";\nimport { getChainById } from \"@otim/utils/chains\";\nimport {\n addActionNamesToInstructions,\n extractActionNamesMap,\n} from \"@otim/utils/payments\";\nimport { hexStringSchema } from \"@otim/utils/schemas\";\nimport { createPublicClient } from \"viem\";\n\nimport { assertServerContext } from \"@otim/sdk-core/context\";\n\nimport { createSettlementSigner } from \"./helpers/settlement-signer\";\n\nexport interface CreateSettlementResponse {\n requestId: string;\n ephemeralWalletAddress: Address;\n}\n\nexport interface CreateRawConfig {\n settlementChainId: number;\n activate?: boolean;\n}\n\ntype SettlementInstruction =\n PaymentResponseWithActionNames[\"completionInstructions\"][number];\n\n/**\n * Extracts the settlement chain ID from a BuildSettlementRequest.\n * Handles all settlement types: regular, vault deposit, and vault withdraw.\n */\nfunction extractSettlementChainId(request: BuildSettlementRequest): number {\n const { params } = request;\n\n if (\"settlement\" in params) {\n return params.settlement.settlementChainId;\n }\n\n if (\"settlementVaultDeposit\" in params) {\n return params.settlementVaultDeposit.vaultChainId;\n }\n\n if (\"vaultWithdrawSettlement\" in params) {\n return params.vaultWithdrawSettlement.settlementChainId;\n }\n\n if (\"vaultMigrate\" in params) {\n return params.vaultMigrate.destVaultChainId;\n }\n\n throw new Error(\"Unknown settlement type\");\n}\n\nexport class OrchestrationClient {\n constructor(\n private readonly apiClient: APIClient,\n private readonly account: OtimAccount,\n private readonly context: OtimServerClientContext,\n ) {}\n\n async create(\n settlementRequest: BuildSettlementRequest,\n ): Promise<CreateSettlementResponse> {\n assertServerContext(this.context);\n\n const response =\n await this.apiClient.payments.buildSettlementOrchestration(\n settlementRequest,\n );\n const buildResponse = response.data;\n\n const settlementChainId = extractSettlementChainId(settlementRequest);\n\n await this.activate(buildResponse, settlementChainId);\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async createRaw(\n payload: PaymentRequestBuildRequest,\n config: CreateRawConfig,\n ): Promise<CreateSettlementResponse | PaymentResponseWithActionNames> {\n assertServerContext(this.context);\n\n const { settlementChainId, activate = true } = config;\n const buildResponse = await this.buildAndEnhanceSettlement(payload);\n\n if (!activate) {\n return buildResponse;\n }\n\n await this.activate(buildResponse, settlementChainId);\n\n return {\n requestId: buildResponse.requestId,\n ephemeralWalletAddress: buildResponse.ephemeralWalletAddress,\n };\n }\n\n async getDetails(\n request: PaymentRequestDetailsRequest,\n ): Promise<ServiceResponse<PaymentRequestDetailsResponse>> {\n return this.apiClient.payments.getPaymentRequestDetails(request);\n }\n\n async list(\n request: GetPaymentRequestsRequest,\n ): Promise<PaginatedServiceResponse<GetPaymentRequestsResponse>> {\n return this.apiClient.payments.getPaymentRequests(request);\n }\n\n private async activate(\n buildResponse: PaymentResponseWithActionNames,\n settlementChainId: number,\n ): Promise<void> {\n const publicClient = this.createPublicClient(settlementChainId);\n\n const instructions = [\n ...buildResponse.completionInstructions,\n ...buildResponse.instructions,\n ];\n\n const delegateAddressMap = await this.fetchDelegateAddresses(instructions);\n\n const {\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n } = await createSettlementSigner({\n context: this.context,\n buildResponse,\n publicClient,\n delegateAddressMap,\n });\n\n await this.apiClient.payments.newPaymentRequest({\n requestId: buildResponse.requestId,\n signedAuthorization,\n completionInstructions,\n instructions: signedInstructions,\n });\n }\n\n private async buildAndEnhanceSettlement(\n payload: PaymentRequestBuildRequest,\n ): Promise<PaymentResponseWithActionNames> {\n const actionNames = extractActionNamesMap(\n payload.completionInstructions,\n payload.instructions,\n );\n\n const response = await this.apiClient.payments.buildPaymentRequest(payload);\n\n return addActionNamesToInstructions(response.data, actionNames);\n }\n\n private createPublicClient(chainId: number): PublicClient {\n const chain = getChainById(chainId);\n if (!chain) {\n throw new Error(`Chain with id ${chainId} not found`);\n }\n\n return createPublicClient({\n chain: chain as Chain,\n transport: getChainTransport(chain.id) as Transport,\n });\n }\n\n private async fetchDelegateAddresses(\n instructions: SettlementInstruction[],\n ): Promise<Map<number, Address>> {\n const chainIds = Array.from(\n new Set(instructions.map((instruction) => instruction.chainId)),\n );\n\n const addresses = await Promise.all(\n chainIds.map(async (chainId) => {\n const response = await this.apiClient.config.getDelegateAddress({\n chainId,\n });\n const address = hexStringSchema.parse(\n response.data.otimDelegateAddress,\n );\n return [chainId, address] as const;\n }),\n );\n\n return new Map(addresses);\n }\n}\n","import type {\n BuildSettlementRequest,\n OrchestrationParams,\n SettlementParams,\n VaultWithdrawSettlementParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nexport type {\n BuildSettlementRequest,\n OrchestrationParams,\n SettlementParams,\n VaultWithdrawSettlementParams,\n};\n\nexport interface PrepareSettlementParams {\n amount: bigint;\n chainId: SupportedChainId;\n recipient: Address;\n token: Address;\n acceptedTokens: Record<number, Address[]>;\n payer?: Nullable<Address>;\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n maxRuns?: number;\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Converts acceptedTokens from Record<number, Address[]> to Record<string,\n * Address[]> as required by the API schema.\n */\nfunction convertAcceptedTokensToStringKeys(\n acceptedTokens: Record<number, Address[]>,\n): Record<string, Address[]> {\n const result: Record<string, Address[]> = {};\n for (const [chainId, tokens] of Object.entries(acceptedTokens)) {\n result[String(chainId)] = tokens;\n }\n return result;\n}\n\nexport function prepareSettlement(\n params: PrepareSettlementParams,\n): BuildSettlementRequest {\n const {\n chainId,\n token,\n acceptedTokens,\n recipient,\n amount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount,\n recipient,\n token,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n settlement: {\n acceptedTokens: convertAcceptedTokensToStringKeys(acceptedTokens),\n settlementChainId: chainId,\n settlementToken: token,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n settlementAmount: toHex(amount),\n recipientAddress: recipient,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n VaultWithdrawSettlementParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { VaultWithdrawSettlementParams };\n\nexport interface PrepareVaultWithdrawSettlementParams {\n vaultAddress: Address;\n vaultChainId: SupportedChainId;\n settlementChainId: SupportedChainId;\n settlementToken: Address;\n recipientAddress: Address;\n withdrawAmount: bigint;\n payer?: Nullable<Address>;\n dueDate?: string;\n metadata?: PaymentRequestMetadata;\n note?: string;\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\nexport function prepareVaultWithdrawSettlement(\n params: PrepareVaultWithdrawSettlementParams,\n): BuildSettlementRequest {\n const {\n vaultAddress,\n vaultChainId,\n settlementChainId,\n settlementToken,\n recipientAddress,\n withdrawAmount,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: withdrawAmount,\n recipient: recipientAddress,\n token: settlementToken,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n vaultWithdrawSettlement: {\n vaultAddress,\n vaultChainId,\n settlementChainId,\n settlementToken,\n recipientAddress,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n withdrawAmount: toHex(withdrawAmount),\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n SettlementVaultDepositParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { SettlementVaultDepositParams };\n\nexport interface PrepareVaultDepositSettlementParams {\n /** Map of chain IDs to accepted token addresses for payment */\n acceptedTokens: Record<number, Address[]>;\n /** Chain ID where the vault is deployed */\n vaultChainId: SupportedChainId;\n /** ERC4626 vault address to deposit into */\n vaultAddress: Address;\n /** Optional: the underlying token of the vault (used only for metadata, not sent to API) */\n vaultUnderlyingToken?: Address;\n /** Amount to deposit in the vault's underlying token units */\n depositAmount: bigint;\n /** Address that will receive the vault shares */\n recipientAddress: Address;\n /** Optional payer address */\n payer?: Nullable<Address>;\n /** Optional due date in ISO 8601 format */\n dueDate?: string;\n /** Optional custom metadata */\n metadata?: PaymentRequestMetadata;\n /** Optional note for the settlement */\n note?: string;\n /** Optional maximum number of execution runs */\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Converts acceptedTokens from Record<number, Address[]> to Record<string,\n * Address[]> as required by the API schema.\n */\nfunction convertAcceptedTokensToStringKeys(\n acceptedTokens: Record<number, Address[]>,\n): Record<string, Address[]> {\n const result: Record<string, Address[]> = {};\n for (const [chainId, tokens] of Object.entries(acceptedTokens)) {\n result[String(chainId)] = tokens;\n }\n return result;\n}\n\n/**\n * Prepares a vault deposit settlement request.\n *\n * This creates a settlement that deposits funds into an ERC4626 vault.\n * Funds can be collected from multiple chains (via acceptedTokens) and\n * deposited into the vault on the specified chain.\n *\n * @param params - The vault deposit settlement parameters\n * @returns A BuildSettlementRequest ready to be sent to the API\n */\nexport function prepareVaultDepositSettlement(\n params: PrepareVaultDepositSettlementParams,\n): BuildSettlementRequest {\n const {\n acceptedTokens,\n vaultChainId,\n vaultAddress,\n vaultUnderlyingToken,\n depositAmount,\n recipientAddress,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: depositAmount,\n recipient: recipientAddress,\n token: vaultUnderlyingToken ?? vaultAddress,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n settlementVaultDeposit: {\n acceptedTokens: convertAcceptedTokensToStringKeys(acceptedTokens),\n vaultChainId,\n vaultAddress,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n depositAmount: toHex(depositAmount),\n recipientAddress,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n","import type {\n BuildSettlementRequest,\n VaultMigrateParams,\n} from \"@otim/utils/api\";\nimport type { SupportedChainId } from \"@otim/utils/chains\";\nimport type { Nullable } from \"@otim/utils/helpers\";\nimport type { PaymentRequestMetadata } from \"@otim/utils/payments\";\nimport type { Address } from \"@otim/utils/schemas\";\n\nimport { validateIso8601Date } from \"@otim/utils/helpers\";\nimport { buildPaymentMetadata } from \"@otim/utils/payments\";\nimport { toHex } from \"viem\";\n\nexport type { VaultMigrateParams };\n\nexport interface PrepareVaultMigrateSettlementParams {\n /** Source vault address to withdraw from */\n sourceVaultAddress: Address;\n /** Optional: the underlying token of the source vault (used only for metadata, not sent to API) */\n sourceVaultUnderlyingToken?: Address;\n /** Chain ID where the source vault is deployed */\n sourceVaultChainId: SupportedChainId;\n /** Amount to withdraw from the source vault in underlying token units */\n withdrawAmount: bigint;\n /** Destination vault address to deposit into */\n destVaultAddress: Address;\n /** Optional: the underlying token of the destination vault (used only for metadata, not sent to API) */\n destVaultUnderlyingToken?: Address;\n /** Chain ID where the destination vault is deployed */\n destVaultChainId: SupportedChainId;\n /** Address that will receive the destination vault shares */\n recipientAddress: Address;\n /** Optional payer address */\n payer?: Nullable<Address>;\n /** Optional due date in ISO 8601 format */\n dueDate?: string;\n /** Optional custom metadata */\n metadata?: PaymentRequestMetadata;\n /** Optional note for the settlement */\n note?: string;\n /** Optional maximum number of execution runs */\n maxRuns?: number;\n}\n\n/**\n * Generates a default due date 30 days from now.\n * This is a standard payment term when no due date is specified.\n */\nfunction getDefaultDueDate(): string {\n const date = new Date();\n date.setDate(date.getDate() + 30);\n return date.toISOString();\n}\n\nfunction buildMetadataFromParams(params: {\n amount: bigint;\n recipient: Address;\n token: Address;\n note?: string;\n dueDate?: string;\n payer?: Address;\n customMetadata?: PaymentRequestMetadata;\n}): PaymentRequestMetadata {\n const { amount, recipient, token, note, dueDate, payer, customMetadata } =\n params;\n\n /* Convert from smallest token units to USD */\n const amountInUSD = Number(amount) / 1_000_000;\n\n const baseMetadata = buildPaymentMetadata({\n tokenSymbol: \"\",\n amountInUSD,\n fromAccountAddress: recipient,\n note,\n payer: { name: \"\", address: payer ?? recipient },\n dueDate: dueDate || getDefaultDueDate(),\n });\n\n const metadataWithToken = {\n ...baseMetadata,\n token,\n source: \"Manual\" as const,\n type: \"PaymentRequest\" as const,\n };\n\n return customMetadata\n ? { ...metadataWithToken, ...customMetadata }\n : metadataWithToken;\n}\n\n/**\n * Prepares a vault migrate settlement request.\n *\n * This creates a settlement that migrates funds between two ERC4626 vaults.\n * Funds are withdrawn from the source vault and deposited into the destination\n * vault, which can be on the same chain or a different chain (cross-chain migration).\n *\n * @param params - The vault migrate settlement parameters\n * @returns A BuildSettlementRequest ready to be sent to the API\n */\nexport function prepareVaultMigrateSettlement(\n params: PrepareVaultMigrateSettlementParams,\n): BuildSettlementRequest {\n const {\n sourceVaultAddress,\n sourceVaultChainId,\n withdrawAmount,\n destVaultAddress,\n destVaultUnderlyingToken,\n destVaultChainId,\n recipientAddress,\n payer,\n note,\n dueDate,\n metadata: customMetadata,\n maxRuns,\n } = params;\n\n if (dueDate) {\n validateIso8601Date(dueDate);\n }\n\n const metadata = buildMetadataFromParams({\n amount: withdrawAmount,\n recipient: recipientAddress,\n token: destVaultUnderlyingToken ?? destVaultAddress,\n note,\n dueDate,\n payer: payer ?? undefined,\n customMetadata,\n });\n\n return {\n params: {\n vaultMigrate: {\n sourceVaultAddress,\n sourceVaultChainId,\n // @ts-expect-error -- TODO: fix this once we have the correct type definitions in @otim/utils\n withdrawAmount: toHex(withdrawAmount),\n destVaultAddress,\n destVaultChainId,\n recipientAddress,\n },\n },\n payerAddress: payer ?? null,\n metadata,\n dueDate: dueDate ?? null,\n maxRuns: maxRuns ?? null,\n };\n}\n"],"mappings":";;;;;;;;;;;;AAMA,IAAa,iBAAb,MAA4B;CAC1B,YAAY,AAAiBA,WAAsB;EAAtB;;CAE7B,MAAM,uBACJ,SACyC;AAIzC,UAFE,MAAM,KAAK,UAAU,SAAS,uBAAuB,QA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C;EACA;EACA,OAAO,SAAS;EAChB;EACD,CAAC;AAEF,QAAO;EACL,QAAQ,EACN,cAAc;GACZ;GACA;GAEA,gCAAsB,eAAe;GACrC;GACA;GACA;GACD,EACF;EACD,cAAc,SAAS;EACvB;EACA,SAAS,WAAW;EACpB,SAAS,WAAW;EACrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AbiParameter } from "./abi-DJLWbdqc.mjs";
|
|
2
|
-
import { a as Chain, c as RpcSchema, i as WalletActions, l as WalletRpcSchema, n as Client, o as Transport, r as PublicActions, s as PublicRpcSchema, t as Account } from "./rpc-
|
|
2
|
+
import { a as Chain, c as RpcSchema, i as WalletActions, l as WalletRpcSchema, n as Client, o as Transport, r as PublicActions, s as PublicRpcSchema, t as Account } from "./rpc-CMGNtfHM.mjs";
|
|
3
3
|
import { D as Prettify } from "./authorization-C5pDhI13.mjs";
|
|
4
4
|
import { PaymentResponseWithActionNames } from "@otim/utils/payments";
|
|
5
5
|
import { Address, HexString } from "@otim/utils/schemas";
|
|
@@ -417,4 +417,4 @@ declare class EthereumWalletAdapter implements EthereumWalletInterface {
|
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
419
|
export { Signature as _, InstructionDigestComputer as a, SignerConfig as b, ServerWalletSigningService as c, ActivityPollingConfig as d, ApiKeyClientActivationParameters as f, ServerWalletActivationParameters as g, ISigningService as h, createRlpEncodedAuthorization as i, ApiKeyClientSigningService as l, FormattedSignature as m, FormattedInstruction as n, AuthorizationDigestComputer as o, DigestComputationResult as p, SignatureFormatter as r, UnifiedPaymentSigner as s, EthereumWalletAdapter as t, ActivationResult as u, SignatureResult as v, PublicClient as x, SignedInstruction as y };
|
|
420
|
-
//# sourceMappingURL=index-
|
|
420
|
+
//# sourceMappingURL=index-BRCDIv2-.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-D6ncjdSF.d.mts","names":["Address","ErrorType","Account","ParseAccount","Chain","PublicRpcSchema","RpcSchema","Prettify","Client","ClientConfig","CreateClientErrorType","PublicActions","Transport","PublicClientConfig","transport","chain","accountOrAddress","rpcSchema","Pick","PublicClient","CreatePublicClientErrorType","createPublicClient","Address","Account","ErrorType","ParseAccount","Chain","RpcSchema","WalletRpcSchema","Prettify","Client","ClientConfig","CreateClientErrorType","WalletActions","Transport","WalletClientConfig","transport","chain","accountOrAddress","rpcSchema","Pick","WalletClient","account","CreateWalletClientErrorType","createWalletClient"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/clients/createPublicClient.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/clients/createWalletClient.d.ts","../src/signing/types.ts","../src/signing/services/api-key-client.ts","../src/signing/services/server-wallet.ts","../src/signing/unified-payment-signer.ts","../src/signing/utils/authorization-digest.ts","../src/signing/utils/instruction-digest.ts","../src/signing/utils/signature-formatter.ts","../src/signing/adapters/ethereum-wallet-adapter.ts"],"sourcesContent":["import type { Address } from 'abitype';\nimport type { ErrorType } from '../errors/utils.js';\nimport type { Account, ParseAccount } from '../types/account.js';\nimport type { Chain } from '../types/chain.js';\nimport type { PublicRpcSchema, RpcSchema } from '../types/eip1193.js';\nimport type { Prettify } from '../types/utils.js';\nimport { type Client, type ClientConfig, type CreateClientErrorType } from './createClient.js';\nimport { type PublicActions } from './decorators/public.js';\nimport type { Transport } from './transports/createTransport.js';\nexport type PublicClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, accountOrAddress, rpcSchema>, 'batch' | 'cacheTime' | 'ccipRead' | 'chain' | 'experimental_blockTag' | 'key' | 'name' | 'pollingInterval' | 'rpcSchema' | 'transport'>>;\nexport type PublicClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain, accountOrAddress, rpcSchema extends RpcSchema ? [...PublicRpcSchema, ...rpcSchema] : PublicRpcSchema, PublicActions<transport, chain>>>;\nexport type CreatePublicClientErrorType = CreateClientErrorType | ErrorType;\n/**\n * Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/public\n *\n * A Public Client is an interface to \"public\" [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).\n *\n * @param config - {@link PublicClientConfig}\n * @returns A Public Client. {@link PublicClient}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n */\nexport declare function createPublicClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined>(parameters: PublicClientConfig<transport, chain, accountOrAddress, rpcSchema>): PublicClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;\n//# sourceMappingURL=createPublicClient.d.ts.map","import type { Address } from 'abitype';\nimport type { Account } from '../accounts/types.js';\nimport type { ErrorType } from '../errors/utils.js';\nimport type { ParseAccount } from '../types/account.js';\nimport type { Chain } from '../types/chain.js';\nimport type { RpcSchema, WalletRpcSchema } from '../types/eip1193.js';\nimport type { Prettify } from '../types/utils.js';\nimport { type Client, type ClientConfig, type CreateClientErrorType } from './createClient.js';\nimport { type WalletActions } from './decorators/wallet.js';\nimport type { Transport } from './transports/createTransport.js';\nexport type WalletClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = Account | Address | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, accountOrAddress, rpcSchema>, 'account' | 'cacheTime' | 'ccipRead' | 'chain' | 'key' | 'name' | 'pollingInterval' | 'rpcSchema' | 'transport'>>;\nexport type WalletClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain, account, rpcSchema extends RpcSchema ? [...WalletRpcSchema, ...rpcSchema] : WalletRpcSchema, WalletActions<chain, account>>>;\nexport type CreateWalletClientErrorType = CreateClientErrorType | ErrorType;\n/**\n * Creates a Wallet Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/wallet\n *\n * A Wallet Client is an interface to interact with [Ethereum Account(s)](https://ethereum.org/en/glossary/#account) and provides the ability to retrieve accounts, execute transactions, sign messages, etc. through [Wallet Actions](https://viem.sh/docs/actions/wallet/introduction).\n *\n * The Wallet Client supports signing over:\n * - [JSON-RPC Accounts](https://viem.sh/docs/clients/wallet#json-rpc-accounts) (e.g. Browser Extension Wallets, WalletConnect, etc).\n * - [Local Accounts](https://viem.sh/docs/clients/wallet#local-accounts-private-key-mnemonic-etc) (e.g. private key/mnemonic wallets).\n *\n * @param config - {@link WalletClientConfig}\n * @returns A Wallet Client. {@link WalletClient}\n *\n * @example\n * // JSON-RPC Account\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n *\n * @example\n * // Local Account\n * import { createWalletClient, custom } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…')\n * chain: mainnet,\n * transport: http(),\n * })\n */\nexport declare function createWalletClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined>(parameters: WalletClientConfig<transport, chain, accountOrAddress, rpcSchema>): WalletClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;\n//# sourceMappingURL=createWalletClient.d.ts.map"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAUuDY,KAA3CO,YAA2CP,CAAAA,kBAAZA,SAAYA,GAAAA,SAAAA,EAAAA,cAAyBR,KAAzBQ,GAAAA,SAAAA,GAA6CR,KAA7CQ,GAAAA,SAAAA,EAAAA,yBAAyFV,OAAzFU,GAAAA,SAAAA,GAAAA,SAAAA,EAAAA,kBAA4IN,SAA5IM,GAAAA,SAAAA,GAAAA,SAAAA,CAAAA,GAAiLL,QAAjLK,CAA0LJ,MAA1LI,CAAiME,SAAjMF,EAA4MG,KAA5MH,EAAmNI,gBAAnNJ,EAAqOK,SAArOL,SAAuPN,SAAvPM,GAAAA,CAAAA,GAAuQP,eAAvQO,EAAAA,GAA2RK,SAA3RL,CAAAA,GAAwSP,eAAxSO,EAAyTD,aAAzTC,CAAuUE,SAAvUF,EAAkVG,KAAlVH,CAAAA,CAAAA,CAAAA;;;AAAyBR,KCCpEqC,YDDoErC,CAAAA,kBCCrC8B,SDDqC9B,GCCzB8B,SDDyB9B,EAAAA,cCCAsB,KDDAtB,GAAAA,SAAAA,GCCoBsB,KDDpBtB,GAAAA,SAAAA,EAAAA,gBCCuDmB,ODDvDnB,GAAAA,SAAAA,GCC6EmB,ODD7EnB,GAAAA,SAAAA,EAAAA,kBCCoHuB,SDDpHvB,GAAAA,SAAAA,GAAAA,SAAAA,CAAAA,GCCyJyB,QDDzJzB,CCCkK0B,MDDlK1B,CCCyKgC,SDDzKhC,ECCoLiC,KDDpLjC,ECC2LsC,ODD3LtC,ECCoMmC,SDDpMnC,SCCsNuB,SDDtNvB,GAAAA,CAAAA,GCCsOwB,eDDtOxB,EAAAA,GCC0PmC,SDD1PnC,CAAAA,GCCuQw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ES6C5M,OT7C4MA,CAAAA,MAAAA,CAAAA"}
|
|
1
|
+
{"version":3,"file":"index-BRCDIv2-.d.mts","names":["Address","ErrorType","Account","ParseAccount","Chain","PublicRpcSchema","RpcSchema","Prettify","Client","ClientConfig","CreateClientErrorType","PublicActions","Transport","PublicClientConfig","transport","chain","accountOrAddress","rpcSchema","Pick","PublicClient","CreatePublicClientErrorType","createPublicClient","Address","Account","ErrorType","ParseAccount","Chain","RpcSchema","WalletRpcSchema","Prettify","Client","ClientConfig","CreateClientErrorType","WalletActions","Transport","WalletClientConfig","transport","chain","accountOrAddress","rpcSchema","Pick","WalletClient","account","CreateWalletClientErrorType","createWalletClient"],"sources":["../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/clients/createPublicClient.d.ts","../../../node_modules/.pnpm/viem@2.39.3_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_types/clients/createWalletClient.d.ts","../src/signing/types.ts","../src/signing/services/api-key-client.ts","../src/signing/services/server-wallet.ts","../src/signing/unified-payment-signer.ts","../src/signing/utils/authorization-digest.ts","../src/signing/utils/instruction-digest.ts","../src/signing/utils/signature-formatter.ts","../src/signing/adapters/ethereum-wallet-adapter.ts"],"sourcesContent":["import type { Address } from 'abitype';\nimport type { ErrorType } from '../errors/utils.js';\nimport type { Account, ParseAccount } from '../types/account.js';\nimport type { Chain } from '../types/chain.js';\nimport type { PublicRpcSchema, RpcSchema } from '../types/eip1193.js';\nimport type { Prettify } from '../types/utils.js';\nimport { type Client, type ClientConfig, type CreateClientErrorType } from './createClient.js';\nimport { type PublicActions } from './decorators/public.js';\nimport type { Transport } from './transports/createTransport.js';\nexport type PublicClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, accountOrAddress, rpcSchema>, 'batch' | 'cacheTime' | 'ccipRead' | 'chain' | 'experimental_blockTag' | 'key' | 'name' | 'pollingInterval' | 'rpcSchema' | 'transport'>>;\nexport type PublicClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain, accountOrAddress, rpcSchema extends RpcSchema ? [...PublicRpcSchema, ...rpcSchema] : PublicRpcSchema, PublicActions<transport, chain>>>;\nexport type CreatePublicClientErrorType = CreateClientErrorType | ErrorType;\n/**\n * Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/public\n *\n * A Public Client is an interface to \"public\" [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).\n *\n * @param config - {@link PublicClientConfig}\n * @returns A Public Client. {@link PublicClient}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n */\nexport declare function createPublicClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined>(parameters: PublicClientConfig<transport, chain, accountOrAddress, rpcSchema>): PublicClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;\n//# sourceMappingURL=createPublicClient.d.ts.map","import type { Address } from 'abitype';\nimport type { Account } from '../accounts/types.js';\nimport type { ErrorType } from '../errors/utils.js';\nimport type { ParseAccount } from '../types/account.js';\nimport type { Chain } from '../types/chain.js';\nimport type { RpcSchema, WalletRpcSchema } from '../types/eip1193.js';\nimport type { Prettify } from '../types/utils.js';\nimport { type Client, type ClientConfig, type CreateClientErrorType } from './createClient.js';\nimport { type WalletActions } from './decorators/wallet.js';\nimport type { Transport } from './transports/createTransport.js';\nexport type WalletClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = Account | Address | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, accountOrAddress, rpcSchema>, 'account' | 'cacheTime' | 'ccipRead' | 'chain' | 'key' | 'name' | 'pollingInterval' | 'rpcSchema' | 'transport'>>;\nexport type WalletClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain, account, rpcSchema extends RpcSchema ? [...WalletRpcSchema, ...rpcSchema] : WalletRpcSchema, WalletActions<chain, account>>>;\nexport type CreateWalletClientErrorType = CreateClientErrorType | ErrorType;\n/**\n * Creates a Wallet Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/clients/chains).\n *\n * - Docs: https://viem.sh/docs/clients/wallet\n *\n * A Wallet Client is an interface to interact with [Ethereum Account(s)](https://ethereum.org/en/glossary/#account) and provides the ability to retrieve accounts, execute transactions, sign messages, etc. through [Wallet Actions](https://viem.sh/docs/actions/wallet/introduction).\n *\n * The Wallet Client supports signing over:\n * - [JSON-RPC Accounts](https://viem.sh/docs/clients/wallet#json-rpc-accounts) (e.g. Browser Extension Wallets, WalletConnect, etc).\n * - [Local Accounts](https://viem.sh/docs/clients/wallet#local-accounts-private-key-mnemonic-etc) (e.g. private key/mnemonic wallets).\n *\n * @param config - {@link WalletClientConfig}\n * @returns A Wallet Client. {@link WalletClient}\n *\n * @example\n * // JSON-RPC Account\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n *\n * @example\n * // Local Account\n * import { createWalletClient, custom } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…')\n * chain: mainnet,\n * transport: http(),\n * })\n */\nexport declare function createWalletClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined>(parameters: WalletClientConfig<transport, chain, accountOrAddress, rpcSchema>): WalletClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;\n//# sourceMappingURL=createWalletClient.d.ts.map"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;AAUuDY,KAA3CO,YAA2CP,CAAAA,kBAAZA,SAAYA,GAAAA,SAAAA,EAAAA,cAAyBR,KAAzBQ,GAAAA,SAAAA,GAA6CR,KAA7CQ,GAAAA,SAAAA,EAAAA,yBAAyFV,OAAzFU,GAAAA,SAAAA,GAAAA,SAAAA,EAAAA,kBAA4IN,SAA5IM,GAAAA,SAAAA,GAAAA,SAAAA,CAAAA,GAAiLL,QAAjLK,CAA0LJ,MAA1LI,CAAiME,SAAjMF,EAA4MG,KAA5MH,EAAmNI,gBAAnNJ,EAAqOK,SAArOL,SAAuPN,SAAvPM,GAAAA,CAAAA,GAAuQP,eAAvQO,EAAAA,GAA2RK,SAA3RL,CAAAA,GAAwSP,eAAxSO,EAAyTD,aAAzTC,CAAuUE,SAAvUF,EAAkVG,KAAlVH,CAAAA,CAAAA,CAAAA;;;AAAyBR,KCCpEqC,YDDoErC,CAAAA,kBCCrC8B,SDDqC9B,GCCzB8B,SDDyB9B,EAAAA,cCCAsB,KDDAtB,GAAAA,SAAAA,GCCoBsB,KDDpBtB,GAAAA,SAAAA,EAAAA,gBCCuDmB,ODDvDnB,GAAAA,SAAAA,GCC6EmB,ODD7EnB,GAAAA,SAAAA,EAAAA,kBCCoHuB,SDDpHvB,GAAAA,SAAAA,GAAAA,SAAAA,CAAAA,GCCyJyB,QDDzJzB,CCCkK0B,MDDlK1B,CCCyKgC,SDDzKhC,ECCoLiC,KDDpLjC,ECC2L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CAAAA,ESgC3O,OThC2OA,CAAAA,MAAAA,CAAAA;EAAOC,gBAAAA,CAAAA,OAAAA,EAAAA,MAAAA,EAAAA,SAAAA,EAAAA,MAAAA,CAAAA,ES6C5M,OT7C4MA,CAAAA,MAAAA,CAAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as Address$1 } from "./abi-C34qVuOe.cjs";
|
|
2
|
-
import { s as UnifiedPaymentSigner, x as PublicClient } from "./index-
|
|
2
|
+
import { s as UnifiedPaymentSigner, x as PublicClient } from "./index-tt-bw0Dh.cjs";
|
|
3
3
|
import { o as OtimServerClientContext$1 } from "./index-CUbzbOtB.cjs";
|
|
4
4
|
import { OtimClientContext, OtimServerClientContext } from "@otim/sdk-core/context";
|
|
5
5
|
import { APIClient, AuthLoginResponse, BuildSettlementRequest, BuildSettlementRequest as BuildSettlementRequest$1, DelegationCreateRequest, DelegationStatusRequest, DelegationStatusResponse, GetDelegateAddressRequest, GetDelegateAddressResponse, GetInstructionActivityRequest, GetInstructionActivityResponse, GetMaxPriorityFeePerGasEstimateRequest, GetMaxPriorityFeePerGasEstimateResponse, GetPaymentRequestsRequest, GetPaymentRequestsResponse, MeResponse, OrchestrationParams, PaginatedServiceResponse, PaymentRequestBuildRequest, PaymentRequestDetailsRequest, PaymentRequestDetailsResponse, ServiceResponse, SettlementParams, SettlementVaultDepositParams, VaultMigrateParams } from "@otim/utils/api";
|
|
@@ -195,4 +195,4 @@ type CreateSettlementSignerResult = Awaited<ReturnType<UnifiedPaymentSigner["sig
|
|
|
195
195
|
declare function createSettlementSigner(params: CreateSettlementSignerParams): Promise<CreateSettlementSignerResult>;
|
|
196
196
|
//#endregion
|
|
197
197
|
export { ActivityClient as C, LoginOptions as S, CreateSettlementResponse as _, prepareVaultMigrateSettlement as a, ConfigClient as b, prepareVaultDepositSettlement as c, BuildSettlementRequest$1 as d, OrchestrationParams as f, CreateRawConfig as g, prepareSettlement as h, VaultMigrateParams as i, PrepareVaultWithdrawSettlementParams as l, SettlementParams as m, createSettlementSigner as n, PrepareVaultDepositSettlementParams as o, PrepareSettlementParams as p, PrepareVaultMigrateSettlementParams as r, SettlementVaultDepositParams as s, CreateSettlementSignerParams as t, prepareVaultWithdrawSettlement as u, OrchestrationClient as v, AuthClient as x, DelegationClient as y };
|
|
198
|
-
//# sourceMappingURL=index-
|
|
198
|
+
//# sourceMappingURL=index-BmrWgMvx.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BmrWgMvx.d.cts","names":[],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/orchestration.ts","../src/clients/helpers/prepare-settlement.ts","../src/clients/helpers/prepare-vault-withdraw-settlement.ts","../src/clients/helpers/prepare-vault-deposit-settlement.ts","../src/clients/helpers/prepare-vault-migrate-settlement.ts","../src/clients/helpers/settlement-signer.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAMa,cAAA;;yBAC6B;kCAG7B,gCACR,QAAQ;;;;UCDI,YAAA;WACN;;cAGE,UAAA;;;;yBAEmB,oBACF,sBACA;EDZjB,KAAA,CAAA;IAAA;EAAc,CAAA,ECeA,YDfA,CAAA,ECee,ODff,CCeuB,iBDfvB,CAAA;EACe,cAAA,CAAA,CAAA,EC6BhB,OD7BgB,CC6BR,UD7BQ,CAAA;;;;cED7B,YAAA;;yBAC6B;;;KAIrC,yCAAyC,QAAQ;;;;cCFzC,gBAAA;;yBAC6B;;;KAIrC,4BAA4B,QAAQ;+BAS5B,0BACR,QAAQ;sCAUU,0BAClB;;;;UCLY,wBAAA;;0BAES;;UAGT,eAAA;;;AJ7BjB;AAC0C,cI8D7B,mBAAA,CJ9D6B;EAG7B,iBAAA,SAAA;EACA,iBAAA,OAAA;EAAR,iBAAA,OAAA;EAAO,WAAA,CAAA,SAAA,EI4DoB,SJ5DpB,EAAA,OAAA,EI6DkB,WJ7DlB,EAAA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;;;UMIrC,mCAAA;;sBAEK;;+BAES;;ERblB,kBAAc,EQeL,gBRfK;EACe;EAG7B,cAAA,EAAA,MAAA;EACA;EAAR,gBAAA,EQce,ORdf;EAAO;6BQgBiB;;oBAET;EPnBH;EAIJ,gBAAU,EOiBH,OPjBG;EAES;EACF,KAAA,CAAA,EOgBpB,QPhBoB,COgBX,OPhBW,CAAA;EACA;EAGd,OAAA,CAAA,EAAA,MAAA;EAAW;EAAuB,QAAA,CAAA,EOgBrC,sBPhBqC;EAAR;EAeR,IAAA,CAAA,EAAA,MAAA;EAAR;EAAO,OAAA,CAAA,EAAA,MAAA;;;;AC9BjC;;;;;;;;iBM8FgB,6BAAA,SACN,sCACP;;;UCvFc,4BAAA;WACN;iBACM;gBACD;sBACM,YAAY;;KAG7B,4BAAA,GAA+B,QAClC,WAAW;ATjBA,iBSoBS,sBAAA,CTpBK,MAAA,ESqBjB,4BTrBiB,CAAA,ESsBxB,OTtBwB,CSsBhB,4BTtBgB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as Address$1 } from "./abi-DJLWbdqc.mjs";
|
|
2
|
-
import { s as UnifiedPaymentSigner, x as PublicClient } from "./index-
|
|
2
|
+
import { s as UnifiedPaymentSigner, x as PublicClient } from "./index-BRCDIv2-.mjs";
|
|
3
3
|
import { o as OtimServerClientContext$1 } from "./index-Bii-p3Pv.mjs";
|
|
4
4
|
import { Nullable } from "@otim/utils/helpers";
|
|
5
5
|
import { OtimClientContext, OtimServerClientContext } from "@otim/sdk-core/context";
|
|
@@ -195,4 +195,4 @@ type CreateSettlementSignerResult = Awaited<ReturnType<UnifiedPaymentSigner["sig
|
|
|
195
195
|
declare function createSettlementSigner(params: CreateSettlementSignerParams): Promise<CreateSettlementSignerResult>;
|
|
196
196
|
//#endregion
|
|
197
197
|
export { ActivityClient as C, LoginOptions as S, CreateSettlementResponse as _, prepareVaultMigrateSettlement as a, ConfigClient as b, prepareVaultDepositSettlement as c, BuildSettlementRequest$1 as d, OrchestrationParams as f, CreateRawConfig as g, prepareSettlement as h, VaultMigrateParams as i, PrepareVaultWithdrawSettlementParams as l, SettlementParams as m, createSettlementSigner as n, PrepareVaultDepositSettlementParams as o, PrepareSettlementParams as p, PrepareVaultMigrateSettlementParams as r, SettlementVaultDepositParams as s, CreateSettlementSignerParams as t, prepareVaultWithdrawSettlement as u, OrchestrationClient as v, AuthClient as x, DelegationClient as y };
|
|
198
|
-
//# sourceMappingURL=index-
|
|
198
|
+
//# sourceMappingURL=index-nalKWiJB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-nalKWiJB.d.mts","names":[],"sources":["../src/clients/activity.ts","../src/clients/auth.ts","../src/clients/config.ts","../src/clients/delegation.ts","../src/clients/orchestration.ts","../src/clients/helpers/prepare-settlement.ts","../src/clients/helpers/prepare-vault-withdraw-settlement.ts","../src/clients/helpers/prepare-vault-deposit-settlement.ts","../src/clients/helpers/prepare-vault-migrate-settlement.ts","../src/clients/helpers/settlement-signer.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAMa,cAAA;;yBAC6B;kCAG7B,gCACR,QAAQ;;;;UCDI,YAAA;WACN;;cAGE,UAAA;;;;yBAEmB,oBACF,sBACA;EDZjB,KAAA,CAAA;IAAA;EAAc,CAAA,ECeA,YDfA,CAAA,ECee,ODff,CCeuB,iBDfvB,CAAA;EACe,cAAA,CAAA,CAAA,EC6BhB,OD7BgB,CC6BR,UD7BQ,CAAA;;;;cED7B,YAAA;;yBAC6B;;;KAIrC,yCAAyC,QAAQ;;;;cCFzC,gBAAA;;yBAC6B;;;KAIrC,4BAA4B,QAAQ;+BAS5B,0BACR,QAAQ;sCAUU,0BAClB;;;;UCLY,wBAAA;;0BAES;;UAGT,eAAA;;;AJ7BjB;AAC0C,cI8D7B,mBAAA,CJ9D6B;EAG7B,iBAAA,SAAA;EACA,iBAAA,OAAA;EAAR,iBAAA,OAAA;E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sD,iBKmGtC,6BAAA,CLnGsC,MAAA,EKoG5C,mCLpG4C,CAAA,EKqGnD,sBLrGmD;;;UMIrC,mCAAA;;sBAEK;;+BAES;;ERblB,kBAAc,EQeL,gBRfK;EACe;EAG7B,cAAA,EAAA,MAAA;EACA;EAAR,gBAAA,EQce,ORdf;EAAO;6BQgBiB;;oBAET;EPnBH;EAIJ,gBAAU,EOiBH,OPjBG;EAES;EACF,KAAA,CAAA,EOgBpB,QPhBoB,COgBX,OPhBW,CAAA;EACA;EAGd,OAAA,CAAA,EAAA,MAAA;EAAW;EAAuB,QAAA,CAAA,EOgBrC,sBPhBqC;EAAR;EAeR,IAAA,CAAA,EAAA,MAAA;EAAR;EAAO,OAAA,CAAA,EAAA,MAAA;;;;AC9BjC;;;;;;;;iBM8FgB,6BAAA,SACN,sCACP;;;UCvFc,4BAAA;WACN;iBACM;gBACD;sBACM,YAAY;;KAG7B,4BAAA,GAA+B,QAClC,WAAW;ATjBA,iBSoBS,sBAAA,CTpBK,MAAA,ESqBjB,4BTrBiB,CAAA,ESsBxB,OTtBwB,CSsBhB,4BTtBgB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AbiParameter } from "./abi-C34qVuOe.cjs";
|
|
2
|
-
import { a as Chain, c as RpcSchema, i as WalletActions, l as WalletRpcSchema, n as Client, o as Transport, r as PublicActions, s as PublicRpcSchema, t as Account } from "./rpc-
|
|
2
|
+
import { a as Chain, c as RpcSchema, i as WalletActions, l as WalletRpcSchema, n as Client, o as Transport, r as PublicActions, s as PublicRpcSchema, t as Account } from "./rpc-B2EqDraY.cjs";
|
|
3
3
|
import { D as Prettify } from "./authorization-BnF84ABo.cjs";
|
|
4
4
|
import { PaymentResponseWithActionNames } from "@otim/utils/payments";
|
|
5
5
|
import { Address, HexString } from "@otim/utils/schemas";
|
|
@@ -417,4 +417,4 @@ declare class EthereumWalletAdapter implements EthereumWalletInterface {
|
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
419
|
export { Signature as _, InstructionDigestComputer as a, SignerConfig as b, ServerWalletSigningService as c, ActivityPollingConfig as d, ApiKeyClientActivationParameters as f, ServerWalletActivationParameters as g, ISigningService as h, createRlpEncodedAuthorization as i, ApiKeyClientSigningService as l, FormattedSignature as m, FormattedInstruction as n, AuthorizationDigestComputer as o, DigestComputationResult as p, SignatureFormatter as r, UnifiedPaymentSigner as s, EthereumWalletAdapter as t, ActivationResult as u, SignatureResult as v, PublicClient as x, SignedInstruction as y };
|
|
420
|
-
//# sourceMappingURL=index-
|
|
420
|
+
//# sourceMappingURL=index-tt-bw0Dh.d.cts.map
|