@airgap/acurast 0.13.26-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +7 -0
- package/index.d.ts +1 -0
- package/index.js +18 -0
- package/index.js.map +1 -0
- package/package.json +64 -0
- package/readme.md +121 -0
- package/v1/controller/AcurastAccountController.d.ts +5 -0
- package/v1/controller/AcurastAccountController.js +28 -0
- package/v1/controller/AcurastAccountController.js.map +1 -0
- package/v1/controller/AcurastTransactionController.d.ts +5 -0
- package/v1/controller/AcurastTransactionController.js +28 -0
- package/v1/controller/AcurastTransactionController.js.map +1 -0
- package/v1/index.d.ts +8 -0
- package/v1/index.js +8 -0
- package/v1/index.js.map +1 -0
- package/v1/module/AcurastModule.d.ts +19 -0
- package/v1/module/AcurastModule.js +107 -0
- package/v1/module/AcurastModule.js.map +1 -0
- package/v1/module.d.ts +3 -0
- package/v1/module.js +24 -0
- package/v1/module.js.map +1 -0
- package/v1/node/AcurastNodeClient.d.ts +4 -0
- package/v1/node/AcurastNodeClient.js +28 -0
- package/v1/node/AcurastNodeClient.js.map +1 -0
- package/v1/protocol/AcurastBaseProtocol.d.ts +13 -0
- package/v1/protocol/AcurastBaseProtocol.js +96 -0
- package/v1/protocol/AcurastBaseProtocol.js.map +1 -0
- package/v1/protocol/AcurastProtocol.d.ts +14 -0
- package/v1/protocol/AcurastProtocol.js +110 -0
- package/v1/protocol/AcurastProtocol.js.map +1 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +7 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +21 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-acurast.d.ts +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-acurast.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-acurast.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-acurast.d.ts +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-acurast.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-acurast.js.map +1 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-acurast.json +36 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-acurast.json +19 -0
- package/v1/serializer/v3/serializer-companion.d.ts +14 -0
- package/v1/serializer/v3/serializer-companion.js +171 -0
- package/v1/serializer/v3/serializer-companion.js.map +1 -0
- package/v1/serializer/v3/validators/transaction-validator.d.ts +4 -0
- package/v1/serializer/v3/validators/transaction-validator.js +28 -0
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -0
- package/v1/serializer/v3/validators/validators.d.ts +4 -0
- package/v1/serializer/v3/validators/validators.js +6 -0
- package/v1/serializer/v3/validators/validators.js.map +1 -0
- package/v1/types/configuration.d.ts +4 -0
- package/v1/types/configuration.js +3 -0
- package/v1/types/configuration.js.map +1 -0
- package/v1/types/crypto.d.ts +2 -0
- package/v1/types/crypto.js +3 -0
- package/v1/types/crypto.js.map +1 -0
- package/v1/types/protocol.d.ts +11 -0
- package/v1/types/protocol.js +3 -0
- package/v1/types/protocol.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcurastBaseProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/AcurastBaseProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAO6B;AAE7B,mFAAiF;AACjF,2FAAyF;AACzF,+DAA6D;AAU7D,gBAAgB;AAEhB;IACU,2CAOP;IAGD,iCAAmB,OAA2C;QAC5D,IAAM,UAAU,GAAsB,IAAI,qCAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAE1G,IAAM,iBAAiB,GAA6B,IAAI,mDAAwB,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;QACnH,IAAM,qBAAqB,GAAiC,IAAI,2DAA4B,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;QAE/H,IAAM,aAAa,GAA+B,IAAI,+BAA0B,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;eAElH,kBAAM,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,aAAa,CAAC;IACrF,CAAC;IAEe,+DAA6B,GAA7C,UACE,SAAmD,EACnD,SAA+B;;;;;4BAEf,qBAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,EAAA;;wBAA5D,OAAO,GAAG,SAAkD;wBAE5D,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;wBAE5E,oBAAoB,GAAoE,EAAE,CAAA;wBAEhG,IAAI,SAAS,KAAK,UAAU,EAAE;4BAC5B,oBAAoB,CAAC,IAAI,CAAC;gCACxB,UAAU;gCACV;oCACE,EAAE,EAAE,yBAAoB,CAAC,iBAAiB,EAAE;oCAC5C,KAAK,EAAE,mBAAmB;iCAC3B;6BACF,CAAC,CAAA;yBACH;wBAED,sBAAO,oBAAoB,EAAA;;;;KAC5B;IACH,8BAAC;AAAD,CAAC,AA5CD,CACU,0BAAqB,GA2C9B;AA5CqB,0DAAuB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProtocolMetadata, RecursivePartial } from '@airgap/module-kit';
|
|
2
|
+
import { AcurastProtocolConfiguration } from '../types/configuration';
|
|
3
|
+
import { AcurastProtocolNetwork, AcurastProtocolOptions, AcurastUnits } from '../types/protocol';
|
|
4
|
+
import { AcurastBaseProtocol, AcurastBaseProtocolImpl } from './AcurastBaseProtocol';
|
|
5
|
+
export interface AcurastProtocol extends AcurastBaseProtocol<AcurastUnits> {
|
|
6
|
+
}
|
|
7
|
+
export declare const ACURAST_METADATA: ProtocolMetadata<AcurastUnits>;
|
|
8
|
+
export declare const ACURAST_CONFIGURATION: AcurastProtocolConfiguration;
|
|
9
|
+
export declare class AcurastProtocolImpl extends AcurastBaseProtocolImpl<AcurastUnits> implements AcurastProtocol {
|
|
10
|
+
constructor(options?: RecursivePartial<AcurastProtocolOptions>);
|
|
11
|
+
}
|
|
12
|
+
export declare function createAcurastProtocol(options?: RecursivePartial<AcurastProtocolOptions>): AcurastProtocol;
|
|
13
|
+
export declare const ACURAST_MAINNET_PROTOCOL_NETWORK: AcurastProtocolNetwork;
|
|
14
|
+
export declare function createAcurastProtocolOptions(network?: Partial<AcurastProtocolNetwork>): AcurastProtocolOptions;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.createAcurastProtocolOptions = exports.ACURAST_MAINNET_PROTOCOL_NETWORK = exports.createAcurastProtocol = exports.AcurastProtocolImpl = exports.ACURAST_CONFIGURATION = exports.ACURAST_METADATA = void 0;
|
|
30
|
+
var coinlib_core_1 = require("@airgap/coinlib-core");
|
|
31
|
+
var AcurastBaseProtocol_1 = require("./AcurastBaseProtocol");
|
|
32
|
+
// Implementation
|
|
33
|
+
exports.ACURAST_METADATA = {
|
|
34
|
+
identifier: coinlib_core_1.MainProtocolSymbols.ACURAST,
|
|
35
|
+
name: 'Acurast',
|
|
36
|
+
units: {
|
|
37
|
+
caCU: {
|
|
38
|
+
symbol: { value: 'daCU' },
|
|
39
|
+
decimals: 12
|
|
40
|
+
},
|
|
41
|
+
mcaCU: {
|
|
42
|
+
symbol: { value: 'mdaCU' },
|
|
43
|
+
decimals: 9
|
|
44
|
+
},
|
|
45
|
+
ucaCU: {
|
|
46
|
+
symbol: { value: 'udaCU' },
|
|
47
|
+
decimals: 6
|
|
48
|
+
},
|
|
49
|
+
ncaCU: {
|
|
50
|
+
symbol: { value: 'ncaCU' },
|
|
51
|
+
decimals: 3
|
|
52
|
+
},
|
|
53
|
+
pcaCU: {
|
|
54
|
+
symbol: { value: 'pcaCU' },
|
|
55
|
+
decimals: 0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mainUnit: 'caCU',
|
|
59
|
+
account: {
|
|
60
|
+
standardDerivationPath: "m/44'/434'/0'/0/0",
|
|
61
|
+
address: {
|
|
62
|
+
isCaseSensitive: true,
|
|
63
|
+
placeholder: "C/D/E/F/G/H/J...",
|
|
64
|
+
regex: '^[C-HJ][a-km-zA-HJ-NP-Z1-9]+$'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.ACURAST_CONFIGURATION = {
|
|
69
|
+
account: {
|
|
70
|
+
type: 'ss58',
|
|
71
|
+
format: 42
|
|
72
|
+
},
|
|
73
|
+
transaction: {
|
|
74
|
+
types: {}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var AcurastProtocolImpl = /** @class */ (function (_super) {
|
|
78
|
+
__extends(AcurastProtocolImpl, _super);
|
|
79
|
+
function AcurastProtocolImpl(options) {
|
|
80
|
+
if (options === void 0) { options = {}; }
|
|
81
|
+
var completeOptions = createAcurastProtocolOptions(options.network);
|
|
82
|
+
var metadata = exports.ACURAST_METADATA;
|
|
83
|
+
var configuration = exports.ACURAST_CONFIGURATION;
|
|
84
|
+
return _super.call(this, { metadata: metadata, configuration: configuration, network: completeOptions.network }) || this;
|
|
85
|
+
}
|
|
86
|
+
return AcurastProtocolImpl;
|
|
87
|
+
}(AcurastBaseProtocol_1.AcurastBaseProtocolImpl));
|
|
88
|
+
exports.AcurastProtocolImpl = AcurastProtocolImpl;
|
|
89
|
+
// Factory
|
|
90
|
+
function createAcurastProtocol(options) {
|
|
91
|
+
if (options === void 0) { options = {}; }
|
|
92
|
+
return new AcurastProtocolImpl(options);
|
|
93
|
+
}
|
|
94
|
+
exports.createAcurastProtocol = createAcurastProtocol;
|
|
95
|
+
exports.ACURAST_MAINNET_PROTOCOL_NETWORK = {
|
|
96
|
+
name: 'Devnet',
|
|
97
|
+
type: 'custom',
|
|
98
|
+
rpcUrl: 'https://rpc.collator-1.acurast.papers.tech',
|
|
99
|
+
blockExplorerUrl: 'https://polkadot.js.org/apps/?rpc=wss://wss.collator-1.acurast.papers.tech#/explorer',
|
|
100
|
+
blockExplorerApi: ''
|
|
101
|
+
};
|
|
102
|
+
var DEFAULT_ACURAST_PROTOCOL_NETWORK = exports.ACURAST_MAINNET_PROTOCOL_NETWORK;
|
|
103
|
+
function createAcurastProtocolOptions(network) {
|
|
104
|
+
if (network === void 0) { network = {}; }
|
|
105
|
+
return {
|
|
106
|
+
network: __assign(__assign({}, DEFAULT_ACURAST_PROTOCOL_NETWORK), network)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
exports.createAcurastProtocolOptions = createAcurastProtocolOptions;
|
|
110
|
+
//# sourceMappingURL=AcurastProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcurastProtocol.js","sourceRoot":"","sources":["../../../src/v1/protocol/AcurastProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA0D;AAK1D,6DAAoF;AAKpF,iBAAiB;AAEJ,QAAA,gBAAgB,GAAmC;IAC9D,UAAU,EAAE,kCAAmB,CAAC,OAAO;IACvC,IAAI,EAAE,SAAS;IAEf,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YACzB,QAAQ,EAAE,EAAE;SACb;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,QAAQ,EAAE,CAAC;SACZ;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,QAAQ,EAAE,CAAC;SACZ;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,QAAQ,EAAE,CAAC;SACZ;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YAC1B,QAAQ,EAAE,CAAC;SACZ;KACF;IACD,QAAQ,EAAE,MAAM;IAEhB,OAAO,EAAE;QACP,sBAAsB,EAAE,mBAAmB;QAC3C,OAAO,EAAE;YACP,eAAe,EAAE,IAAI;YACrB,WAAW,EAAE,kBAAkB;YAC/B,KAAK,EAAE,+BAA+B;SACvC;KACF;CACF,CAAA;AAEY,QAAA,qBAAqB,GAAiC;IACjE,OAAO,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,EAAE;KACX;IACD,WAAW,EAAE;QACX,KAAK,EAAE,EAAE;KACV;CACF,CAAA;AAED;IAAyC,uCAAqC;IAC5E,6BAAmB,OAAsD;QAAtD,wBAAA,EAAA,YAAsD;QACvE,IAAM,eAAe,GAA2B,4BAA4B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAE7F,IAAM,QAAQ,GAAmC,wBAAgB,CAAA;QACjE,IAAM,aAAa,GAAiC,6BAAqB,CAAA;eAEzE,kBAAM,EAAE,QAAQ,UAAA,EAAE,aAAa,eAAA,EAAE,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,CAAC;IACtE,CAAC;IACH,0BAAC;AAAD,CAAC,AATD,CAAyC,6CAAuB,GAS/D;AATY,kDAAmB;AAWhC,UAAU;AAEV,SAAgB,qBAAqB,CAAC,OAAsD;IAAtD,wBAAA,EAAA,YAAsD;IAC1F,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAFD,sDAEC;AAEY,QAAA,gCAAgC,GAA2B;IACtE,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,4CAA4C;IACpD,gBAAgB,EAAE,sFAAsF;IACxG,gBAAgB,EAAE,EAAE;CACrB,CAAA;AAED,IAAM,gCAAgC,GAA2B,wCAAgC,CAAA;AAEjG,SAAgB,4BAA4B,CAAC,OAA6C;IAA7C,wBAAA,EAAA,YAA6C;IACxF,OAAO;QACL,OAAO,wBAAO,gCAAgC,GAAK,OAAO,CAAE;KAC7D,CAAA;AACH,CAAC;AAJD,oEAIC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SubstrateSignedTransaction, SubstrateUnsignedTransaction } from '@airgap/substrate/v1';
|
|
2
|
+
import { AcurastTransactionSignRequest } from '../definitions/transaction-sign-request-acurast';
|
|
3
|
+
import { AcurastTransactionSignResponse } from '../definitions/transaction-sign-response-acurast';
|
|
4
|
+
export declare function acurastUnsignedTransactionToRequest(unsigned: SubstrateUnsignedTransaction, publicKey: string, callbackUrl?: string): AcurastTransactionSignRequest;
|
|
5
|
+
export declare function acurastSignedTransactionToResponse(signed: SubstrateSignedTransaction, accountIdentifier: string): AcurastTransactionSignResponse;
|
|
6
|
+
export declare function acurastTransactionSignRequestToUnsigned(request: AcurastTransactionSignRequest): SubstrateUnsignedTransaction;
|
|
7
|
+
export declare function acurastTransactionSignResponseToSigned(response: AcurastTransactionSignResponse): SubstrateSignedTransaction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.acurastTransactionSignResponseToSigned = exports.acurastTransactionSignRequestToUnsigned = exports.acurastSignedTransactionToResponse = exports.acurastUnsignedTransactionToRequest = void 0;
|
|
4
|
+
var v1_1 = require("@airgap/substrate/v1");
|
|
5
|
+
function acurastUnsignedTransactionToRequest(unsigned, publicKey, callbackUrl) {
|
|
6
|
+
return (0, v1_1.substrateUnsignedTransactionToRequest)(unsigned, publicKey, callbackUrl);
|
|
7
|
+
}
|
|
8
|
+
exports.acurastUnsignedTransactionToRequest = acurastUnsignedTransactionToRequest;
|
|
9
|
+
function acurastSignedTransactionToResponse(signed, accountIdentifier) {
|
|
10
|
+
return (0, v1_1.substrateSignedTransactionToResponse)(signed, accountIdentifier);
|
|
11
|
+
}
|
|
12
|
+
exports.acurastSignedTransactionToResponse = acurastSignedTransactionToResponse;
|
|
13
|
+
function acurastTransactionSignRequestToUnsigned(request) {
|
|
14
|
+
return (0, v1_1.substrateTransactionSignRequestToUnsigned)(request);
|
|
15
|
+
}
|
|
16
|
+
exports.acurastTransactionSignRequestToUnsigned = acurastTransactionSignRequestToUnsigned;
|
|
17
|
+
function acurastTransactionSignResponseToSigned(response) {
|
|
18
|
+
return (0, v1_1.substrateTransactionSignResponseToSigned)(response);
|
|
19
|
+
}
|
|
20
|
+
exports.acurastTransactionSignResponseToSigned = acurastTransactionSignResponseToSigned;
|
|
21
|
+
//# sourceMappingURL=transaction-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-converter.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/converter/transaction-converter.ts"],"names":[],"mappings":";;;AAAA,2CAO6B;AAK7B,SAAgB,mCAAmC,CACjD,QAAsC,EACtC,SAAiB,EACjB,WAAoB;IAEpB,OAAO,IAAA,0CAAqC,EAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;AAChF,CAAC;AAND,kFAMC;AAED,SAAgB,kCAAkC,CAChD,MAAkC,EAClC,iBAAyB;IAEzB,OAAO,IAAA,yCAAoC,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AACxE,CAAC;AALD,gFAKC;AAED,SAAgB,uCAAuC,CAAC,OAAsC;IAC5F,OAAO,IAAA,8CAAyC,EAAC,OAAO,CAAC,CAAA;AAC3D,CAAC;AAFD,0FAEC;AAED,SAAgB,sCAAsC,CAAC,QAAwC;IAC7F,OAAO,IAAA,6CAAwC,EAAC,QAAQ,CAAC,CAAA;AAC3D,CAAC;AAFD,wFAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-sign-request-acurast.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/definitions/transaction-sign-request-acurast.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-sign-response-acurast.js","sourceRoot":"","sources":["../../../../../../src/v1/serializer/v3/schemas/definitions/transaction-sign-response-acurast.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/AcurastTransactionSignRequest",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AcurastTransactionSignRequest": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"callbackURL": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"publicKey": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"transaction": {
|
|
15
|
+
"$ref": "#/definitions/SubstrateUnsignedTransaction"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["publicKey", "transaction"],
|
|
19
|
+
"type": "object"
|
|
20
|
+
},
|
|
21
|
+
"SubstrateUnsignedTransaction": {
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"properties": {
|
|
24
|
+
"encoded": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"type": {
|
|
28
|
+
"enum": ["unsigned"],
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["encoded", "type"],
|
|
33
|
+
"type": "object"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/Acurast",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AcurastTransactionSignResponse": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"accountIdentifier": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"transaction": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["accountIdentifier", "transaction"],
|
|
16
|
+
"type": "object"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AirGapV3SerializerCompanion, SignedTransaction, UnsignedTransaction } from '@airgap/module-kit';
|
|
2
|
+
import { V3SchemaConfiguration } from '@airgap/module-kit/types/serializer';
|
|
3
|
+
import { TransactionSignRequest, TransactionSignResponse } from '@airgap/serializer';
|
|
4
|
+
export declare class AcurastV3SerializerCompanion implements AirGapV3SerializerCompanion {
|
|
5
|
+
readonly schemas: V3SchemaConfiguration[];
|
|
6
|
+
private readonly acurastTransactionValidator;
|
|
7
|
+
constructor();
|
|
8
|
+
toTransactionSignRequest(identifier: string, unsignedTransaction: UnsignedTransaction, publicKey: string, callbackUrl?: string): Promise<TransactionSignRequest>;
|
|
9
|
+
fromTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<UnsignedTransaction>;
|
|
10
|
+
validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean>;
|
|
11
|
+
toTransactionSignResponse(identifier: string, signedTransaction: SignedTransaction, accountIdentifier: string): Promise<TransactionSignResponse>;
|
|
12
|
+
fromTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<SignedTransaction>;
|
|
13
|
+
validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.AcurastV3SerializerCompanion = void 0;
|
|
40
|
+
var coinlib_core_1 = require("@airgap/coinlib-core");
|
|
41
|
+
var validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
|
|
42
|
+
var errors_1 = require("@airgap/coinlib-core/errors");
|
|
43
|
+
var serializer_1 = require("@airgap/serializer");
|
|
44
|
+
var transaction_converter_1 = require("./schemas/converter/transaction-converter");
|
|
45
|
+
var transaction_validator_1 = require("./validators/transaction-validator");
|
|
46
|
+
var validators_1 = require("./validators/validators");
|
|
47
|
+
var acurastTransactionSignRequest = require('./schemas/generated/transaction-sign-request-acurast.json');
|
|
48
|
+
var acurastTransactionSignResponse = require('./schemas/generated/transaction-sign-response-acurast.json');
|
|
49
|
+
var AcurastV3SerializerCompanion = /** @class */ (function () {
|
|
50
|
+
function AcurastV3SerializerCompanion() {
|
|
51
|
+
this.schemas = [
|
|
52
|
+
{
|
|
53
|
+
type: serializer_1.IACMessageType.TransactionSignRequest,
|
|
54
|
+
schema: { schema: acurastTransactionSignRequest },
|
|
55
|
+
protocolIdentifier: coinlib_core_1.MainProtocolSymbols.ACURAST
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: serializer_1.IACMessageType.TransactionSignResponse,
|
|
59
|
+
schema: { schema: acurastTransactionSignResponse },
|
|
60
|
+
protocolIdentifier: coinlib_core_1.MainProtocolSymbols.ACURAST
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
this.acurastTransactionValidator = new transaction_validator_1.AcurastTransactionValidator();
|
|
64
|
+
Object.keys(validators_1.acurastValidators).forEach(function (key) {
|
|
65
|
+
validate_1.validators[key] = validators_1.acurastValidators[key];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
AcurastV3SerializerCompanion.prototype.toTransactionSignRequest = function (identifier, unsignedTransaction, publicKey, callbackUrl) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
72
|
+
return [2 /*return*/, (0, transaction_converter_1.acurastUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
76
|
+
}
|
|
77
|
+
return [2 /*return*/];
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
AcurastV3SerializerCompanion.prototype.fromTransactionSignRequest = function (identifier, transactionSignRequest) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
return __generator(this, function (_a) {
|
|
84
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
85
|
+
return [2 /*return*/, (0, transaction_converter_1.acurastTransactionSignRequestToUnsigned)(transactionSignRequest)];
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
89
|
+
}
|
|
90
|
+
return [2 /*return*/];
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
AcurastV3SerializerCompanion.prototype.validateTransactionSignRequest = function (identifier, transactionSignRequest) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var _a;
|
|
97
|
+
return __generator(this, function (_b) {
|
|
98
|
+
switch (_b.label) {
|
|
99
|
+
case 0:
|
|
100
|
+
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST)) return [3 /*break*/, 5];
|
|
101
|
+
_b.label = 1;
|
|
102
|
+
case 1:
|
|
103
|
+
_b.trys.push([1, 3, , 4]);
|
|
104
|
+
return [4 /*yield*/, this.acurastTransactionValidator.validateUnsignedTransaction(transactionSignRequest)];
|
|
105
|
+
case 2:
|
|
106
|
+
_b.sent();
|
|
107
|
+
return [2 /*return*/, true];
|
|
108
|
+
case 3:
|
|
109
|
+
_a = _b.sent();
|
|
110
|
+
return [2 /*return*/, false];
|
|
111
|
+
case 4: return [3 /*break*/, 6];
|
|
112
|
+
case 5: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
113
|
+
case 6: return [2 /*return*/];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
AcurastV3SerializerCompanion.prototype.toTransactionSignResponse = function (identifier, signedTransaction, accountIdentifier) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
122
|
+
return [2 /*return*/, (0, transaction_converter_1.acurastSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
126
|
+
}
|
|
127
|
+
return [2 /*return*/];
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
AcurastV3SerializerCompanion.prototype.fromTransactionSignResponse = function (identifier, transactionSignResponse) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
if (identifier === coinlib_core_1.MainProtocolSymbols.ACURAST) {
|
|
135
|
+
return [2 /*return*/, (0, transaction_converter_1.acurastTransactionSignResponseToSigned)(transactionSignResponse)];
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
139
|
+
}
|
|
140
|
+
return [2 /*return*/];
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
AcurastV3SerializerCompanion.prototype.validateTransactionSignResponse = function (identifier, transactionSignResponse) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
+
var _a;
|
|
147
|
+
return __generator(this, function (_b) {
|
|
148
|
+
switch (_b.label) {
|
|
149
|
+
case 0:
|
|
150
|
+
if (!(identifier === coinlib_core_1.MainProtocolSymbols.ACURAST)) return [3 /*break*/, 5];
|
|
151
|
+
_b.label = 1;
|
|
152
|
+
case 1:
|
|
153
|
+
_b.trys.push([1, 3, , 4]);
|
|
154
|
+
return [4 /*yield*/, this.acurastTransactionValidator.validateSignedTransaction(transactionSignResponse)];
|
|
155
|
+
case 2:
|
|
156
|
+
_b.sent();
|
|
157
|
+
return [2 /*return*/, true];
|
|
158
|
+
case 3:
|
|
159
|
+
_a = _b.sent();
|
|
160
|
+
return [2 /*return*/, false];
|
|
161
|
+
case 4: return [3 /*break*/, 6];
|
|
162
|
+
case 5: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported"));
|
|
163
|
+
case 6: return [2 /*return*/];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return AcurastV3SerializerCompanion;
|
|
169
|
+
}());
|
|
170
|
+
exports.AcurastV3SerializerCompanion = AcurastV3SerializerCompanion;
|
|
171
|
+
//# sourceMappingURL=serializer-companion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AcurastTransactionValidator = void 0;
|
|
19
|
+
var v1_1 = require("@airgap/substrate/v1");
|
|
20
|
+
var AcurastTransactionValidator = /** @class */ (function (_super) {
|
|
21
|
+
__extends(AcurastTransactionValidator, _super);
|
|
22
|
+
function AcurastTransactionValidator() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
return AcurastTransactionValidator;
|
|
26
|
+
}(v1_1.SubstrateTransactionValidator));
|
|
27
|
+
exports.AcurastTransactionValidator = AcurastTransactionValidator;
|
|
28
|
+
//# sourceMappingURL=transaction-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,2CAAoE;AAEpE;IAAiD,+CAA6B;IAA9E;;IAAgH,CAAC;IAAD,kCAAC;AAAD,CAAC,AAAjH,CAAiD,kCAA6B,GAAmC;AAApG,kEAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/validators.ts"],"names":[],"mappings":";;;AAAA,2CAA0D;AAE7C,QAAA,iBAAiB,GAAG,wBAAmB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SubstrateProtocolConfiguration, SubstrateSS58AccountConfiguration } from '@airgap/substrate/v1';
|
|
2
|
+
export declare type AcurastTransactionType = never;
|
|
3
|
+
export interface AcurastProtocolConfiguration extends SubstrateProtocolConfiguration<SubstrateSS58AccountConfiguration, AcurastTransactionType> {
|
|
4
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/v1/types/configuration.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../src/v1/types/crypto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SubstrateProtocolNetwork, SubstrateProtocolOptions } from '@airgap/substrate/v1';
|
|
2
|
+
import { AcurastProtocolConfiguration } from './configuration';
|
|
3
|
+
export declare type AcurastUnits = 'caCU' | 'mcaCU' | 'ucaCU' | 'ncaCU' | 'pcaCU';
|
|
4
|
+
export interface AcurastProtocolNetwork extends SubstrateProtocolNetwork {
|
|
5
|
+
blockExplorerApi: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AcurastProtocolOptions {
|
|
8
|
+
network: AcurastProtocolNetwork;
|
|
9
|
+
}
|
|
10
|
+
export interface AcurastBaseProtocolOptions<_Units extends string> extends SubstrateProtocolOptions<_Units, AcurastProtocolConfiguration, AcurastProtocolNetwork> {
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/v1/types/protocol.ts"],"names":[],"mappings":""}
|