@cardano-sdk/projection 0.11.28 → 0.11.30

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.
@@ -6,7 +6,7 @@ const blockCertificates = ({ block: { header: { slot }, body } }) => body
6
6
  certificate,
7
7
  pointer: {
8
8
  certIndex: Cardano.CertIndex(certIndex),
9
- slot: Cardano.Slot(slot),
9
+ slot: BigInt(slot),
10
10
  txIndex: Cardano.TxIndex(txIndex)
11
11
  }
12
12
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"withCertificates.js","sourceRoot":"","sources":["../../../../../src/operators/Mappers/certificates/withCertificates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAWvD,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EAAE,EACL,MAAM,EAAE,EAAE,IAAI,EAAE,EAChB,IAAI,EACL,EACS,EAAE,EAAE,CACd,IAAI;KACD,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;KACzD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CACpD,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IAC5C,WAAW;IACX,OAAO,EAAE;QACP,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC;QACvC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;KAClC;CACF,CAAC,CAAC,CACJ,CAAC;AAGN,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAuB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACvF,GAAG,GAAG;IACN,YAAY,EAAE,iBAAiB,CAAC,GAAG,CAAC;CACrC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"withCertificates.js","sourceRoot":"","sources":["../../../../../src/operators/Mappers/certificates/withCertificates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAWvD,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EAAE,EACL,MAAM,EAAE,EAAE,IAAI,EAAE,EAChB,IAAI,EACL,EACS,EAAE,EAAE,CACd,IAAI;KACD,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;KACzD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CACpD,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IAC5C,WAAW;IACX,OAAO,EAAE;QACP,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC;QACvC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;KAClC;CACF,CAAC,CAAC,CACJ,CAAC;AAGN,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAuB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACvF,GAAG,GAAG;IACN,YAAY,EAAE,iBAAiB,CAAC,GAAG,CAAC;CACrC,CAAC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export * from './certificates/index.js';
2
2
  export * from './withUtxo.js';
3
3
  export * from './withMint.js';
4
+ export * from './withGovernanceActions.js';
4
5
  export * from './withHandles.js';
5
6
  export * from './withHandleMetadata.js';
6
7
  export * from './withNftMetadata.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/operators/Mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/operators/Mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export * from './certificates/index.js';
2
2
  export * from './withUtxo.js';
3
3
  export * from './withMint.js';
4
+ export * from './withGovernanceActions.js';
4
5
  export * from './withHandles.js';
5
6
  export * from './withHandleMetadata.js';
6
7
  export * from './withNftMetadata.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/operators/Mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/operators/Mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Cardano } from '@cardano-sdk/core';
2
+ export declare type WithGovernanceActions = {
3
+ governanceActions: {
4
+ action: Cardano.ProposalProcedure;
5
+ index: Cardano.GovernanceActionId;
6
+ slot: Cardano.Slot;
7
+ }[];
8
+ };
9
+ export declare const withGovernanceActions: <SourceExtraRollForwardPropsIn extends {}, SourceExtraRollBackwardPropsIn extends import("../../index.js").WithBlock>() => import("../../index.js").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, WithGovernanceActions, WithGovernanceActions>;
10
+ //# sourceMappingURL=withGovernanceActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withGovernanceActions.d.ts","sourceRoot":"","sources":["../../../../src/operators/Mappers/withGovernanceActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,oBAAY,qBAAqB,GAAG;IAClC,iBAAiB,EAAE;QACjB,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC;QAClC,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC;QAGlC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;KACpB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,qBAAqB,qQAUhC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { unifiedProjectorOperator } from '../utils/index.js';
2
+ export const withGovernanceActions = unifiedProjectorOperator((evt) => {
3
+ const { body, header } = evt.block;
4
+ const governanceActions = [];
5
+ for (const tx of body)
6
+ if (tx.body.proposalProcedures)
7
+ for (const [actionIndex, action] of tx.body.proposalProcedures.entries())
8
+ governanceActions.push({ action, index: { actionIndex, id: tx.id }, slot: header.slot });
9
+ return { ...evt, governanceActions };
10
+ });
11
+ //# sourceMappingURL=withGovernanceActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withGovernanceActions.js","sourceRoot":"","sources":["../../../../src/operators/Mappers/withGovernanceActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAYpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,wBAAwB,CAA4B,CAAC,GAAG,EAAE,EAAE;IAC/F,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;IACnC,MAAM,iBAAiB,GAA+C,EAAE,CAAC;IAEzE,KAAK,MAAM,EAAE,IAAI,IAAI;QACnB,IAAI,EAAE,CAAC,IAAI,CAAC,kBAAkB;YAC5B,KAAK,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;gBACtE,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAE/F,OAAO,EAAE,GAAG,GAAG,EAAE,iBAAiB,EAAE,CAAC;AACvC,CAAC,CAAC,CAAC"}