@keetanetwork/anchor 0.0.22 → 0.0.24
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/lib/certificates.d.ts +4 -1
- package/lib/certificates.d.ts.map +1 -1
- package/lib/certificates.js +148 -14
- package/lib/certificates.js.map +1 -1
- package/lib/error.d.ts +33 -0
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +203 -9
- package/lib/error.js.map +1 -1
- package/lib/http-server/common.d.ts +17 -0
- package/lib/http-server/common.d.ts.map +1 -0
- package/lib/http-server/common.js +111 -0
- package/lib/http-server/common.js.map +1 -0
- package/lib/{http-server.d.ts → http-server/index.d.ts} +27 -11
- package/lib/http-server/index.d.ts.map +1 -0
- package/lib/{http-server.js → http-server/index.js} +73 -44
- package/lib/http-server/index.js.map +1 -0
- package/lib/resolver.d.ts +32 -9
- package/lib/resolver.d.ts.map +1 -1
- package/lib/resolver.js +558 -304
- package/lib/resolver.js.map +1 -1
- package/lib/utils/asn1.d.ts +0 -13
- package/lib/utils/asn1.d.ts.map +1 -1
- package/lib/utils/asn1.js +0 -1973
- package/lib/utils/asn1.js.map +1 -1
- package/lib/utils/external.d.ts.map +1 -1
- package/lib/utils/external.js +9 -2
- package/lib/utils/external.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/services/asset-movement/client.d.ts +22 -11
- package/services/asset-movement/client.d.ts.map +1 -1
- package/services/asset-movement/client.js +406 -95
- package/services/asset-movement/client.js.map +1 -1
- package/services/asset-movement/common.d.ts +410 -35
- package/services/asset-movement/common.d.ts.map +1 -1
- package/services/asset-movement/common.js +10176 -1492
- package/services/asset-movement/common.js.map +1 -1
- package/services/asset-movement/server.d.ts +26 -15
- package/services/asset-movement/server.d.ts.map +1 -1
- package/services/asset-movement/server.js +248 -76
- package/services/asset-movement/server.js.map +1 -1
- package/services/fx/common.d.ts +2 -5
- package/services/fx/common.d.ts.map +1 -1
- package/services/fx/common.js +3 -3
- package/services/fx/common.js.map +1 -1
- package/services/fx/server.d.ts +2 -2
- package/services/fx/server.d.ts.map +1 -1
- package/services/fx/server.js +2 -2
- package/services/fx/server.js.map +1 -1
- package/services/kyc/common.d.ts +2 -5
- package/services/kyc/common.d.ts.map +1 -1
- package/services/kyc/common.generated.js +4 -4
- package/services/kyc/common.js.map +1 -1
- package/services/kyc/iso20022.generated.js +54 -54
- package/services/kyc/iso20022.generated.js.map +1 -1
- package/services/kyc/server.d.ts +2 -2
- package/services/kyc/server.d.ts.map +1 -1
- package/services/kyc/server.js +2 -2
- package/services/kyc/server.js.map +1 -1
- package/services/kyc/utils/generate-kyc-schema.js +34 -6
- package/services/kyc/utils/generate-kyc-schema.js.map +1 -1
- package/lib/http-server.d.ts.map +0 -1
- package/lib/http-server.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/services/asset-movement/common.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyElE,CAAC;AAMD,CAAC;AAyBF,sBAAsB;AACtB,WAAW;AACX,KAAK;AACL,YAAY;AACZ,6HAA6H;AAC7H,iJAAiJ;AACjJ,MAAM;AACN,MAAM;AACN,KAAK;AACL,YAAY;AACZ,kFAAkF;AAClF,yGAAyG;AACzG,MAAM;AACN,MAAM;AACN,KAAK;AACL,YAAY;AACZ,qFAAqF;AACrF,gGAAgG;AAChG,MAAM;AACN,KAAK;AACL,KAAK;AAEL,MAAM,UAAU,4BAA4B,CAAC,KAAwB;IACpE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAM,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAED,IAAI,KAAK,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAuL,CAAC;AAE/Q,MAAM,CAAC,MAAM,4DAA4D;;;;;;;sFAAkK,CAAC;AAC5O,MAAM,CAAC,MAAM,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sFAA8I,CAAC;AAC9M,MAAM,CAAC,MAAM,mDAAmD;;;;;;;;;;;;sFAAgJ,CAAC;AACjN,MAAM,CAAC,MAAM,sEAAsE;;;;;;;;;;;;sFAAsL,CAAC","sourcesContent":["import type { ServiceMetadata } from '../../lib/resolver.ts';\nimport { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\nimport * as CurrencyInfo from '@keetanetwork/currency-info';\nimport type { TokenAddress, TokenPublicKeyString } from '@keetanetwork/keetanet-client/lib/account.js';\nimport { createAssert, createAssertEquals, createIs } from 'typia';\n\ntype HexString = `0x${string}`;\n\nexport type KeetaNetTokenPublicKeyString = ReturnType<InstanceType<typeof KeetaNetLib.Account<typeof KeetaNetLib.Account.AccountKeyAlgorithm.TOKEN>>['publicKeyString']['get']>;\n\ntype CurrencySearchInput = CurrencyInfo.ISOCurrencyCode | CurrencyInfo.ISOCurrencyNumber | CurrencyInfo.Currency;\ntype CurrencySearchCanonical = CurrencyInfo.ISOCurrencyCode; /* XXX:TODO */\n\ntype TokenSearchInput = TokenAddress | TokenPublicKeyString;\ntype TokenSearchCanonical = TokenPublicKeyString;\n\nexport type MovableAssetSearchInput = CurrencySearchInput | TokenSearchInput;\nexport type MovableAssetSearchCanonical = CurrencySearchCanonical | TokenSearchCanonical;\nexport type MovableAsset = TokenAddress | TokenPublicKeyString | CurrencyInfo.Currency;\n\nexport type AssetLocationInput = AssetLocation | AssetLocationString;\nexport type AssetLocationCanonical = AssetLocationString;\n\nexport type AssetMovementRail = unknown;\n\nexport type ProviderSearchInput = {\n\tasset: MovableAsset,\n\tfrom?: AssetLocationInput,\n\tto?: AssetLocationInput\n}\n/**\n * Defines the chain and id for a supported asset location\n */\nexport type AssetLocation = {\n\ttype: 'chain';\n\tchain: {\n\t\ttype: 'keeta';\n\t\tnetworkId: bigint;\n\t} | {\n\t\ttype: 'evm';\n\t\tchainId: bigint;\n\t}\n} | {\n\ttype: 'bank-account';\n\tworkInProgress?: never;\n}\n\n// Disable bank-account until it's implemented\nexport type AssetLocationString =\n\t`chain:${'keeta' | 'evm'}:${bigint}` |\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n\t`bank-account:${never}`;\n\nexport type AssetLocationLike = AssetLocation | AssetLocationString;\n\n// A given asset should have a location and ID for the contract or public key for that asset\nexport interface Asset {\n\tlocation?: AssetLocationString;\n\tid: string; // keeta token pub or evm contract address or currency code\n}\n\nexport type Rail = 'ACH_SEND' | 'ACH_DEBIT' | 'KEETA_SEND' | 'EVM_SEND' | 'EVM_CALL';\n\n// Rails can be inbound, outbound or common (inbound and outbound)\nexport interface AssetWithRails extends Asset {\n\trails: (({\n\t\tinbound: Rail[];\n\t\toutbound?: Rail[];\n\t} | {\n\t\tinbound?: Rail[];\n\t\toutbound: Rail[];\n\t} | {\n\t\tinbound?: never;\n\t\toutbound?: never;\n\t}) & {\n\t\tcommon?: Rail[];\n\t});\n};\n\n// A given asset path should consist of exactly one tuple of locations\nexport interface AssetPath {\n\tpair: [ AssetWithRails, AssetWithRails ];\n\tkycProviders?: string[];\n};\n\nexport interface SupportedAssets {\n\tasset: TokenPublicKeyString,\n\tpaths: AssetPath[]\n}\n\nexport interface AssetWithRailsMetadata {\n\tlocation: string;\n\tid: string;\n\trails: (({\n\t\tinbound: string[];\n\t\toutbound?: string[];\n\t} | {\n\t\tinbound?: string[];\n\t\toutbound: string[];\n\t} | {\n\t\tinbound?: never;\n\t\toutbound?: never;\n\t}) & {\n\t\tcommon?: string[];\n\t})\n}\n\n\n// Example Asset Paths\n// paths: [\n// \t{\n// \t\tpair: [\n// \t\t\t{ location: 'chain:keeta:123', id: 'keeta_KT1EXmXoG7fV8b2c5rYkUu4j3t6b3v6v5X8m', rails: { common: [ 'KEETA_SEND' ] } },\n// \t\t\t{ location: 'chain:evm:100', id: '0xc0634090F2Fe6c6d75e61Be2b949464aBB498973', rails: { common: [ 'EVM_SEND' ], inbound: [ 'EVM_CALL' ] } }\n// \t\t]\n// \t},\n// \t{\n// \t\tpair: [\n// \t\t\t{ location: 'chain:keeta:123', id: 'keeta_USDCPUB', rails: ['KEETA_SEND'] },\n// \t\t\t{ location: 'bank-account:US', id: 'USD', rails: { common: ['ACH_SEND'], inbound: ['ACH_DEBIT'] } }\n// \t\t]\n// \t},\n// \t{\n// \t\tpair: [\n// \t\t\t{ location: 'bank-account:EU', id: 'EUR', rails: { inbound: [ 'WIRE_SEND' }] },\n// \t\t\t{ location: 'chain:keeta:123', id: 'keeta_EURCPUB', rails: { outbound: [ 'KEETA_SEND' ]} }\n// \t\t]\n// \t}\n// ];\n\nexport function convertAssetLocationToString(input: AssetLocationLike): AssetLocationString {\n\tif (typeof input === 'string') {\n\t\treturn(input);\n\t}\n\n\tif (input.type === 'chain') {\n\t\tif (input.chain.type === 'keeta') {\n\t\t\treturn(`chain:keeta:${input.chain.networkId}`);\n\t\t} else if (input.chain.type === 'evm') {\n\t\t\treturn(`chain:evm:${input.chain.chainId}`);\n\t\t}\n\t} else if (input.type === 'bank-account') {\n\t\tthrow(new Error('Cannot convert bank-account AssetLocation to string'));\n\t}\n\n\tthrow(new Error(`Invalid AssetLocation type: ${JSON.stringify(input)}`));\n}\n\nexport function toAssetLocationFromString(input: string): AssetLocation {\n\tconst parts = input.split(':');\n\n\tif (parts.length === 3 && parts[0] === 'chain') {\n\t\tconst chainType = parts[1];\n\t\tif (!parts[2] || typeof parts[2] !== 'string') {\n\t\t\tthrow(new Error('Invalid chain id in AssetLocation string'));\n\t\t}\n\n\t\tconst chainId = BigInt(parts[2]);\n\n\t\treturn({\n\t\t\ttype: 'chain',\n\t\t\tchain: (() => {\n\t\t\t\tif (chainType === 'keeta') {\n\t\t\t\t\treturn({\n\t\t\t\t\t\ttype: 'keeta',\n\t\t\t\t\t\tnetworkId: chainId\n\t\t\t\t\t});\n\t\t\t\t} else if (chainType === 'evm') {\n\t\t\t\t\treturn({\n\t\t\t\t\t\ttype: 'evm',\n\t\t\t\t\t\tchainId: chainId\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthrow(new Error(`Invalid chain type in AssetLocation string: ${chainType}`));\n\t\t\t\t}\n\t\t\t})()\n\t\t});\n\t}\n\n\tthrow(new Error('unsupported AssetLocation string format'));\n}\n\nexport function convertAssetLocationInputToCanonical(input: AssetLocationInput): AssetLocationCanonical {\n\tif (typeof input === 'string') {\n\t\treturn(input);\n\t} else if (typeof input === 'object' && input !== null) {\n\t\treturn(convertAssetLocationToString(input));\n\t}\n\n\tthrow(new Error(`Invalid AssetLocationInput type: ${typeof input}`));\n}\n\n\nexport function toAssetLocation(input: AssetLocationInput): AssetLocation {\n\tif (typeof input === 'string') {\n\t\treturn(toAssetLocationFromString(input));\n\t} else {\n\t\treturn(input);\n\t}\n}\n\n\nexport function convertAssetSearchInputToCanonical(input: MovableAssetSearchInput): MovableAssetSearchCanonical {\n\tif (input instanceof CurrencyInfo.Currency || CurrencyInfo.Currency.isCurrencyCode(input) || CurrencyInfo.Currency.isISOCurrencyNumber(input)) {\n\t\tif (CurrencyInfo.Currency.isCurrencyCode(input)) {\n\t\t\treturn(input);\n\t\t} else if (CurrencyInfo.Currency.isISOCurrencyNumber(input)) {\n\t\t\tinput = new CurrencyInfo.Currency(input);\n\t\t}\n\n\t\treturn(input.code);\n\t} else {\n\t\tif (typeof input === 'string') {\n\t\t\treturn(input);\n\t\t}\n\n\t\tinput.assertKeyType(KeetaNetLib.Account.AccountKeyAlgorithm.TOKEN);\n\t\treturn(input.publicKeyString.get());\n\t}\n}\n\nexport type Operations = NonNullable<ServiceMetadata['services']['assetMovement']>[string]['operations'];\nexport type OperationNames = keyof Operations;\n\nexport type KeetaAssetMovementAnchorInitiateTransferRequest = {\n\tasset: MovableAsset;\n\tfrom: { location: AssetLocationLike };\n\tto: { location: AssetLocationLike; recipient: string; };\n\tvalue: string;\n\tallowedRails?: AssetMovementRail[];\n}\n\nexport type AssetTransferInstructions = ({\n\ttype: 'KEETA_SEND';\n\tlocation: AssetLocationLike;\n\n\tsendToAddress: string;\n\tvalue: string;\n\ttokenAddress: string;\n\n\texternal?: string;\n} | {\n\ttype: 'EVM_SEND';\n\tlocation: AssetLocationLike;\n\n\tsendToAddress: string;\n\tvalue: string;\n\ttokenAddress: HexString;\n} | {\n\ttype: 'EVM_CALL';\n\tlocation: AssetLocationLike;\n\n\tcontractAddress: string;\n\tcontractMethodName: string;\n\tcontractMethodArgs: string[];\n}) & ({\n\tassetFee: string;\n});\n\nexport type KeetaAssetMovementAnchorInitiateTransferResponse = ({\n\tok: true;\n\tid: string;\n\tinstructionChoices: AssetTransferInstructions[];\n}) | ({\n\tok: false;\n\terror: string;\n})\n\nexport interface KeetaAssetMovementAnchorGetTransferStatusRequest {\n\tid: string;\n}\n\ntype TransactionStatus = string;\n\nexport type TransactionId = {\n\tid: string;\n\tnonce: string;\n};\n\ntype TransactionIds<T extends string> = {\n\t[type in T]: TransactionId | null;\n};\n\nexport type KeetaAssetMovementTransaction = {\n\tid: string;\n\tstatus: TransactionStatus;\n\tasset: MovableAsset;\n\n\tfrom: {\n\t\tlocation: AssetLocationString;\n\t\tvalue: string;\n\t\ttransactions: TransactionIds<'persistentForwarding' | 'deposit' | 'finalization'>;\n\t};\n\n\tto: {\n\t\tlocation: AssetLocationString;\n\t\tvalue: string;\n\t\ttransactions: TransactionIds<'withdraw'>;\n\t};\n\n\tfee: {\n\t\tasset: MovableAsset;\n\t\tvalue: string;\n\t} | null;\n\n\tcreatedAt: string;\n\tupdatedAt: string;\n}\n\nexport type KeetaAssetMovementAnchorGetTransferStatusResponse = ({\n\tok: true;\n\ttransaction: KeetaAssetMovementTransaction;\n} | {\n\tok: false;\n\terror: string;\n});\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingRequest = {\n\tasset: MovableAsset;\n\tdestinationLocation: AssetLocationLike;\n\tdestinationAddress: string;\n\tsourceLocation: AssetLocationLike;\n}\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingResponse = ({\n\tok: true;\n\taddress: string;\n} | {\n\tok: false;\n\terror: string;\n});\n\ntype PaginationQuery = {\n\tlimit?: number;\n\toffset?: number;\n}\n\ntype PaginationResponseInformation = {\n\ttotal: string;\n}\n\nexport type KeetaAssetMovementAnchorlistTransactionsRequest = {\n\tpersistentAddresses?: { location: AssetLocationLike; persistentAddress: string; }[];\n\tfrom?: { location: AssetLocationLike; userAddress?: string; asset?: MovableAsset; };\n\tto?: { location: AssetLocationLike; userAddress?: string; asset?: MovableAsset; };\n\tpagination?: PaginationQuery;\n}\n\nexport type KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = (({\n\tok: true;\n\ttransactions: KeetaAssetMovementTransaction[] ;\n} & PaginationResponseInformation) | {\n\tok: false;\n\terror: string;\n});\n\nexport const assertKeetaSupportedAssets: (input: unknown) => SupportedAssets[] = createAssert<SupportedAssets[]>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingRequest: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingRequest = createAssert<KeetaAssetMovementAnchorCreatePersistentForwardingRequest>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingResponse: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingResponse = createAssertEquals<KeetaAssetMovementAnchorCreatePersistentForwardingResponse>();\nexport const assertKeetaAssetMovementAnchorInitiateTransferRequest: (input: unknown) => KeetaAssetMovementAnchorInitiateTransferRequest = createAssert<KeetaAssetMovementAnchorInitiateTransferRequest>();\nexport const assertKeetaAssetMovementAnchorInitiateTransferResponse: (input: unknown) => KeetaAssetMovementAnchorInitiateTransferResponse = createAssertEquals<KeetaAssetMovementAnchorInitiateTransferResponse>();\nexport const assertKeetaAssetMovementAnchorGetTransferStatusRequest: (input: unknown) => KeetaAssetMovementAnchorGetTransferStatusRequest = createAssert<KeetaAssetMovementAnchorGetTransferStatusRequest>();\nexport const assertKeetaAssetMovementAnchorGetTransferStatusResponse: (input: unknown) => KeetaAssetMovementAnchorGetTransferStatusResponse = createAssertEquals<KeetaAssetMovementAnchorGetTransferStatusResponse>();\nexport const assertKeetaAssetMovementAnchorlistTransactionsRequest: (input: unknown) => KeetaAssetMovementAnchorlistTransactionsRequest = createAssert<KeetaAssetMovementAnchorlistTransactionsRequest>();\nexport const assertKeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse: (input: unknown) => KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = createAssertEquals<KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse>();\n\nexport const isKeetaAssetMovementAnchorCreatePersistentForwardingResponse: (input: unknown) => input is KeetaAssetMovementAnchorCreatePersistentForwardingResponse = createIs<KeetaAssetMovementAnchorCreatePersistentForwardingResponse>();\nexport const isKeetaAssetMovementAnchorInitiateTransferResponse: (input: unknown) => input is KeetaAssetMovementAnchorInitiateTransferResponse = createIs<KeetaAssetMovementAnchorInitiateTransferResponse>();\nexport const isKeetaAssetMovementAnchorGetExchangeStatusResponse: (input: unknown) => input is KeetaAssetMovementAnchorGetTransferStatusResponse = createIs<KeetaAssetMovementAnchorGetTransferStatusResponse>();\nexport const isKeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse: (input: unknown) => input is KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = createIs<KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse>();\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/services/asset-movement/common.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKnE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAsBvD,MAAM,UAAU,UAAU,CAAC,KAAgB;IAC1C,OAAM,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzD,OAAM,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED,OAAM,CAAC,KAAK,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAe;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;QAC9C,MAAK,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;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,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,UAAS,UAAU;gBAC9D,OAAM,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;YACpE,CAAC,CAAC;SACF,EACD,OAAO,CACP,CAAC;QAEF,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAM,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;;AAGF,MAAM,CAAC,MAAM,MAAM,GAEf;IACH;;OAEG;IACH,cAAc,EAAE,2CAA2C;CAC3D,CAAC","sourcesContent":["import type { ServiceMetadata } from '../../lib/resolver.ts';\nimport { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\nimport * as CurrencyInfo from '@keetanetwork/currency-info';\nimport type { AccountKeyAlgorithm, IdentifierKeyAlgorithm, TokenAddress, TokenPublicKeyString } from '@keetanetwork/keetanet-client/lib/account.js';\nimport { createAssert, createAssertEquals, createIs } from 'typia';\nimport type { ToJSONSerializable } from '@keetanetwork/keetanet-client/lib/utils/conversion.js';\nimport type { HTTPSignedField } from '../../lib/http-server/common.js';\nimport type { Signable } from '../../lib/utils/signing.js';\nimport type { SharableCertificateAttributes } from '../../lib/certificates.js';\nimport { KeetaNet } from '../../client/index.js';\nimport { KeetaAnchorUserError } from '../../lib/error.js';\nimport { assertNever } from '../../lib/utils/never.js';\n\n\ntype HexString = `0x${string}`;\n\n\nexport type KeetaNetAccount = InstanceType<typeof KeetaNetLib.Account>;\nexport type KeetaNetTokenPublicKeyString = ReturnType<InstanceType<typeof KeetaNetLib.Account<typeof KeetaNetLib.Account.AccountKeyAlgorithm.TOKEN>>['publicKeyString']['get']>;\n\nexport type ISOCountryCode = CurrencyInfo.ISOCountryCode;\n\ntype CurrencySearchCanonical = CurrencyInfo.ISOCurrencyCode | `$${string}`; /* XXX:TODO */\ntype CurrencySearchInput = CurrencySearchCanonical | CurrencyInfo.Currency;\n\ntype TokenSearchInput = TokenAddress | TokenPublicKeyString;\ntype TokenSearchCanonical = TokenPublicKeyString;\n\nexport type EVMAsset = `evm:${HexString}`;\nexport type MovableAssetSearchInput = CurrencySearchInput | TokenSearchInput | EVMAsset;\nexport type MovableAssetSearchCanonical = CurrencySearchCanonical | TokenSearchCanonical | EVMAsset;\nexport type MovableAsset = TokenAddress | TokenPublicKeyString | CurrencySearchInput | EVMAsset;\n\nexport function toEVMAsset(input: HexString): EVMAsset {\n\treturn(`evm:${input}`);\n}\n\nfunction isHexString(input: unknown): input is HexString {\n\tif (typeof input === 'string' && input.startsWith('0x')) {\n\t\treturn(true);\n\t}\n\n\treturn(false);\n}\n\nexport function parseEVMAsset(input: EVMAsset): HexString {\n\tconst parts = input.split(':');\n\tif (parts.length !== 2 || parts[0] !== 'evm') {\n\t\tthrow(new Error('Invalid EVMAsset string'));\n\t}\n\n\tconst value = parts[1];\n\tif (!isHexString(value)) {\n\t\tthrow(new Error('Invalid hex string in EVMAsset'));\n\t}\n\n\treturn(value);\n}\n\nexport function isEVMAsset(input: unknown): input is EVMAsset {\n\treturn(typeof input === 'string' && input.startsWith('evm:0x'));\n}\n\nexport type AssetLocationInput = AssetLocation | AssetLocationString;\nexport type AssetLocationCanonical = AssetLocationString;\n\nexport type ProviderSearchInput = {\n\tasset?: MovableAsset | AssetPair;\n\tfrom?: AssetLocationInput;\n\tto?: AssetLocationInput;\n\trail?: Rail | Rail[];\n}\n/**\n * Defines the chain and id for a supported asset location\n */\n\ninterface BaseLocation<Type extends 'chain' | 'bank-account'> {\n\ttype: Type;\n}\n\nexport interface BankLocation extends BaseLocation<'bank-account'> {\n\taccount: {\n\t\ttype: BankAccountType;\n\t}\n}\n\ninterface BaseChainLocation<Data> extends BaseLocation<'chain'> {\n\ttype: 'chain';\n\tchain: Data;\n}\n\nexport type ChainLocation = {\n\ttype: 'chain';\n\tchain: {\n\t\ttype: 'keeta';\n\t\tnetworkId: bigint;\n\t} | {\n\t\ttype: 'evm';\n\t\tchainId: bigint;\n\t}\n};\n\nexport type ChainLocationType = ChainLocation['chain']['type'];\n\nexport type PickChainLocation<T extends ChainLocationType = ChainLocationType> = BaseChainLocation<Extract<ChainLocation['chain'], { type: T }>>;\n\nexport function isChainLocation<T extends ChainLocationType>(input: AssetLocation, chainType?: T): input is PickChainLocation<T> {\n\tif (input.type !== 'chain') {\n\t\treturn(false);\n\t}\n\n\tif (chainType !== undefined) {\n\t\treturn(input.chain.type === chainType);\n\t}\n\n\treturn(true);\n}\n\nexport type AssetLocation = ChainLocation | BankLocation;\n\nexport type BankAccountType = 'us' | 'iban-swift' | 'clabe' | 'pix';\nexport const assertBankAccountType: (input: unknown) => BankAccountType = createAssert<BankAccountType>();\n\nexport type AssetLocationString =\n\t`chain:${'keeta' | 'evm'}:${bigint}` |\n\t`bank-account:${BankAccountType}`;\n\nexport type AssetLocationLike = AssetLocation | AssetLocationString;\n\n// A given asset should have a location and ID for the contract or public key for that asset\nexport interface Asset {\n\tlocation?: AssetLocationString;\n\t/**\n\t * Keeta token public key string, evm contract address, or a currency code\n\t */\n\tid: string;\n}\n\nexport type Rail =\n\t'ACH' | 'ACH_DEBIT' | 'KEETA_SEND' | 'EVM_SEND' | 'EVM_CALL' | 'WIRE' | 'WIRE_RECEIVE' | 'PIX_PUSH' | 'SPEI_PUSH' | 'WIRE_INTL_PUSH' | 'CLABE_PUSH' | 'SEPA_PUSH';\n\n// Rails can be inbound, outbound or common (inbound and outbound)\nexport interface AssetWithRails extends Asset {\n\trails: (({\n\t\tinbound: Rail[];\n\t\toutbound?: Rail[];\n\t} | {\n\t\tinbound?: Rail[];\n\t\toutbound: Rail[];\n\t} | {\n\t\tinbound?: never;\n\t\toutbound?: never;\n\t}) & {\n\t\tcommon?: Rail[];\n\t});\n};\n\n// A given asset path should consist of exactly one tuple of locations\nexport interface AssetPath {\n\tpair: [ AssetWithRails, AssetWithRails ];\n\tkycProviders?: string[];\n};\n\nexport type AssetMetadataTargetValue = TokenPublicKeyString | CurrencySearchCanonical | `$${string}`;\nexport interface SupportedAssets {\n\tasset: AssetMetadataTargetValue | [ AssetMetadataTargetValue, AssetMetadataTargetValue ];\n\tpaths: AssetPath[];\n}\n\nexport interface AssetWithRailsMetadata {\n\tlocation: string;\n\tid: string;\n\trails: (({\n\t\tinbound: Rail[];\n\t\toutbound?: Rail[];\n\t} | {\n\t\tinbound?: Rail[];\n\t\toutbound: Rail[];\n\t} | {\n\t\tinbound?: never;\n\t\toutbound?: never;\n\t}) & {\n\t\tcommon?: Rail[];\n\t})\n}\n\n\nexport function commonJSONStringify(input: unknown): string {\n\treturn(JSON.stringify(input, function(_, value: unknown) {\n\t\tif (typeof value === 'bigint') {\n\t\t\treturn(String(value));\n\t\t} else if (KeetaNet.lib.Account.isInstance(value)) {\n\t\t\treturn(value.publicKeyString.get());\n\t\t}\n\n\t\treturn(value);\n\t}));\n}\n\ntype SignableObjectInput = { [key: string | number | symbol]: SignableObjectInput } | SignableObjectInput[] | Signable[number] | undefined | null | boolean;\n\n/**\n * The maximum queue length for the commonToSignable function to prevent DoS attacks\n */\nconst TO_SIGNABLE_MAX_QUEUE_LENGTH = 250;\n\nfunction commonToSignable(item: SignableObjectInput): Signable {\n\tconst queue: [ string, SignableObjectInput ][] = [[ '', item ]];\n\tconst result: [ string, Signable[number] ][] = [];\n\n\twhile (queue.length > 0) {\n\t\tconst next = queue.shift();\n\n\t\tif (!next) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [ prefix, current ] = next;\n\t\tif (current === null || current === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof current === 'boolean') {\n\t\t\tresult.push([ prefix, current ? 1 : 0 ]);\n\t\t} else if (Array.isArray(current)) {\n\t\t\tfor (let i = 0; i < current.length; i++) {\n\t\t\t\tqueue.push([ `${prefix}[${i}]`, current[i] ]);\n\t\t\t}\n\t\t} else if (typeof current === 'object') {\n\t\t\tfor (const [ key, value ] of Object.entries(current)) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\t\t\tqueue.push([ prefix ? `${prefix}.${key}` : key, value as SignableObjectInput ]);\n\t\t\t}\n\t\t} else {\n\t\t\tresult.push([ prefix, current ]);\n\t\t}\n\n\t\tif (queue.length > TO_SIGNABLE_MAX_QUEUE_LENGTH) {\n\t\t\tthrow(new KeetaAnchorUserError('Too much data to sign in commonToSignable'));\n\t\t}\n\t}\n\n\tresult.sort((a, b) => {\n\t\treturn(a[0].localeCompare(b[0], 'en-US', {\n\t\t\tusage: 'sort',\n\t\t\tnumeric: true,\n\t\t\tsensitivity: 'case',\n\t\t\tignorePunctuation: false\n\t\t}));\n\t});\n\n\treturn(result.map(item => item[1]));\n}\n\nexport function convertAssetLocationToString(input: AssetLocationLike): AssetLocationString {\n\tif (typeof input === 'string') {\n\t\treturn(input);\n\t}\n\n\tif (input.type === 'chain') {\n\t\tif (input.chain.type === 'keeta') {\n\t\t\treturn(`chain:keeta:${input.chain.networkId}`);\n\t\t} else if (input.chain.type === 'evm') {\n\t\t\treturn(`chain:evm:${input.chain.chainId}`);\n\t\t} else {\n\t\t\tassertNever(input.chain);\n\t\t}\n\t} else if (input.type === 'bank-account') {\n\t\treturn(`bank-account:${assertBankAccountType(input.account.type)}`);\n\t} else {\n\t\tthrow(new Error(`Invalid AssetLocation type: ${JSON.stringify(input)}`));\n\t}\n}\n\nexport function toAssetLocationFromString(input: string): AssetLocation {\n\tconst [ kind, ...parts ] = input.split(':');\n\n\tif (kind === 'chain') {\n\t\tif (parts.length !== 2) {\n\t\t\tthrow(new Error('Invalid AssetLocation chain string'));\n\t\t}\n\n\t\tconst chainType = parts[0];\n\t\tif (!parts[1] || typeof parts[1] !== 'string') {\n\t\t\tthrow(new Error('Invalid chain id in AssetLocation string'));\n\t\t}\n\n\t\tconst chainId = BigInt(parts[1]);\n\n\t\treturn({\n\t\t\ttype: 'chain',\n\t\t\tchain: (() => {\n\t\t\t\tif (chainType === 'keeta') {\n\t\t\t\t\treturn({\n\t\t\t\t\t\ttype: 'keeta',\n\t\t\t\t\t\tnetworkId: chainId\n\t\t\t\t\t});\n\t\t\t\t} else if (chainType === 'evm') {\n\t\t\t\t\treturn({\n\t\t\t\t\t\ttype: 'evm',\n\t\t\t\t\t\tchainId: chainId\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthrow(new Error(`Invalid chain type in AssetLocation string: ${chainType}`));\n\t\t\t\t}\n\t\t\t})()\n\t\t});\n\t} else if (kind === 'bank-account') {\n\t\tif (parts.length !== 1) {\n\t\t\tthrow(new Error('Invalid AssetLocation bank-account string'));\n\t\t}\n\n\t\treturn({\n\t\t\ttype: 'bank-account',\n\t\t\taccount: { type: assertBankAccountType(parts[0]) }\n\t\t});\n\t} else {\n\t\tthrow(new Error('Invalid AssetLocation string'));\n\t}\n}\n\nexport function convertAssetLocationInputToCanonical(input: AssetLocationInput): AssetLocationCanonical {\n\tif (typeof input === 'string') {\n\t\treturn(input);\n\t} else if (typeof input === 'object' && input !== null) {\n\t\treturn(convertAssetLocationToString(input));\n\t}\n\n\tthrow(new Error(`Invalid AssetLocationInput type: ${typeof input}`));\n}\n\n\nexport function toAssetLocation(input: AssetLocationInput): AssetLocation {\n\tif (typeof input === 'string') {\n\t\treturn(toAssetLocationFromString(input));\n\t} else {\n\t\treturn(input);\n\t}\n}\n\n\nexport function convertAssetSearchInputToCanonical(input: MovableAssetSearchInput): MovableAssetSearchCanonical {\n\tif (input instanceof CurrencyInfo.Currency || CurrencyInfo.Currency.isCurrencyCode(input) || CurrencyInfo.Currency.isISOCurrencyNumber(input)) {\n\t\tif (CurrencyInfo.Currency.isCurrencyCode(input)) {\n\t\t\treturn(input);\n\t\t} else if (CurrencyInfo.Currency.isISOCurrencyNumber(input)) {\n\t\t\tinput = new CurrencyInfo.Currency(input);\n\t\t}\n\n\t\treturn(input.code);\n\t} else {\n\t\tif (typeof input === 'string') {\n\t\t\treturn(input);\n\t\t}\n\n\t\tinput.assertKeyType(KeetaNetLib.Account.AccountKeyAlgorithm.TOKEN);\n\t\treturn(input.publicKeyString.get());\n\t}\n}\n\nexport type AssetPair<From extends MovableAsset = MovableAsset, To extends MovableAsset = MovableAsset> = { from: From; to: To; };\nexport type AssetOrPair = MovableAsset | AssetPair;\n\nexport type AssetPairCanonical<From extends MovableAssetSearchCanonical = MovableAssetSearchCanonical, To extends MovableAssetSearchCanonical = MovableAssetSearchCanonical> = { from: From; to: To; };\nexport type AssetOrPairCanonical = MovableAssetSearchCanonical | AssetPairCanonical;\n\nfunction isAssetPairLike(input: unknown): input is AssetPair {\n\treturn(typeof input === 'object' && input !== null && 'from' in input && 'to' in input);\n}\n\nexport function toAssetPair(input: AssetOrPair): AssetPair {\n\tif (isAssetPairLike(input)) {\n\t\treturn(input);\n\t}\n\n\treturn({ from: input, to: input });\n}\n\n\nexport function convertAssetOrPairSearchInputToCanonical(input: AssetOrPair): AssetOrPairCanonical {\n\tif (isAssetPairLike(input)) {\n\t\treturn({\n\t\t\tfrom: convertAssetSearchInputToCanonical(input.from),\n\t\t\tto: convertAssetSearchInputToCanonical(input.to)\n\t\t});\n\t} else {\n\t\treturn(convertAssetSearchInputToCanonical(input));\n\t}\n}\n\n\nexport type Operations = NonNullable<ServiceMetadata['services']['assetMovement']>[string]['operations'];\nexport type OperationNames = keyof Operations;\n\nexport type RecipientResolved = AddressResolved | { type: 'persistent-address'; persistentAddressId: string; };\n\n\ntype ConvertToExternalRequest<\n\tInternal extends object,\n\tOverrides extends object,\n\tSigned = { signed?: HTTPSignedField | undefined }\n> =\n\tToJSONSerializable<Omit<Internal, keyof Overrides>> &\n\tOverrides &\n\tSigned;\n\nexport type KeetaAssetMovementAnchorInitiateTransferClientRequest = {\n\taccount?: KeetaNetAccount | undefined;\n\tasset: AssetOrPair;\n\tfrom: { location: AssetLocationLike; };\n\tto: { location: AssetLocationLike; recipient: RecipientResolved; };\n\tvalue: string | bigint;\n\tallowedRails?: Rail[];\n}\n\nexport type KeetaAssetMovementAnchorInitiateTransferRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorInitiateTransferClientRequest, {\n\tasset: AssetOrPairCanonical;\n\tfrom: { location: AssetLocationCanonical; };\n\tto: { location: AssetLocationCanonical; recipient: RecipientResolved; };\n}>;\n\nexport function getKeetaAssetMovementAnchorInitiateTransferRequestSigningData(input: KeetaAssetMovementAnchorInitiateTransferClientRequest | KeetaAssetMovementAnchorInitiateTransferRequest): Signable {\n\treturn(commonToSignable({\n\t\tasset: convertAssetOrPairSearchInputToCanonical(input.asset),\n\t\tfrom: { location: convertAssetLocationInputToCanonical(input.from.location) },\n\t\tto: { location: convertAssetLocationInputToCanonical(input.to.location), recipient: input.to.recipient },\n\t\tvalue: String(input.value)\n\t}));\n}\n\nexport type AssetTransferInstructions = ({\n\ttype: 'KEETA_SEND';\n\tlocation: AssetLocationLike;\n\n\tsendToAddress: string;\n\tvalue: string;\n\ttokenAddress: string;\n\n\texternal?: string;\n} | {\n\ttype: 'EVM_SEND';\n\tlocation: AssetLocationLike;\n\n\tsendToAddress: string;\n\tvalue: string;\n\ttokenAddress: HexString;\n} | {\n\ttype: 'EVM_CALL';\n\tlocation: AssetLocationLike;\n\n\tcontractAddress: string;\n\tcontractMethodName: string;\n\tcontractMethodArgs: string[];\n} | {\n\ttype: 'WIRE' | 'ACH' | 'SEPA_PUSH';\n\taccount: BankAccountAddressResolved;\n\tdepositMessage?: string;\n\tvalue: string;\n}) & ({\n\tassetFee: string;\n\ttotalReceiveAmount?: string;\n\tpersistentAddressId?: string;\n});\n\nexport type KeetaAssetMovementAnchorInitiateTransferResponse = ({\n\tok: true;\n\tid: string;\n\tinstructionChoices: AssetTransferInstructions[];\n}) | ({\n\tok: false;\n\terror: string;\n})\n\nexport interface KeetaAssetMovementAnchorGetTransferStatusClientRequest {\n\taccount?: KeetaNetAccount;\n\tid: string;\n}\n\nexport interface KeetaAssetMovementAnchorGetTransferStatusRequest {\n\tid: string;\n}\n\nexport function getKeetaAssetMovementAnchorGetTransferStatusRequestSigningData(input: KeetaAssetMovementAnchorGetTransferStatusRequest): Signable {\n\treturn([ 'get-transaction', input.id ]);\n}\n\ntype TransactionStatus = string;\n\nexport type TransactionId = {\n\tid: string;\n\tnonce: string;\n};\n\ntype TransactionIds<T extends string> = {\n\t[type in T]: TransactionId | null;\n};\n\nexport type KeetaAssetMovementTransaction = {\n\tid: string;\n\tstatus: TransactionStatus;\n\tasset: AssetOrPair;\n\n\tfrom: {\n\t\tlocation: AssetLocationString;\n\t\tvalue: string;\n\t\ttransactions: TransactionIds<'persistentForwarding' | 'deposit' | 'finalization'>;\n\t};\n\n\tto: {\n\t\tlocation: AssetLocationString;\n\t\tvalue: string;\n\t\ttransactions: TransactionIds<'withdraw'>;\n\t};\n\n\tfee: {\n\t\tasset: MovableAsset;\n\t\tvalue: string;\n\t} | null;\n\n\tcreatedAt: string;\n\tupdatedAt: string;\n}\n\nexport type KeetaAssetMovementAnchorGetTransferStatusResponse = ({\n\tok: true;\n\ttransaction: KeetaAssetMovementTransaction;\n} | {\n\tok: false;\n\terror: string;\n});\n\ntype PhysicalAddress = {\n\tline1: string;\n\tline2?: string;\n\tcountry: ISOCountryCode;\n\tpostalCode: string;\n\tsubdivision: string;\n\tcity: string;\n};\n\ntype USBankAccountType = 'checking' | 'savings';\n\nexport type BankAccountAddressResolved = {\n\ttype: 'bank-account';\n\taccountAddress?: PhysicalAddress | string;\n\tobfuscated?: false;\n\n\tbankName?: string;\n\n\taccountOwner: {\n\t\ttype: 'individual';\n\t\tfirstName: string;\n\t\tlastName: string;\n\t} | {\n\t\ttype: 'business';\n\t\tbusinessName: string;\n\t} | {\n\t\ttype: 'unknown';\n\t\tbeneficiaryName: string;\n\t}\n} & ({\n\taccountType: 'us';\n\n\taccountNumber: string;\n\troutingNumber: string;\n\taccountTypeDetail: USBankAccountType;\n} | {\n\taccountType: 'iban-swift';\n\n\n\tcountry?: ISOCountryCode;\n\n\taccountNumber?: string;\n\tbic?: string;\n\n\tiban?: string;\n\n\tbankAddress?: PhysicalAddress;\n\n\tswift?: {\n\t\tcategory: string;\n\t\tpurposeOfFunds: string[];\n\t\tbusinessDescription: string;\n\t}\n} | {\n\taccountType: 'clabe';\n\n\taccountNumber: string;\n} | ({\n\taccountType: 'pix';\n\tdocument?: {\n\t\ttype?: 'cpf' | 'cnpj';\n\t\tnumber: string;\n\t}\n} & ({\n\tbrCode: string;\n} | {\n\tpixKey: string;\n})));\n\nexport type BankAccountAddressObfuscated = {\n\ttype: 'bank-account';\n\tobfuscated: true;\n\n\taccountOwner?: {\n\t\ttype?: 'individual' | 'business';\n\t\tname?: string;\n\t\tbusinessName?: string;\n\t}\n\n\tbankName?: string;\n\n\taccountNumberEnding?: string;\n} & ({\n\taccountType: 'us';\n\n\troutingNumber: string;\n\taccountTypeDetail?: USBankAccountType;\n\n} | {\n\taccountType: 'iban-swift';\n\tcountry?: ISOCountryCode;\n\tbic?: string;\n} | {\n\taccountType: 'clabe';\n} | {\n\taccountType: 'pix';\n})\n\ntype CryptoAddress = string;\ntype AddressResolved = BankAccountAddressResolved | CryptoAddress;\ntype AddressObfuscated = BankAccountAddressObfuscated | CryptoAddress;\n\nexport type PersistentAddressTemplateData = {\n\tid: string;\n\tlocation: AssetLocationLike;\n\tasset: MovableAsset;\n\taddress: AddressObfuscated;\n}\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateClientRequest = {\n\taccount?: KeetaNetAccount;\n\tasset: MovableAsset;\n\tlocation: AssetLocationLike;\n\taddress: AddressResolved;\n}\n\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateClientRequest, {\n\tasset: AssetOrPairCanonical;\n\tlocation: AssetLocationCanonical;\n\taddress: AddressResolved;\n}>;\n\nexport function getKeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequestSigningData(input: KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateClientRequest | KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest): Signable {\n\tconst pair = toAssetPair(input.asset);\n\treturn(commonToSignable({\n\t\tasset: { from: convertAssetSearchInputToCanonical(pair.from), to: convertAssetSearchInputToCanonical(pair.to) },\n\t\tlocation: convertAssetLocationInputToCanonical(input.location),\n\t\taddress: input.address\n\t}));\n}\n\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse = (({\n\tok: true;\n} & PersistentAddressTemplateData) | {\n\tok: false;\n\terror: string;\n});\n\nexport type KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest = {\n\taccount?: KeetaNetAccount;\n\tasset?: MovableAsset[];\n\tlocation?: AssetLocationLike[];\n\tpagination?: PaginationQuery;\n}\n\nexport type KeetaAssetMovementAnchorListForwardingAddressTemplateRequest = ToJSONSerializable<Pick<KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest, 'account' | 'pagination'>> & {\n\tasset?: MovableAssetSearchCanonical[] | undefined;\n\tlocation?: AssetLocationCanonical[] | undefined;\n\tsigned?: HTTPSignedField;\n}\n\nexport function getKeetaAssetMovementAnchorListForwardingAddressTemplateRequestSigningData(_ignore_input: KeetaAssetMovementAnchorListForwardingAddressTemplateClientRequest | KeetaAssetMovementAnchorListForwardingAddressTemplateRequest): Signable {\n\treturn([ 'list-templates' ]);\n}\n\n\nexport type KeetaAssetMovementAnchorListForwardingAddressTemplateResponse = (({\n\tok: true;\n\ttemplates: PersistentAddressTemplateData[];\n} & PaginationResponseInformation) | {\n\tok: false;\n\terror: string;\n});\n\n\nexport type KeetaPersistentForwardingAddressDetails = {\n\tid?: string;\n\taddress: AddressObfuscated | AddressResolved;\n\tasset?: AssetOrPair;\n\tsourceLocation?: AssetLocationLike;\n\tdestinationLocation?: AssetLocationLike;\n\tdestinationAddress?: AddressResolved | AddressObfuscated;\n\toutgoingRail?: Rail;\n\tincomingRail?: Rail[];\n}\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingClientRequest = {\n\taccount?: KeetaNetAccount;\n\tsourceLocation: AssetLocationLike;\n\tasset: AssetOrPair;\n\toutgoingRail?: Rail;\n} & ({\n\tdestinationLocation: AssetLocationLike;\n\tdestinationAddress: AddressResolved;\n} | {\n\tpersistentAddressTemplateId: string;\n});\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingRequest = {\n\taccount?: ToJSONSerializable<KeetaNetAccount> | undefined;\n\tsigned?: HTTPSignedField;\n\tsourceLocation: AssetLocationCanonical;\n\tasset: AssetOrPairCanonical;\n\toutgoingRail?: Rail | undefined;\n} & ({\n\tdestinationLocation: AssetLocationCanonical;\n\tdestinationAddress: AddressResolved;\n} | {\n\tpersistentAddressTemplateId: string;\n});\n\nexport function getKeetaAssetMovementAnchorCreatePersistentForwardingRequestSigningData(input: KeetaAssetMovementAnchorCreatePersistentForwardingClientRequest | KeetaAssetMovementAnchorCreatePersistentForwardingRequest): Signable {\n\treturn(commonToSignable({\n\t\tsourceLocation: convertAssetLocationInputToCanonical(input.sourceLocation),\n\t\tasset: convertAssetOrPairSearchInputToCanonical(input.asset),\n\t\toutgoingRail: input.outgoingRail,\n\t\t...('destinationLocation' in input ? {\n\t\t\tdestinationLocation: convertAssetLocationInputToCanonical(input.destinationLocation),\n\t\t\tdestinationAddress: input.destinationAddress\n\t\t} : {\n\t\t\tpersistentAddressTemplateId: input.persistentAddressTemplateId\n\t\t})\n\t}))\n}\n\nexport type KeetaAssetMovementAnchorCreatePersistentForwardingResponse = (({\n\tok: true;\n} & KeetaPersistentForwardingAddressDetails) | {\n\tok: false;\n\terror: string;\n});\n\nexport type KeetaAssetMovementAnchorListPersistentForwardingClientRequest = {\n\taccount?: KeetaNetAccount;\n\tsigned?: HTTPSignedField | undefined;\n\tsearch?: {\n\t\tsourceLocation?: AssetLocationLike;\n\t\tdestinationLocation?: AssetLocationLike;\n\t\tasset?: MovableAsset;\n\t\tdestinationAddress?: string;\n\t\tpersistentAddressTemplateId?: string;\n\t}[];\n\tpagination?: PaginationQuery;\n}\n\nexport type KeetaAssetMovementAnchorListPersistentForwardingRequest = {\n\taccount?: ToJSONSerializable<KeetaNetAccount> | undefined;\n\tsigned?: HTTPSignedField | undefined;\n\tsearch?: {\n\t\tsourceLocation?: AssetLocationCanonical | undefined;\n\t\tdestinationLocation?: AssetLocationCanonical | undefined;\n\t\tasset?: MovableAssetSearchCanonical | undefined;\n\t\tdestinationAddress?: string | undefined;\n\t\tpersistentAddressTemplateId?: string | undefined;\n\t}[] | undefined;\n\tpagination?: PaginationQuery | undefined;\n}\n\nexport type KeetaAssetMovementAnchorListPersistentForwardingResponse = (({\n\tok: true;\n\taddresses: KeetaPersistentForwardingAddressDetails[];\n} & PaginationResponseInformation) | {\n\tok: false;\n\terror: string;\n});\n\nexport function getKeetaAssetMovementAnchorListPersistentForwardingRequestSigningData(_ignore_input: KeetaAssetMovementAnchorListPersistentForwardingClientRequest | KeetaAssetMovementAnchorListPersistentForwardingRequest): Signable {\n\treturn([ 'list-persistent-forwarding-addresses' ]);\n}\n\ntype PaginationQuery = {\n\tlimit?: number;\n\toffset?: number;\n}\n\ntype PaginationResponseInformation = {\n\ttotal: string;\n}\n\nexport type KeetaAssetMovementAnchorlistTransactionsClientRequest = {\n\taccount?: KeetaNetAccount;\n\tpersistentAddresses?: ({ location: AssetLocationLike; } & ({ persistentAddress?: string; persistentAddressTemplate: string; } | { persistentAddress: string; persistentAddressTemplate?: string; }))[];\n\tfrom?: { location: AssetLocationLike; userAddress?: string; asset?: MovableAsset; };\n\tto?: { location: AssetLocationLike; userAddress?: string; asset?: MovableAsset; };\n\ttransactions?: { location: AssetLocationLike; transaction: Partial<TransactionId>; }[] | undefined;\n\tpagination?: PaginationQuery;\n}\n\nexport type KeetaAssetMovementAnchorlistTransactionsRequest = {\n\taccount?: ToJSONSerializable<KeetaNetAccount> | undefined;\n\tsigned?: HTTPSignedField | undefined;\n\tpersistentAddresses?: ({ location: AssetLocationCanonical; } & ({ persistentAddress?: string | undefined; persistentAddressTemplate: string; } | { persistentAddress: string; persistentAddressTemplate?: string | undefined; }))[] | undefined;\n\tfrom?: { location: AssetLocationCanonical; userAddress?: string | undefined; asset?: MovableAsset | undefined; } | undefined;\n\tto?: { location: AssetLocationCanonical; userAddress?: string | undefined; asset?: MovableAsset | undefined; } | undefined;\n\ttransactions?: { location: AssetLocationCanonical; transaction: Partial<TransactionId>; }[] | undefined;\n\tpagination?: PaginationQuery | undefined;\n}\n\nexport function getKeetaAssetMovementAnchorlistTransactionsRequestSigningData(_ignore_input: KeetaAssetMovementAnchorlistTransactionsClientRequest | KeetaAssetMovementAnchorlistTransactionsRequest): Signable {\n\treturn([ 'list-transactions' ]);\n}\n\nexport type KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = (({\n\tok: true;\n\ttransactions: KeetaAssetMovementTransaction[];\n} & PaginationResponseInformation) | {\n\tok: false;\n\terror: string;\n});\n\nexport type KeetaAssetMovementAnchorShareKYCClientRequest = {\n\taccount: KeetaNetAccount;\n\tattributes: string | SharableCertificateAttributes;\n\ttosAgreement?: { id: string; };\n}\n\nexport type KeetaAssetMovementAnchorShareKYCRequest = ConvertToExternalRequest<KeetaAssetMovementAnchorShareKYCClientRequest, {\n\tattributes: string;\n}, { signed: HTTPSignedField }>;\n\nexport function getKeetaAssetMovementAnchorShareKYCRequestSigningData(_ignore_input: KeetaAssetMovementAnchorShareKYCClientRequest | KeetaAssetMovementAnchorShareKYCRequest): Signable {\n\treturn([ 'share-kyc' ]);\n}\n\nexport type KeetaAssetMovementAnchorShareKYCResponse = ({\n\tok: true;\n} | {\n\tok: false;\n\terror: string;\n});\n\nexport const assertKeetaSupportedAssets: (input: unknown) => SupportedAssets[] = createAssert<SupportedAssets[]>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingRequest: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingRequest = createAssert<KeetaAssetMovementAnchorCreatePersistentForwardingRequest>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingResponse: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingResponse = createAssertEquals<KeetaAssetMovementAnchorCreatePersistentForwardingResponse>();\nexport const assertKeetaAssetMovementAnchorInitiateTransferRequest: (input: unknown) => KeetaAssetMovementAnchorInitiateTransferRequest = createAssert<KeetaAssetMovementAnchorInitiateTransferRequest>();\nexport const assertKeetaAssetMovementAnchorInitiateTransferResponse: (input: unknown) => KeetaAssetMovementAnchorInitiateTransferResponse = createAssertEquals<KeetaAssetMovementAnchorInitiateTransferResponse>();\nexport const assertKeetaAssetMovementAnchorGetTransferStatusRequest: (input: unknown) => KeetaAssetMovementAnchorGetTransferStatusRequest = createAssert<KeetaAssetMovementAnchorGetTransferStatusRequest>();\nexport const assertKeetaAssetMovementAnchorGetTransferStatusResponse: (input: unknown) => KeetaAssetMovementAnchorGetTransferStatusResponse = createAssertEquals<KeetaAssetMovementAnchorGetTransferStatusResponse>();\nexport const assertKeetaAssetMovementAnchorlistTransactionsRequest: (input: unknown) => KeetaAssetMovementAnchorlistTransactionsRequest = createAssert<KeetaAssetMovementAnchorlistTransactionsRequest>();\nexport const assertKeetaAssetMovementAnchorListPersistentForwardingRequest: (input: unknown) => KeetaAssetMovementAnchorListPersistentForwardingRequest = createAssert<KeetaAssetMovementAnchorListPersistentForwardingRequest>();\nexport const assertKeetaAssetMovementAnchorListPersistentForwardingResponse: (input: unknown) => KeetaAssetMovementAnchorListPersistentForwardingResponse = createAssertEquals<KeetaAssetMovementAnchorListPersistentForwardingResponse>();\nexport const assertKeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse: (input: unknown) => KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = createAssertEquals<KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest = createAssert<KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest>();\nexport const assertKeetaAssetMovementAnchorListForwardingAddressTemplateRequest: (input: unknown) => KeetaAssetMovementAnchorListForwardingAddressTemplateRequest = createAssert<KeetaAssetMovementAnchorListForwardingAddressTemplateRequest>();\nexport const assertKeetaAssetMovementAnchorListForwardingAddressTemplateResponse: (input: unknown) => KeetaAssetMovementAnchorListForwardingAddressTemplateResponse = createAssertEquals<KeetaAssetMovementAnchorListForwardingAddressTemplateResponse>();\nexport const assertKeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse: (input: unknown) => KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse = createAssertEquals<KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse>();\nexport const assertBankAccountAddressObfuscated: (input: unknown) => BankAccountAddressObfuscated = createAssert<BankAccountAddressObfuscated>();\nexport const assertBankAccountAddressResolved: (input: unknown) => BankAccountAddressResolved = createAssert<BankAccountAddressResolved>();\nexport const assertKeetaAssetMovementAnchorShareKYCRequest: (input: unknown) => KeetaAssetMovementAnchorShareKYCRequest = createAssert<KeetaAssetMovementAnchorShareKYCRequest>();\nexport const assertKeetaAssetMovementAnchorShareKYCResponse: (input: unknown) => KeetaAssetMovementAnchorShareKYCResponse = createAssertEquals<KeetaAssetMovementAnchorShareKYCResponse>();\n\nexport const isKeetaAssetMovementAnchorInitiateTransferRequest: (input: unknown) => input is KeetaAssetMovementAnchorInitiateTransferRequest = createIs<KeetaAssetMovementAnchorInitiateTransferRequest>();\nexport const isKeetaAssetMovementAnchorGetTransferStatusRequest: (input: unknown) => input is KeetaAssetMovementAnchorGetTransferStatusRequest = createIs<KeetaAssetMovementAnchorGetTransferStatusRequest>();\nexport const isKeetaAssetMovementAnchorListForwardingAddressTemplateRequest: (input: unknown) => input is KeetaAssetMovementAnchorListForwardingAddressTemplateRequest = createIs<KeetaAssetMovementAnchorListForwardingAddressTemplateRequest>();\nexport const isKeetaAssetMovementAnchorListForwardingAddressTemplateResponse: (input: unknown) => input is KeetaAssetMovementAnchorListForwardingAddressTemplateResponse = createIs<KeetaAssetMovementAnchorListForwardingAddressTemplateResponse>();\nexport const isKeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse: (input: unknown) => input is KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse = createIs<KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse>();\nexport const isKeetaAssetMovementAnchorCreatePersistentForwardingResponse: (input: unknown) => input is KeetaAssetMovementAnchorCreatePersistentForwardingResponse = createIs<KeetaAssetMovementAnchorCreatePersistentForwardingResponse>();\nexport const isKeetaAssetMovementAnchorInitiateTransferResponse: (input: unknown) => input is KeetaAssetMovementAnchorInitiateTransferResponse = createIs<KeetaAssetMovementAnchorInitiateTransferResponse>();\nexport const isKeetaAssetMovementAnchorGetExchangeStatusResponse: (input: unknown) => input is KeetaAssetMovementAnchorGetTransferStatusResponse = createIs<KeetaAssetMovementAnchorGetTransferStatusResponse>();\nexport const isKeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse: (input: unknown) => input is KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse = createIs<KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse>();\nexport const isKeetaAssetMovementAnchorShareKYCResponse: (input: unknown) => input is KeetaAssetMovementAnchorShareKYCResponse = createIs<KeetaAssetMovementAnchorShareKYCResponse>();\n\ntype Account = InstanceType<typeof KeetaNet.lib.Account<Exclude<AccountKeyAlgorithm, IdentifierKeyAlgorithm>>>;\n\ntype KeetaAssetMovementAnchorKYCShareNeededErrorTOSFlow = {\n\ttype: 'url-flow';\n\turl: string;\n}\n\ninterface KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties {\n\ttosFlow: KeetaAssetMovementAnchorKYCShareNeededErrorTOSFlow | undefined;\n\tneededAttributes: string[] | undefined;\n\tshareWithPrincipals: ReturnType<Account['publicKeyString']['get']>[];\n\tacceptedIssuers: string[];\n}\n\nexport const assertKeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties: (input: unknown) => KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties = createAssertEquals<KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties>();\n\n\n\ntype KeetaAssetMovementAnchorKYCShareNeededErrorJSON = ReturnType<KeetaAnchorUserError['toJSON']> & KeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties;\n\ntype KeetaNetCertificate = InstanceType<typeof KeetaNet.lib.Utils.Certificate.Certificate>\nclass KeetaAssetMovementAnchorKYCShareNeededError extends KeetaAnchorUserError {\n\tstatic override readonly name: string = 'KeetaAssetMovementAnchorKYCShareNeededError';\n\tprivate readonly KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID!: string;\n\tprivate static readonly KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID = '3f4d6acd-8915-40de-94fa-4c6c48c01623';\n\n\treadonly shareWithPrincipals: Account[];\n\treadonly neededAttributes: string[] | undefined;\n\treadonly tosFlow: KeetaAssetMovementAnchorKYCShareNeededErrorTOSFlow | undefined;\n\treadonly acceptedIssuers: KeetaNetCertificate[];\n\n\tconstructor(args: {\n\t\tneededAttributes?: string[] | undefined;\n\t\tshareWithPrincipals: Account[];\n\t\ttosFlow?: KeetaAssetMovementAnchorKYCShareNeededErrorTOSFlow | undefined;\n\t\tacceptedIssuers: KeetaNetCertificate[];\n\t}, message?: string) {\n\t\tsuper(message ?? 'User Not Onboarded to Asset Movement Service');\n\t\tthis.statusCode = 403;\n\n\t\tObject.defineProperty(this, 'KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID', {\n\t\t\tvalue: KeetaAssetMovementAnchorKYCShareNeededError.KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID,\n\t\t\tenumerable: false\n\t\t});\n\n\t\tthis.neededAttributes = args.neededAttributes;\n\t\tthis.tosFlow = args.tosFlow;\n\t\tthis.shareWithPrincipals = args.shareWithPrincipals;\n\t\tthis.acceptedIssuers = args.acceptedIssuers;\n\t}\n\n\tstatic isInstance(input: unknown): input is KeetaAssetMovementAnchorKYCShareNeededError {\n\t\treturn(this.hasPropWithValue(input, 'KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID', KeetaAssetMovementAnchorKYCShareNeededError.KeetaAssetMovementAnchorKYCShareNeededErrorObjectTypeID));\n\t}\n\n\n\tasErrorResponse(contentType: 'text/plain' | 'application/json'): { error: string; statusCode: number; contentType: string } {\n\t\tconst { tosFlow, neededAttributes, shareWithPrincipals, acceptedIssuers } = this.toJSON();\n\n\t\tlet message = this.message;\n\t\tif (contentType === 'application/json') {\n\t\t\tmessage = JSON.stringify({\n\t\t\t\tok: false,\n\t\t\t\tname: this.name,\n\t\t\t\tcode: 'KEETA_ANCHOR_ASSET_MOVEMENT_KYC_SHARE_NEEDED',\n\t\t\t\tdata: { tosFlow, neededAttributes, shareWithPrincipals, acceptedIssuers },\n\t\t\t\terror: this.message\n\t\t\t});\n\t\t}\n\n\t\treturn({\n\t\t\terror: message,\n\t\t\tstatusCode: this.statusCode,\n\t\t\tcontentType: contentType\n\t\t});\n\t}\n\n\ttoJSON(): KeetaAssetMovementAnchorKYCShareNeededErrorJSON {\n\t\treturn({\n\t\t\t...super.toJSON(),\n\t\t\ttosFlow: this.tosFlow,\n\t\t\tneededAttributes: this.neededAttributes,\n\t\t\tshareWithPrincipals: this.shareWithPrincipals.map(function(account) {\n\t\t\t\treturn(account.publicKeyString.get());\n\t\t\t}),\n\t\t\tacceptedIssuers: this.acceptedIssuers.map(function(cert) {\n\t\t\t\treturn(cert.toString());\n\t\t\t})\n\t\t});\n\t}\n\n\tstatic async fromJSON(input: unknown): Promise<KeetaAssetMovementAnchorKYCShareNeededError> {\n\t\tconst { message, other } = this.extractErrorProperties(input, this);\n\n\t\tif (!('data' in other)) {\n\t\t\tthrow(new Error('Invalid KeetaAssetMovementAnchorKYCShareNeededError JSON: missing data property'));\n\t\t}\n\n\t\tconst parsed = assertKeetaAssetMovementAnchorKYCShareNeededErrorJSONProperties(other.data);\n\n\t\tconst error = new this(\n\t\t\t{\n\t\t\t\tshareWithPrincipals: parsed.shareWithPrincipals.map(function(pubKeyString) {\n\t\t\t\t\treturn(KeetaNet.lib.Account.fromPublicKeyString(pubKeyString).assertAccount());\n\t\t\t\t}),\n\t\t\t\tneededAttributes: parsed.neededAttributes,\n\t\t\t\ttosFlow: parsed.tosFlow,\n\t\t\t\tacceptedIssuers: parsed.acceptedIssuers.map(function(certString) {\n\t\t\t\t\treturn(new KeetaNet.lib.Utils.Certificate.Certificate(certString));\n\t\t\t\t})\n\t\t\t},\n\t\t\tmessage\n\t\t);\n\n\t\terror.restoreFromJSON(other);\n\t\treturn(error);\n\t}\n}\n\nexport const Errors: {\n\tKYCShareNeeded: typeof KeetaAssetMovementAnchorKYCShareNeededError;\n} = {\n\t/**\n\t * The user is required to share KYC details\n\t */\n\tKYCShareNeeded: KeetaAssetMovementAnchorKYCShareNeededError\n};\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import * as KeetaAnchorHTTPServer from '../../lib/http-server.js';
|
|
2
|
-
import
|
|
3
|
-
import type { KeetaAssetMovementAnchorCreatePersistentForwardingRequest, KeetaAssetMovementAnchorCreatePersistentForwardingResponse, KeetaAssetMovementAnchorInitiateTransferRequest, KeetaAssetMovementAnchorInitiateTransferResponse, KeetaAssetMovementAnchorGetTransferStatusResponse, KeetaAssetMovementAnchorlistTransactionsRequest, KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse } from './common.ts';
|
|
1
|
+
import * as KeetaAnchorHTTPServer from '../../lib/http-server/index.js';
|
|
2
|
+
import { KeetaNet } from '../../client/index.js';
|
|
3
|
+
import type { KeetaAssetMovementAnchorCreatePersistentForwardingRequest, KeetaAssetMovementAnchorCreatePersistentForwardingResponse, KeetaAssetMovementAnchorInitiateTransferRequest, KeetaAssetMovementAnchorInitiateTransferResponse, KeetaAssetMovementAnchorGetTransferStatusResponse, KeetaAssetMovementAnchorlistTransactionsRequest, KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse, KeetaAssetMovementAnchorListPersistentForwardingRequest, KeetaAssetMovementAnchorListPersistentForwardingResponse, KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse, KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest, KeetaAssetMovementAnchorListForwardingAddressTemplateRequest, KeetaAssetMovementAnchorListForwardingAddressTemplateResponse, KeetaAssetMovementAnchorShareKYCRequest, KeetaAssetMovementAnchorShareKYCResponse } from './common.ts';
|
|
4
4
|
import type { ServiceMetadata } from '../../lib/resolver.ts';
|
|
5
|
+
import type Account from '@keetanetwork/keetanet-client/lib/account.js';
|
|
6
|
+
import type { ExtractOk } from '../../lib/http-server/common.js';
|
|
5
7
|
export interface KeetaAnchorAssetMovementServerConfig extends KeetaAnchorHTTPServer.KeetaAnchorHTTPServerConfig {
|
|
6
8
|
/**
|
|
7
9
|
* The data to use for the index page (optional)
|
|
@@ -23,30 +25,39 @@ export interface KeetaAnchorAssetMovementServerConfig extends KeetaAnchorHTTPSer
|
|
|
23
25
|
* Supported assets and their configurations
|
|
24
26
|
*/
|
|
25
27
|
supportedAssets: NonNullable<ServiceMetadata['services']['assetMovement']>[string]['supportedAssets'];
|
|
28
|
+
authenticationRequired?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Method to create a persistent forwarding address template
|
|
31
|
+
*/
|
|
32
|
+
createPersistentForwardingTemplate?: (request: KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorCreatePersistentForwardingAddressTemplateResponse>>;
|
|
33
|
+
/**
|
|
34
|
+
* Method to list persistent forwarding address templates
|
|
35
|
+
*/
|
|
36
|
+
listPersistentForwardingTemplate?: (request: KeetaAssetMovementAnchorListForwardingAddressTemplateRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorListForwardingAddressTemplateResponse>>;
|
|
26
37
|
/**
|
|
27
38
|
* Method to create a persistent forwarding address
|
|
28
39
|
*/
|
|
29
|
-
createPersistentForwarding?: (request: KeetaAssetMovementAnchorCreatePersistentForwardingRequest) => Promise<
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
createPersistentForwarding?: (request: KeetaAssetMovementAnchorCreatePersistentForwardingRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorCreatePersistentForwardingResponse>>;
|
|
41
|
+
/**
|
|
42
|
+
* Method to list persistent forwarding addresses
|
|
43
|
+
*/
|
|
44
|
+
listPersistentForwarding?: (request: KeetaAssetMovementAnchorListPersistentForwardingRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorListPersistentForwardingResponse>>;
|
|
32
45
|
/**
|
|
33
46
|
* Method to initiate a transfer
|
|
34
47
|
*/
|
|
35
|
-
initiateTransfer?: (request: KeetaAssetMovementAnchorInitiateTransferRequest) => Promise<
|
|
36
|
-
ok: true;
|
|
37
|
-
}>, 'ok'>>;
|
|
48
|
+
initiateTransfer?: (request: KeetaAssetMovementAnchorInitiateTransferRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorInitiateTransferResponse>>;
|
|
38
49
|
/**
|
|
39
50
|
* Method to get the status of a transfer
|
|
40
51
|
*/
|
|
41
|
-
getTransferStatus?: (id: string) => Promise<
|
|
42
|
-
ok: true;
|
|
43
|
-
}>, 'ok'>>;
|
|
52
|
+
getTransferStatus?: (id: string, account: Account.Account | null) => Promise<ExtractOk<KeetaAssetMovementAnchorGetTransferStatusResponse>>;
|
|
44
53
|
/**
|
|
45
54
|
* Method to list transactions
|
|
46
55
|
*/
|
|
47
|
-
listTransactions?: (request: KeetaAssetMovementAnchorlistTransactionsRequest) => Promise<
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
listTransactions?: (request: KeetaAssetMovementAnchorlistTransactionsRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorlistPersistentForwardingTransactionsResponse>>;
|
|
57
|
+
/**
|
|
58
|
+
* Method to share KYC (Know Your Customer) information
|
|
59
|
+
*/
|
|
60
|
+
shareKYC?: (request: KeetaAssetMovementAnchorShareKYCRequest) => Promise<ExtractOk<KeetaAssetMovementAnchorShareKYCResponse>>;
|
|
50
61
|
};
|
|
51
62
|
}
|
|
52
63
|
export declare class KeetaNetAssetMovementAnchorHTTPServer extends KeetaAnchorHTTPServer.KeetaNetAnchorHTTPServer<KeetaAnchorAssetMovementServerConfig> implements Required<KeetaAnchorAssetMovementServerConfig> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/services/asset-movement/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/services/asset-movement/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD,OAAO,KAAK,EACX,yDAAyD,EACzD,0DAA0D,EAC1D,+CAA+C,EAC/C,gDAAgD,EAChD,iDAAiD,EACjD,+CAA+C,EAC/C,oEAAoE,EACpE,uDAAuD,EACvD,wDAAwD,EACxD,yEAAyE,EACzE,wEAAwE,EACxE,4DAA4D,EAC5D,6DAA6D,EAC7D,uCAAuC,EACvC,wCAAwC,EACxC,MAAM,aAAa,CAAC;AA4BrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,OAAO,MAAM,8CAA8C,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAgC,MAAM,iCAAiC,CAAC;AAI/F,MAAM,WAAW,oCAAqC,SAAQ,qBAAqB,CAAC,2BAA2B;IAC9G;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,EAAE;QAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;QAAC,OAAO,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